[PATCH v8 01/14] drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags

Nicolas Boichat drinkcat at chromium.org
Thu Nov 10 16:49:33 PST 2022


On Fri, Nov 11, 2022 at 2:40 AM Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> HFP/HBP/HSA/EOT_PACKET modes in Exynos DSI host specifies
> 0 = Enable and 1 = Disable.

Oh I see, that's confusing... IMHO you might want to change the
register macro name... (but if that's what the datasheet uses, it
might not be ideal either). At the _very_ least, I'd add a comment in
the code so the next person doesn't attempt to "fix" it again...

BTW, are you sure DSIM_HSE_MODE is correct now?

>
> The logic for checking these mode flags was correct before
> the MIPI_DSI*_NO_* mode flag conversion.
>
> Fix the MIPI_DSI*_NO_* mode flags handling.
>
> Fixes: 0f3b68b66a6d ("drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling
> features")
> Cc: Nicolas Boichat <drinkcat at chromium.org>
> Reported-by: Sébastien Szymanski <sebastien.szymanski at armadeus.com>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index ec673223d6b7..b5305b145ddb 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -805,15 +805,15 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi)
>                         reg |= DSIM_AUTO_MODE;
>                 if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_HSE)
>                         reg |= DSIM_HSE_MODE;
> -               if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP))
> +               if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HFP)
>                         reg |= DSIM_HFP_MODE;
> -               if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP))
> +               if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HBP)
>                         reg |= DSIM_HBP_MODE;
> -               if (!(dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA))
> +               if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA)
>                         reg |= DSIM_HSA_MODE;
>         }
>
> -       if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET))
> +       if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
>                 reg |= DSIM_EOT_DISABLE;
>
>         switch (dsi->format) {
> --
> 2.25.1
>



More information about the linux-arm-kernel mailing list