summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/dsi_host.c
diff options
context:
space:
mode:
authorArchit Taneja2015-07-31 10:36:10 +0200
committerRob Clark2015-08-16 00:27:25 +0200
commitc118e29033aa5b38b593ebd0e02f8b1224c20ed3 (patch)
tree0e5fc90b41d59377dfb0928f45cda2f32f78ee06 /drivers/gpu/drm/msm/dsi/dsi_host.c
parentdrm/msm/dsi: Create a helper to check if there is a connected device (diff)
downloadkernel-qcow2-linux-c118e29033aa5b38b593ebd0e02f8b1224c20ed3.tar.gz
kernel-qcow2-linux-c118e29033aa5b38b593ebd0e02f8b1224c20ed3.tar.xz
kernel-qcow2-linux-c118e29033aa5b38b593ebd0e02f8b1224c20ed3.zip
drm/msm/dsi: Allow dsi to connect to an external bridge
There are platforms where the DSI output can be connected to another encoder bridge chip (DSI to HDMI, DSI to LVDS etc). Add support for external bridge support to the dsi driver. We assume that the external bridge chip would be of the type drm_bridge. The dsi driver's internal drm_bridge (msm_dsi->bridge) is linked to the external bridge's drm_bridge struct. In the case we're connected to an external bridge, we don't need to create and manage a connector within our driver, it's the bridge driver's responsibility to create one. v2: - Move the external bridge attaching stuff to dsi manager to make things cleaner. - Force the bridge to connect to a video mode encoder for now (the dsi mode flags may have not been populated by modeset_init) Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_host.c')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 0fa55354ad2c..af40d428ff44 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1646,7 +1646,8 @@ int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer)
*/
if (check_defer && msm_host->device_node) {
if (!of_drm_find_panel(msm_host->device_node))
- return -EPROBE_DEFER;
+ if (!of_drm_find_bridge(msm_host->device_node))
+ return -EPROBE_DEFER;
}
}
@@ -2073,3 +2074,9 @@ struct drm_panel *msm_dsi_host_get_panel(struct mipi_dsi_host *host,
return panel;
}
+struct drm_bridge *msm_dsi_host_get_bridge(struct mipi_dsi_host *host)
+{
+ struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
+
+ return of_drm_find_bridge(msm_host->device_node);
+}