drm/rockchip: vop2: Switch impossible format conditional to WARN_ON

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
This commit is contained in:
Daniel Stone
2025-12-15 15:09:17 +01:00
committed by Heiko Stuebner
parent f1eac46fe5
commit 78de5d28d7

View 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 */