drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags
authorJagan Teki <jagan@amarulasolutions.com>
Mon, 12 Dec 2022 14:57:44 +0000 (20:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:24 +0000 (09:39 +0100)
[ Upstream commit 996e1defca34485dd2bd70b173f069aab5f21a65 ]

HFP/HBP/HSA/EOT_PACKET modes in Exynos DSI host specifies
0 = Enable and 1 = Disable.

The logic for checking these mode flags was correct before
the MIPI_DSI*_NO_* mode flag conversion.

This patch is trying to fix this MIPI_DSI*_NO_* mode flags handling
Exynos DSI host and update the mode_flags in relevant panel drivers.

Fixes: 0f3b68b66a6d ("drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features")
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reported-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20221212145745.15387-1-jagan@amarulasolutions.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c

index 8d137857818cab55f2304bd7a18a63171f251b07..e0465b604f2108f31fa1c3ba6f16782e06a7e58b 100644 (file)
@@ -809,15 +809,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) {
index 0ab1b7ec84cdaf7cb68e6de4c6dddedbc39f5479..166d7d41cd9b582bfaa8d50251044d1d73098c7f 100644 (file)
@@ -692,7 +692,9 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
 
        dsi->lanes = 4;
        dsi->format = MIPI_DSI_FMT_RGB888;
-       dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS;
+       dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS |
+               MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP |
+               MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET;
 
        ctx->supplies[0].supply = "vdd3";
        ctx->supplies[1].supply = "vci";
index ccc8ed6fe3aed7bef183dd42a9bdcd226098a56d..2fc46fdd0e7a01391fb8a6aa389386dd06f5b726 100644 (file)
@@ -446,7 +446,8 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi)
 
        dsi->lanes = 1;
        dsi->format = MIPI_DSI_FMT_RGB888;
-       dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET;
+       dsi->mode_flags = MIPI_DSI_MODE_VIDEO_NO_HFP |
+               MIPI_DSI_MODE_VIDEO_NO_HBP | MIPI_DSI_MODE_VIDEO_NO_HSA;
 
        ctx->supplies[0].supply = "vdd3";
        ctx->supplies[1].supply = "vci";
index 9b3599d6d2dea20f3acfdce0c455f08add507ca2..737b8ca22b374fe4ac673e180b4fcaf52937220b 100644 (file)
@@ -990,8 +990,6 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi)
        dsi->lanes = 4;
        dsi->format = MIPI_DSI_FMT_RGB888;
        dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST
-               | MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP
-               | MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET
                | MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_AUTO_VERT;
 
        ret = s6e8aa0_parse_dt(ctx);