[PATCH v2 17/37] drm/imx-dcss: Switch to drm_atomic_get_new_crtc_state()

Laurentiu Palcu laurentiu.palcu at oss.nxp.com
Tue Sep 2 04:45:13 PDT 2025


Hi Maxime,

On Tue, Sep 02, 2025 at 11:35:16AM +0200, Maxime Ripard wrote:
> The imx-dcss atomic_check implementation uses the deprecated
> drm_atomic_get_existing_crtc_state() helper.
> 
> This hook is called as part of the global atomic_check, thus before the
> states are swapped. The existing state thus points to the new state, and
> we can use drm_atomic_get_new_crtc_state() instead.
> 
> Signed-off-by: Maxime Ripard <mripard at kernel.org>

Reviewed-by: Laurentiu Palcu <laurentiu.palcu at oss.nxp.com>

Thanks,
Laurentiu
> 
> ---
> To: Laurentiu Palcu <laurentiu.palcu at oss.nxp.com>
> To: Shawn Guo <shawnguo at kernel.org>
> To: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Lucas Stach <l.stach at pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: dri-devel at lists.freedesktop.org
> Cc: imx at lists.linux.dev
> Cc: linux-arm-kernel at lists.infradead.org
> ---
>  drivers/gpu/drm/imx/dcss/dcss-plane.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c
> index ab6d32bad756d080e1c56d7574403febceff94f4..3a063a53c8dfa6bc5bbbf9afc7ff6519199c2f19 100644
> --- a/drivers/gpu/drm/imx/dcss/dcss-plane.c
> +++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c
> @@ -157,12 +157,12 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,
>  		return 0;
>  
>  	dma_obj = drm_fb_dma_get_gem_obj(fb, 0);
>  	WARN_ON(!dma_obj);
>  
> -	crtc_state = drm_atomic_get_existing_crtc_state(state,
> -							new_plane_state->crtc);
> +	crtc_state = drm_atomic_get_new_crtc_state(state,
> +						   new_plane_state->crtc);
>  
>  	hdisplay = crtc_state->adjusted_mode.hdisplay;
>  	vdisplay = crtc_state->adjusted_mode.vdisplay;
>  
>  	if (!dcss_plane_is_source_size_allowed(new_plane_state->src_w >> 16,
> 
> -- 
> 2.50.1
> 



More information about the linux-arm-kernel mailing list