summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_connector.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_connector.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_connector.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index f9cc04c7c0fa..4729af395156 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -61,26 +61,36 @@ static enum drm_connector_status omap_connector_detect(
struct drm_connector *connector, bool force)
{
struct omap_connector *omap_connector = to_omap_connector(connector);
- struct omap_dss_device *dssdev = omap_connector->dssdev;
- enum drm_connector_status ret;
+ struct omap_dss_device *dssdev;
+ enum drm_connector_status status;
+
+ for (dssdev = omap_connector->dssdev; dssdev; dssdev = dssdev->src) {
+ if (dssdev->ops_flags & OMAP_DSS_DEVICE_OP_DETECT)
+ break;
+ }
- if (dssdev->ops->detect) {
+ if (dssdev) {
if (dssdev->ops->detect(dssdev))
- ret = connector_status_connected;
+ status = connector_status_connected;
else
- ret = connector_status_disconnected;
- } else if (dssdev->type == OMAP_DISPLAY_TYPE_DPI ||
- dssdev->type == OMAP_DISPLAY_TYPE_DBI ||
- dssdev->type == OMAP_DISPLAY_TYPE_SDI ||
- dssdev->type == OMAP_DISPLAY_TYPE_DSI) {
- ret = connector_status_connected;
+ status = connector_status_disconnected;
} else {
- ret = connector_status_unknown;
+ switch (omap_connector->dssdev->type) {
+ case OMAP_DISPLAY_TYPE_DPI:
+ case OMAP_DISPLAY_TYPE_DBI:
+ case OMAP_DISPLAY_TYPE_SDI:
+ case OMAP_DISPLAY_TYPE_DSI:
+ status = connector_status_connected;
+ break;
+ default:
+ status = connector_status_unknown;
+ break;
+ }
}
- VERB("%s: %d (force=%d)", omap_connector->dssdev->name, ret, force);
+ VERB("%s: %d (force=%d)", omap_connector->dssdev->name, status, force);
- return ret;
+ return status;
}
static void omap_connector_destroy(struct drm_connector *connector)