drm/amdgpu/vce1: Check that the GPU address is < 128 MiB
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 13 May 2026 20:04:09 +0000 (22:04 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:16:09 +0000 (18:16 -0400)
commite729ae5f3ac73c861c062080ac8c3d666c972404
treec9044ec16b9dc4667e3b935f5e02922856c27cf6
parent530411b465ef0b2c0cc18c2e3d7e38422b1117d1
drm/amdgpu/vce1: Check that the GPU address is < 128 MiB

When ensuring the low 32-bit address, make sure it is
less than 128 MiB, otherwise the VCE seems to fail to initialize.
This seems to be an undocumented limitation of the firmware
validation mechanism. Note that in case of VCE1 the BAR
address is zero and we can't change it also due to the
firmware validator.

When programming the mmVCE_VCPU_CACHE_OFFSETn registers,
don't AND them with a mask. This is incorrect because
the register mask is actually 0x0fffffff and useless because
we already ensure the addresses are below the limit.

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