]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
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>
Tue, 19 May 2026 16:10:19 +0000 (12:10 -0400)
commit9f907adb66d8369dd45412794a04845011503fa8
treed8deea2beb96487177286f5d2a94d3adaa5e6124
parent4d798ea0712fddbd35b439cef32b8ac735eb76f9
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>
(cherry picked from commit e729ae5f3ac73c861c062080ac8c3d666c972404)
drivers/gpu/drm/amd/amdgpu/vce_v1_0.c