summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/uvd_v4_2.c
diff options
context:
space:
mode:
authorArindam Nath <arindam.nath@amd.com>2016-04-06 22:33:51 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-05-05 03:19:35 +0300
commit7050c6ef5f0e9bc5e6bf9eb035320b70f731b919 (patch)
treedfa4df5d70b954551999ace972f998ee93371d57 /drivers/gpu/drm/radeon/uvd_v4_2.c
parent794f50b95d40bbde905c3c4c514a33fdda54f497 (diff)
downloadlinux-7050c6ef5f0e9bc5e6bf9eb035320b70f731b919.tar.xz
drm/radeon: add support for loading new UVD fw
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Arindam Nath <arindam.nath@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/uvd_v4_2.c')
-rw-r--r--drivers/gpu/drm/radeon/uvd_v4_2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/uvd_v4_2.c b/drivers/gpu/drm/radeon/uvd_v4_2.c
index d04d5073eef2..205562fa31e3 100644
--- a/drivers/gpu/drm/radeon/uvd_v4_2.c
+++ b/drivers/gpu/drm/radeon/uvd_v4_2.c
@@ -41,7 +41,13 @@ int uvd_v4_2_resume(struct radeon_device *rdev)
uint32_t size;
/* programm the VCPU memory controller bits 0-27 */
- addr = rdev->uvd.gpu_addr >> 3;
+
+ /* skip over the header of the new firmware format */
+ if (rdev->uvd.fw_header_present)
+ addr = (rdev->uvd.gpu_addr + 0x200) >> 3;
+ else
+ addr = rdev->uvd.gpu_addr >> 3;
+
size = RADEON_GPU_PAGE_ALIGN(rdev->uvd_fw->size + 4) >> 3;
WREG32(UVD_VCPU_CACHE_OFFSET0, addr);
WREG32(UVD_VCPU_CACHE_SIZE0, size);