Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:

Pre-existing issues:
- [High] Hardware misidentification of Exynos 7870 causing incorrect display 
initialization sequence.
--

--- Patch [1]: [PATCH v5 1/3] drm/bridge: samsung-dsim: enable MFLUSH_VS for 
Exynos 7870 DSIM ---
commit 4604aa815a722cdb66f92b628f8218c57c5a77bb
Author: Kaustabh Chakraborty <[email protected]>

drm/bridge: samsung-dsim: enable MFLUSH_VS for Exynos 7870 DSIM

This commit enables the active-high MFLUSH_VS bit for the Exynos 7870 DSIM
hardware to properly flush the display FIFO at v-sync pulse. It fixes an
issue introduced by a previous commit that assumed MFLUSH_VS was active-low
across all hardware.

Link: 
https://github.com/samsungexynos7870/android_kernel_samsung_exynos7870/blob/a3762bb1761ae/drivers/video/fbdev/exynos/decon_7870/dsim_reg_7870.c#L699
 [1]

> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c 
> b/drivers/gpu/drm/bridge/samsung-dsim.c
> index e2fc69fc51b60..6260c091c3df8 100644
> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> @@ -1089,6 +1089,13 @@ static int samsung_dsim_init_link(struct samsung_dsim 
> *dsi)
>                       reg |= DSIM_HBP_DISABLE_MODE;
>               if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA)
>                       reg |= DSIM_HSA_DISABLE_MODE;
> +
> +             /*
> +              * For some hardware types, DSIM_MFLUSH_VS bit needs to be
> +              * enabled as its active-high.
> +              */
> +             if (dsi->plat_data->hw_type == DSIM_TYPE_EXYNOS7870)
> +                     reg |= DSIM_MFLUSH_VS;

[Severity: High]
This is a pre-existing issue, but since this patch adds specific support for
DSIM_TYPE_EXYNOS7870, does the samsung_dsim_hw_is_exynos() macro also need
to be updated to include it?

Currently, that macro is defined as:

include/drm/bridge/samsung-dsim.h:
#define samsung_dsim_hw_is_exynos(hw) \
        ((hw) >= DSIM_TYPE_EXYNOS3250 && (hw) <= DSIM_TYPE_EXYNOS5433)

Because DSIM_TYPE_EXYNOS7870 falls outside this range, the macro evaluates
to false for the Exynos 7870. This causes the driver to incorrectly treat
it as an i.MX device in several places.

For example, further down in this same samsung_dsim_init_link() function,
it will incorrectly apply the i.MX-specific non-continuous clock lane
configuration:

        if (driver_data->has_clklane_stop &&
            dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) {
                if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type))
                        reg |= DSIM_NON_CONTINUOUS_CLKLANE;

It also causes samsung_dsim_atomic_pre_enable() to call samsung_dsim_init()
early:

        if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) {
                ret = samsung_dsim_init(dsi);

which breaks the expected Exynos DSI host initialization order.

Will this hardware misidentification cause display initialization failures
on Exynos 7870 hardware?

>       }
>  
>       if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to