[External] : Re: [PATCH] drm/rockchip: vop2: use correct destination rectangle height check

ALOK TIWARI alok.a.tiwari at oracle.com
Sun Oct 12 04:31:05 PDT 2025



On 10/12/2025 4:58 PM, Christian Hewitt wrote:
>> On 11 Oct 2025, at 5:04 pm, Alok Tiwari <alok.a.tiwari at oracle.com> wrote:
>>
>> 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 at oracle.com>
>> ---
>> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> index b50927a824b4..697f54777a32 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>> @@ -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_heigh(dest) < 4) {
> 
> Typo: s/drm_rect_heigh/drm_rect_height
> 
> Christian
> 

Thanks Christian. I will correct it and send v2.

Thanks,
Alok



More information about the linux-arm-kernel mailing list