diff options
| author | Laurent Pinchart <[email protected]> | 2020-02-26 11:24:43 +0000 |
|---|---|---|
| committer | Tomi Valkeinen <[email protected]> | 2020-02-26 11:31:46 +0000 |
| commit | 514fc91083f6c7e6faac17614361a39beeff615b (patch) | |
| tree | c12ec3cb818a9be933142a3fb678cf487a490f1d /drivers/gpu/drm/omapdrm/omap_connector.c | |
| parent | drm/omap: Simplify HDMI mode and infoframe configuration (diff) | |
| download | kernel-514fc91083f6c7e6faac17614361a39beeff615b.tar.gz kernel-514fc91083f6c7e6faac17614361a39beeff615b.zip | |
drm/omap: Factor out display type to connector type conversion
Move the code that computes the DRM connector type for the
omapdss_device display type to a new omapdss_device_connector_type()
function for later reuse.
Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Tested-by: Sebastian Reichel <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_connector.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_connector.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index 88dbf3fa473f..38c7a79c5d4a 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -296,24 +296,7 @@ static int omap_connector_get_type(struct omap_dss_device *output) type = display->type; omapdss_device_put(display); - switch (type) { - case OMAP_DISPLAY_TYPE_HDMI: - return DRM_MODE_CONNECTOR_HDMIA; - case OMAP_DISPLAY_TYPE_DVI: - return DRM_MODE_CONNECTOR_DVID; - case OMAP_DISPLAY_TYPE_DSI: - return DRM_MODE_CONNECTOR_DSI; - case OMAP_DISPLAY_TYPE_DPI: - case OMAP_DISPLAY_TYPE_DBI: - return DRM_MODE_CONNECTOR_DPI; - case OMAP_DISPLAY_TYPE_VENC: - /* TODO: This could also be composite */ - return DRM_MODE_CONNECTOR_SVIDEO; - case OMAP_DISPLAY_TYPE_SDI: - return DRM_MODE_CONNECTOR_LVDS; - default: - return DRM_MODE_CONNECTOR_Unknown; - } + return omapdss_device_connector_type(type); } /* initialize connector */ |
