]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/rockchip: vop2: Switch impossible format conditional to WARN_ON
authorDaniel Stone <daniels@collabora.com>
Mon, 15 Dec 2025 14:09:17 +0000 (15:09 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 8 Jan 2026 19:00:34 +0000 (20:00 +0100)
We should never be able to create a framebuffer with an unsupported
format, so throw a warning if this ever happens.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20251215-vop2-atomic-fixups-v5-1-83463c075a8d@collabora.com
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c

index 498df0ce4680cbdddeb71c4fa499b2a9ed2d63d8..20b49209ddcd54829c36e1b7dd83bdef86497105 100644 (file)
@@ -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))
                return format;
 
        /* Co-ordinates have now been clipped */