mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
drm/rockchip: vop2: use correct destination rectangle height check
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: 604be85547 ("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
This commit is contained in:
parent
095232711f
commit
7f38a14875
|
|
@ -1031,7 +1031,7 @@ static int vop2_plane_atomic_check(struct drm_plane *plane,
|
|||
return format;
|
||||
|
||||
if (drm_rect_width(src) >> 16 < 4 || drm_rect_height(src) >> 16 < 4 ||
|
||||
drm_rect_width(dest) < 4 || drm_rect_width(dest) < 4) {
|
||||
drm_rect_width(dest) < 4 || drm_rect_height(dest) < 4) {
|
||||
drm_err(vop2->drm, "Invalid size: %dx%d->%dx%d, min size is 4x4\n",
|
||||
drm_rect_width(src) >> 16, drm_rect_height(src) >> 16,
|
||||
drm_rect_width(dest), drm_rect_height(dest));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user