drm/amdgpu/vce1: Fix VCE 1 firmware size and offsets
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 13 May 2026 20:04:13 +0000 (22:04 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:17:11 +0000 (18:17 -0400)
commitc16fe59f622a080fc457a57b3e8f14c780699449
tree0752e09d98f79582f2d6dc344a098f314646baf4
parent8d2a20c1721cb17e22821e1b4ecbb02d475d91c5
drm/amdgpu/vce1: Fix VCE 1 firmware size and offsets

The VCPU BO contains the actual FW at an offset, but
it was not calculated into the VCPU BO size.
Subtract this from the FW size to make sure there is
no out of bounds access.

Make sure the stack and data offsets are aligned to
the 32K TLB size.

Check that the FW microcode actually fits in the
space that is reserved for it.

Fixes: d4a640d4b9f3 ("drm/amdgpu/vce1: Implement VCE1 IP block (v2)")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vce_v1_0.c