Files
android_kernel_xiaomi_sm8450/drivers/gpu/drm/amd/amdgpu
Piotr Redlewski c1fe75c9e4 drm/amd/amdgpu: fix UVD mc offsets
When UVD bo is created, its size is based on the information from firmware
header (ucode_size_bytes). The same value should be be used when programming
UVD mc controller offsets, otherwise it can happen that
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will point
AMDGPU_GPU_PAGE_SIZE bytes after the UVD bo end.

Second issue is that when programming the mmUVD_VCPU_CACHE_SIZE0 register,
AMDGPU_UVD_FIRMWARE_OFFSET should be taken into account. If it isn't,
(mmUVD_VCPU_CACHE_OFFSET2 + mmUVD_VCPU_CACHE_SIZE2) will always point
AMDGPU_UVD_FIRMWARE_OFFSET bytes after the UVD bo end.

v2: move firmware size calculation into macro definition
v3: align firmware size to the gpu page size

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Piotr Redlewski <predlewski@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-12-06 12:47:22 -05:00
..
2017-12-04 16:33:12 -05:00
2017-07-14 11:06:10 -04:00
2015-06-03 21:03:15 -04:00
2017-10-20 13:28:44 -04:00
2015-06-03 21:03:15 -04:00
2017-09-28 16:03:30 -04:00
2017-09-28 16:03:30 -04:00
2017-09-26 15:14:22 -04:00
2017-09-26 17:01:32 -04:00
2015-06-03 21:03:17 -04:00
2017-09-26 15:14:22 -04:00
2016-08-31 15:21:09 -04:00
2017-05-24 17:41:17 -04:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00
2017-12-06 12:47:22 -05:00