drm/amdgpu: Fix UVD decode image min size calculation
authorDavid Rosca <david.rosca@amd.com>
Thu, 30 Jul 2026 16:01:51 +0000 (18:01 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Aug 2026 13:41:22 +0000 (09:41 -0400)
commitb41c8cb12e202b220353332ab87dc01a11f69304
tree51e6a072188e48b4a36c2eab236d7175bc8b023d
parent64b525edb7e7bdfcdc77883c5e413804e2396856
drm/amdgpu: Fix UVD decode image min size calculation

This needs to use pitch instead of width. Also reject pitch
over 4096 to avoid overflow.

Signed-off-by: David Rosca <david.rosca@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c