]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/msm/dsi: Don't call hpd helper unconditionally
authorArchit Taneja <architt@codeaurora.org>
Mon, 7 Sep 2015 08:04:15 +0000 (13:34 +0530)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 6 Apr 2018 06:06:53 +0000 (06:06 +0000)
Currently, msm dsi_host's attach/detach ops call drm_helper_hpd_irq_event
unconditionally. Calling it makes sense if we have a drm_panel
connected (in this case, we created the connector), but not when we have
a bridge chip connected. For bridges, the driver (or someone else in the
encoder chain) should call the hpd handler.

Call it in the attach/detach ops only if we're connected to a panel.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
drivers/gpu/drm/msm/dsi/dsi_host.c

index 985a510e1367944f5997b93aa5bcf8b133cef6ce..25916502e429218435acb58446b89a732b91e181 100644 (file)
@@ -1296,7 +1296,7 @@ static int dsi_host_attach(struct mipi_dsi_host *host,
                return ret;
 
        DBG("id=%d", msm_host->id);
-       if (msm_host->dev)
+       if (msm_host->dev && of_drm_find_panel(msm_host->device_node))
                drm_helper_hpd_irq_event(msm_host->dev);
 
        return 0;
@@ -1310,7 +1310,7 @@ static int dsi_host_detach(struct mipi_dsi_host *host,
        msm_host->device_node = NULL;
 
        DBG("id=%d", msm_host->id);
-       if (msm_host->dev)
+       if (msm_host->dev && of_drm_find_panel(msm_host->device_node))
                drm_helper_hpd_irq_event(msm_host->dev);
 
        return 0;