Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/tilcdc: tilcdc_pdev_probe() skips tilcdc_crtc_hw_reset()
--

commit ae76397fb05d05122d64d74fa8d16d0b22b1c809
Author: Maxime Ripard <[email protected]>

drm/tilcdc: Switch to drm_mode_config_create_initial_state

This commit replaces drm_mode_config_reset() with
drm_mode_config_create_initial_state() in tilcdc_pdev_probe() to initialize
the KMS state at probe time.

> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
> b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 1d6c9a423a410..da718d9cb1d69 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -422,7 +422,9 @@ static int tilcdc_pdev_probe(struct platform_device *pdev)
>               goto unregister_cpufreq_notif;
>       }
>  
> -     drm_mode_config_reset(ddev);
> +     ret = drm_mode_config_create_initial_state(ddev);
> +     if (ret)
> +             goto stop_poll;

[Severity: High]
Does replacing drm_mode_config_reset() with
drm_mode_config_create_initial_state() skip tilcdc_crtc_hw_reset() during
probe?

tilcdc_crtc_hw_reset() is wired to drm_crtc_helper_funcs.hw_reset to turn off
LCDC_RASTER_ENABLE and wait for LCDC_FRAME_DONE when the bootloader leaves
the display controller active at boot, as introduced in 46a956ab3c5b
("drm/tilcdc: Turn raster off in crtc reset, if it was on in the HW") and
6e531fda1d6b ("drm/tilcdc: Move hardware reset to hw_reset hook").

Because drm_mode_config_create_initial_state() calls
drm_mode_config_crtc_create_state() without invoking helper_funcs->hw_reset,
hardware scanout stays enabled while the initial CRTC state is marked
disabled, causing the first modeset in tilcdc_crtc_enable() to reprogram
timings and DMA addresses while the raster is still running and time out
loading the palette.

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

Reply via email to