]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00174928 LDB: Check for disp_id for LDB_SIN0/1 mode
authorWayne Zou <b36644@freescale.com>
Wed, 2 May 2012 06:40:59 +0000 (14:40 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:33 +0000 (08:34 +0200)
For LDB_SIN0 mode, lvds channel0 can only connect with ipu di0
For LDB_SIN1 mode, lvds channel1 can only connect with ipu di1

Signed-off-by: Wayne Zou <b36644@freescale.com>
drivers/video/mxc/ldb.c

index dacb9b4bac34c177ae25dade98744bfa89479c81..41233d465a5b894283f53b155d20258be0fa5b7e 100644 (file)
@@ -455,6 +455,17 @@ static int ldb_disp_init(struct mxc_dispdrv_handle *disp,
                else
                        ldb->mode = plat_data->mode;
 
+               if ((ldb->mode == LDB_SIN0) || (ldb->mode == LDB_SIN1)) {
+                       ret = ldb->mode - LDB_SIN0;
+                       if (plat_data->disp_id != ret) {
+                               dev_warn(&ldb->pdev->dev,
+                                       "change IPU DI%d to IPU DI%d for LDB "
+                                       "channel%d.\n",
+                                       plat_data->disp_id, ret, ret);
+                               plat_data->disp_id = ret;
+                       }
+               }
+
                if (ldb->mode == LDB_SPL_DI0) {
                        reg |= LDB_SPLIT_MODE_EN | LDB_CH0_MODE_EN_TO_DI0
                                | LDB_CH1_MODE_EN_TO_DI0;