Icenowy Zheng <[email protected]> writes:

Hello,

> When either of the RUNNING bits are set, change to some timing
> parameters won't take effect.
>
> This will lead to failure of the first modeset done by the kernel, if
> the bootloader sets a different mode and keeps the display running
> before it.
>
> Flip these RUNNING bits off before setting it on to fix this problem.
>
> Fixes: dbf21777caa8 ("drm: verisilicon: add a driver for Verisilicon display 
> controllers")
> Signed-off-by: Icenowy Zheng <[email protected]>
> ---
>  drivers/gpu/drm/verisilicon/vs_bridge.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_bridge.c 
> b/drivers/gpu/drm/verisilicon/vs_bridge.c
> index 3a5091c0ac2c0..c9b1422be16d9 100644
> --- a/drivers/gpu/drm/verisilicon/vs_bridge.c
> +++ b/drivers/gpu/drm/verisilicon/vs_bridge.c
> @@ -162,6 +162,14 @@ static void vs_bridge_enable_common(struct vs_crtc *crtc,
>                       VSDC_DISP_PANEL_CONFIG_DE_EN |
>                       VSDC_DISP_PANEL_CONFIG_DAT_EN |
>                       VSDC_DISP_PANEL_CONFIG_CLK_EN);
> +
> +     /* Disable it first to prevent stale hardware state */
> +     regmap_clear_bits(dc->regs, VSDC_DISP_PANEL_START,
> +                       VSDC_DISP_PANEL_START_MULTI_DISP_SYNC |
> +                       VSDC_DISP_PANEL_START_RUNNING(output));
> +     regmap_clear_bits(dc->regs, VSDC_DISP_PANEL_CONFIG(output),
> +                       VSDC_DISP_PANEL_CONFIG_RUNNING);
> +

I'm not familiar with this hardware but the patch seems to be doing what
is mentioned in the commit message.

Acked-by: Javier Martinez Canillas <[email protected]>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Reply via email to