summaryrefslogtreecommitdiffstats
path: root/drivers/staging/imx-drm/imx-ldb.c
diff options
context:
space:
mode:
authorPhilipp Zabel2014-03-05 10:20:52 +0100
committerRussell King2014-03-07 17:17:48 +0100
commit655b43ccb7937325db287ab1e4e1ac4ec3f233fe (patch)
treead4f5520ef097facf4d933c69855030948815263 /drivers/staging/imx-drm/imx-ldb.c
parentMerge branch 'topic/of-graph' of git://git.pengutronix.de/git/pza/linux into ... (diff)
downloadkernel-qcow2-linux-655b43ccb7937325db287ab1e4e1ac4ec3f233fe.tar.gz
kernel-qcow2-linux-655b43ccb7937325db287ab1e4e1ac4ec3f233fe.tar.xz
kernel-qcow2-linux-655b43ccb7937325db287ab1e4e1ac4ec3f233fe.zip
staging: imx-drm-core: Use OF graph to find components and connections between encoder and crtcs
This patch adds support to find the involved components connected to the IPU display interface ports using the OF graph bindings documented in Documentation/devicetree/bindings/media/video-interfaces.txt. It makes use of the of_graph (formerly v4l2_of) parsing helpers and thus depends on the patch that moves those out to drivers/of. Each display interface needs to have an associated port node in the device tree. We can associate this node with the crtc platform device and use it to find the crtc corresponding to a given port node instead of using a combination of parent device node and id number, as before. Explicitly converting the void* cookie to the port device tree node allows to get rid of the ipu_id and di_id fields. The multiplexer setting on i.MX6 now can be obtained from the port id (reg property) in the device tree. The imx-drm node now needs a ports property that contains phandles to each of the IPU display interface port nodes. From there, all attached encoders are scanned and enabled encoders are added to a waiting list. The bind order makes sure that once all components are probed, crtcs are bound before encoders, so that imx_drm_encoder_parse_of can be called from the encoder bind callbacks. For parsing the OF graph, temporary copies of the V4L2 OF graph helpers are used, that can be removed again once those are available at a generic place. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/staging/imx-drm/imx-ldb.c')
-rw-r--r--drivers/staging/imx-drm/imx-ldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
index 5168c76cff53..301c4300aa55 100644
--- a/drivers/staging/imx-drm/imx-ldb.c
+++ b/drivers/staging/imx-drm/imx-ldb.c
@@ -168,7 +168,7 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder)
u32 pixel_fmt;
unsigned long serial_clk;
unsigned long di_clk = mode->clock * 1000;
- int mux = imx_drm_encoder_get_mux_id(encoder);
+ int mux = imx_drm_encoder_get_mux_id(imx_ldb_ch->child, encoder);
if (ldb->ldb_ctrl & LDB_SPLIT_MODE_EN) {
/* dual channel LVDS mode */
@@ -203,7 +203,7 @@ static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
struct imx_ldb *ldb = imx_ldb_ch->ldb;
int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN;
- int mux = imx_drm_encoder_get_mux_id(encoder);
+ int mux = imx_drm_encoder_get_mux_id(imx_ldb_ch->child, encoder);
if (dual) {
clk_prepare_enable(ldb->clk[0]);