Hi Daniel,

Am Mittwoch, 15. Oktober 2025, 13:00:35 Mitteleuropäische Sommerzeit schrieb 
Daniel Stone:
> We should never be able to create a framebuffer with an unsupported
> format, so throw a warning if this ever happens, instead of attempting
> to stagger on.
> 
> Signed-off-by: Daniel Stone <[email protected]>
> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c 
> b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> index 284c8a048034..8c5042fb2e7e 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> @@ -1029,8 +1029,8 @@ static int vop2_plane_atomic_check(struct drm_plane 
> *plane,
>               return 0;
>  
>       format = vop2_convert_format(fb->format->format);
> -     if (format < 0)
> -             return format;
> +     /* We shouldn't be able to create a fb for an unsupported format */
> +     WARN_ON(format < 0);

What happened to Greg's
"But don't add new WARN() calls please, just properly clean up and handle
the error." [0]

Also, switching to WARN_ON would then continue the atomic_check function
where it currently does exit with a real error code?


Heiko


[0] https://lwn.net/ml/linux-kernel/2024041544-fester-undead-7949@gregkh/


Reply via email to