mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-04 21:42:31 -04:00
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:
committed by
Heiko Stuebner
parent
f1eac46fe5
commit
78de5d28d7
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user