aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-26 22:16:34 -0400
committerDave Airlie <airlied@redhat.com>2018-07-26 22:17:31 -0400
commit050d2a5533af362932553cb47fd5db9a3476074e (patch)
tree126b376bee803d0871717edd823208abafd3dcd0 /drivers/gpu
parent5a75cd11a8998a1859533ffeba23e613f85c3991 (diff)
parentbbe4a089e299efe696ef520e58513c12c0d497c9 (diff)
Merge tag 'imx-drm-fixes-2018-07-20' of git://git.pengutronix.de/git/pza/linux into drm-fixes
drm/imx: imx-drm ldb and ipu-v3 csi fixes - Disable the LVDS Display Bridge (LDB) on driver bind. This is necessary to guarantee correct LVDS signals in case the bootloader left the LVDS output active. - Remove false positive warning about disabled second LVDS channel in dual-channel mode. In this mode, the second LVDS channel can not be used separately. If the second channel is correctly described as disabled in the device tree, the driver warned about this anyway. - Fix the CSI confiuration to not only enable interlaced capture mode for V4L2_FIELD_SEQ_BT and V4L2_FIELD_SEQ_TB, but also for the V4L2_FIELD_ALTERNATE interlacing mode. Before, it incorrectly tried to capture progressive frames in that case. Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/1532100423.3438.8.camel@pengutronix.de
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/imx/imx-ldb.c9
-rw-r--r--drivers/gpu/ipu-v3/ipu-csi.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 56dd7a9a8e25..dd5312b02a8d 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -612,6 +612,9 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
612 return PTR_ERR(imx_ldb->regmap); 612 return PTR_ERR(imx_ldb->regmap);
613 } 613 }
614 614
615 /* disable LDB by resetting the control register to POR default */
616 regmap_write(imx_ldb->regmap, IOMUXC_GPR2, 0);
617
615 imx_ldb->dev = dev; 618 imx_ldb->dev = dev;
616 619
617 if (of_id) 620 if (of_id)
@@ -652,14 +655,14 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
652 if (ret || i < 0 || i > 1) 655 if (ret || i < 0 || i > 1)
653 return -EINVAL; 656 return -EINVAL;
654 657
658 if (!of_device_is_available(child))
659 continue;
660
655 if (dual && i > 0) { 661 if (dual && i > 0) {
656 dev_warn(dev, "dual-channel mode, ignoring second output\n"); 662 dev_warn(dev, "dual-channel mode, ignoring second output\n");
657 continue; 663 continue;
658 } 664 }
659 665
660 if (!of_device_is_available(child))
661 continue;
662
663 channel = &imx_ldb->channel[i]; 666 channel = &imx_ldb->channel[i];
664 channel->ldb = imx_ldb; 667 channel->ldb = imx_ldb;
665 channel->chno = i; 668 channel->chno = i;
diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
index caa05b0702e1..5450a2db1219 100644
--- a/drivers/gpu/ipu-v3/ipu-csi.c
+++ b/drivers/gpu/ipu-v3/ipu-csi.c
@@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg,
339 break; 339 break;
340 case V4L2_MBUS_BT656: 340 case V4L2_MBUS_BT656:
341 csicfg->ext_vsync = 0; 341 csicfg->ext_vsync = 0;
342 if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field)) 342 if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) ||
343 mbus_fmt->field == V4L2_FIELD_ALTERNATE)
343 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED; 344 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;
344 else 345 else
345 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE; 346 csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;