Re: [PATCH v2 1/8] drm/rockchip: vop2: Switch impossible format conditional to WARN_ON

Nicolas Frattaroli
2026-01-20T12:58:28Z

On Tuesday, 20 January 2026 13:49:12 Central European Standard Time Thomas Zimmermann wrote:
> Hi
>
> Am 06.12.25 um 21:45 schrieb Nicolas Frattaroli:
> > From: Daniel Stone <daniels@collabora.com>
> >
> > 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 <daniels@collabora.com>
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> > ---
> > drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> > index 498df0ce4680..20b49209ddcd 100644
> > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> > @@ -1030,7 +1030,8 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
> > return 0;
> >
> > format = vop2_convert_format(fb->format->format);
> > - if (format < 0)
> > + /* We shouldn't be able to create a fb for an unsupported format */
> > + if (WARN_ON(format < 0))
>
> Please use drm_WARN_ON() here.

Hi Thomas,

A later revision of this series has already been applied. Feel free
to send such a patch however.

Kind regards,
Nicolas Frattaroli

>
> Best regards
> Thomas
>
> > return format;
> >
> > /* Co-ordinates have now been clipped */
> >