drm/tegra: dsi: Mark connector hotpluggable
authorThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 13:54:01 +0000 (14:54 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 15:12:16 +0000 (16:12 +0100)
DSI panels can always be hotplugged via the DSI bus' attach/detach
infrastructure, so unconditionally mark the connector hotpluggable.

While at it, also make sure that when a panel is detached the connector
is marked unconnected before calling into the DRM hotplug helpers to
reflect the correct state.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dsi.c

index e817ee1..704267c 100644 (file)
@@ -804,10 +804,10 @@ static int tegra_dsi_host_detach(struct mipi_dsi_host *host,
        struct tegra_output *output = &dsi->output;
 
        if (output->panel && &device->dev == output->panel->dev) {
+               output->panel = NULL;
+
                if (output->connector.dev)
                        drm_helper_hpd_irq_event(output->connector.dev);
-
-               output->panel = NULL;
        }
 
        return 0;
@@ -836,6 +836,8 @@ static int tegra_dsi_probe(struct platform_device *pdev)
        if (err < 0)
                return err;
 
+       dsi->output.connector.polled = DRM_CONNECTOR_POLL_HPD;
+
        /*
         * Assume these values by default. When a DSI peripheral driver
         * attaches to the DSI host, the parameters will be taken from