diff options
author | Peng Fan <peng.fan@nxp.com> | 2022-09-16 13:38:34 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-09-28 21:03:15 +0800 |
commit | 21eb66fe1f81909d3f72940fdeb7085a06427118 (patch) | |
tree | 804a0679698e1b86780520cba1cd3893fd2836a9 /drivers | |
parent | 88132ed0b4ee31a0940be96d13b1a65ac030869e (diff) |
LFU-396-2 video: nxp: imx: dsi: force DISPLAY_FLAGS_HSYNC_HIGH & DISPLAY_FLAGS_VSYNC_HIGH
To i.MX93/8MP, the VSYNC/HSYNC Polarities are high, so set
the timing flag: DISPLAY_FLAGS_HSYNC_HIGH & DISPLAY_FLAGS_VSYNC_HIGH
in check_timing callback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 15eba93f742cb427a8808a05f9e800c1b2922f0e)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/nxp/imx/dw_dsi_imx.c | 4 | ||||
-rw-r--r-- | drivers/video/nxp/imx/sec_dsim_imx.c | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/nxp/imx/dw_dsi_imx.c b/drivers/video/nxp/imx/dw_dsi_imx.c index cf65ec02e5..6bdd382621 100644 --- a/drivers/video/nxp/imx/dw_dsi_imx.c +++ b/drivers/video/nxp/imx/dw_dsi_imx.c @@ -349,6 +349,10 @@ static int dw_dsi_imx_check_timing(struct udevice *dev, struct display_timing *t return -ENOTCONN; } + /* DSI force the Polarities as high */ + priv->adj.flags &= ~(DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW); + priv->adj.flags |= DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH; + *timing = priv->adj; return 0; diff --git a/drivers/video/nxp/imx/sec_dsim_imx.c b/drivers/video/nxp/imx/sec_dsim_imx.c index 2e6aa467f7..9c6e7d2bca 100644 --- a/drivers/video/nxp/imx/sec_dsim_imx.c +++ b/drivers/video/nxp/imx/sec_dsim_imx.c @@ -32,6 +32,7 @@ struct imx_sec_dsim_priv { struct reset_ctl_bulk soft_resetn; struct reset_ctl_bulk clk_enable; struct reset_ctl_bulk mipi_reset; + struct display_timing adj; }; #if IS_ENABLED(CONFIG_DM_RESET) @@ -120,6 +121,8 @@ static int imx_sec_dsim_attach(struct udevice *dev) return ret; } + priv->adj = timings; + ret = uclass_get_device(UCLASS_DSI_HOST, 0, &priv->dsi_host); if (ret) { dev_err(dev, "No video dsi host detected %d\n", ret); @@ -209,9 +212,23 @@ static int imx_sec_dsim_remove(struct udevice *dev) return 0; } +static int imx_sec_dsim_check_timing(struct udevice *dev, struct display_timing *timing) +{ + struct imx_sec_dsim_priv *priv = dev_get_priv(dev); + + /* DSI force the Polarities as high */ + priv->adj.flags &= ~(DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW); + priv->adj.flags |= DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH; + + *timing = priv->adj; + + return 0; +} + struct video_bridge_ops imx_sec_dsim_ops = { .attach = imx_sec_dsim_attach, .set_backlight = imx_sec_dsim_set_backlight, + .check_timing = imx_sec_dsim_check_timing, }; static const struct udevice_id imx_sec_dsim_ids[] = { |