Commit 5d79598b authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: Hardcode omap_connector type to DSI

The omap_connector implementation is now used for DSI only. Hardcode its
type and drop unused code.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-52-laurent.pinchart@ideasonboard.com
parent 8bef8a6d
......@@ -286,29 +286,6 @@ void omapdss_device_post_disable(struct omap_dss_device *dssdev)
}
EXPORT_SYMBOL_GPL(omapdss_device_post_disable);
unsigned int omapdss_device_connector_type(enum omap_display_type type)
{
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;
}
}
EXPORT_SYMBOL_GPL(omapdss_device_connector_type);
/* -----------------------------------------------------------------------------
* Components Handling
*/
......
......@@ -454,7 +454,6 @@ void omapdss_device_pre_enable(struct omap_dss_device *dssdev);
void omapdss_device_enable(struct omap_dss_device *dssdev);
void omapdss_device_disable(struct omap_dss_device *dssdev);
void omapdss_device_post_disable(struct omap_dss_device *dssdev);
unsigned int omapdss_device_connector_type(enum omap_display_type type);
int omap_dss_get_num_overlay_managers(void);
......
......@@ -24,22 +24,7 @@ struct omap_connector {
static enum drm_connector_status omap_connector_detect(
struct drm_connector *connector, bool force)
{
enum drm_connector_status status;
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DPI:
case DRM_MODE_CONNECTOR_LVDS:
case DRM_MODE_CONNECTOR_DSI:
status = connector_status_connected;
break;
default:
status = connector_status_unknown;
break;
}
VERB("%s: %d (force=%d)", connector->name, status, force);
return status;
return connector_status_connected;
}
static void omap_connector_destroy(struct drm_connector *connector)
......@@ -138,18 +123,6 @@ static const struct drm_connector_helper_funcs omap_connector_helper_funcs = {
.mode_valid = omap_connector_mode_valid,
};
static int omap_connector_get_type(struct omap_dss_device *output)
{
struct omap_dss_device *display;
enum omap_display_type type;
display = omapdss_display_get(output);
type = display->type;
omapdss_device_put(display);
return omapdss_device_connector_type(type);
}
/* initialize connector */
struct drm_connector *omap_connector_init(struct drm_device *dev,
struct omap_dss_device *output,
......@@ -171,7 +144,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
connector->doublescan_allowed = 0;
drm_connector_init(dev, connector, &omap_connector_funcs,
omap_connector_get_type(output));
DRM_MODE_CONNECTOR_DSI);
drm_connector_helper_add(connector, &omap_connector_helper_funcs);
return connector;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment