]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/rockchip: vop2: use correct destination rectangle height check
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Sun, 12 Oct 2025 14:20:01 +0000 (07:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:04:34 +0000 (14:04 +0100)
commit8f63b2eb4e447704543f967c547f794447cba1a4
tree66ca169c75f613754f6225c9d19a77af55b85c1c
parent9978469f88133aa283c47e2b8e574d029338d8a1
drm/rockchip: vop2: use correct destination rectangle height check

[ Upstream commit 7f38a1487555604bc4e210fa7cc9b1bce981c40e ]

The vop2_plane_atomic_check() function incorrectly checks
drm_rect_width(dest) twice instead of verifying both width and height.
Fix the second condition to use drm_rect_height(dest) so that invalid
destination rectangles with height < 4 are correctly rejected.

Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20251012142005.660727-1-alok.a.tiwari@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c