drm/sti: fix panel detection for DVO connector
authorVincent Abriou <vincent.abriou@st.com>
Thu, 28 Jan 2016 08:11:03 +0000 (09:11 +0100)
committerVincent Abriou <vincent.abriou@st.com>
Fri, 26 Feb 2016 09:06:17 +0000 (10:06 +0100)
The DVO connector is tag as disconnect because of a wrong management
of the panel detection.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
drivers/gpu/drm/sti/sti_dvo.c

index 45cbe2bf7dd60da4dbe6b513e21f8a890509c894..9e90b746e9b2806f23be5665c459b7ab16e434a3 100644 (file)
@@ -345,12 +345,14 @@ sti_dvo_connector_detect(struct drm_connector *connector, bool force)
 
        DRM_DEBUG_DRIVER("\n");
 
-       if (!dvo->panel)
+       if (!dvo->panel) {
                dvo->panel = of_drm_find_panel(dvo->panel_node);
+               if (dvo->panel)
+                       drm_panel_attach(dvo->panel, connector);
+       }
 
        if (dvo->panel)
-               if (!drm_panel_attach(dvo->panel, connector))
-                       return connector_status_connected;
+               return connector_status_connected;
 
        return connector_status_disconnected;
 }