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 15:33:52 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:19:43 -0400
commit8b2cf4f5758f172d0980688383cea83241dc59e6 (patch)
treedea28b35a45f830eb799568a2061c29d9266cf18 /drivers/gpu/drm/radeon/uvd_v4_2.c
parent7050c6ef5f0e9bc5e6bf9eb035320b70f731b919 (diff)
drm/radeon: handle more than 10 UVD sessions
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, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/uvd_v4_2.c b/drivers/gpu/drm/radeon/uvd_v4_2.c
index 205562fa31e3..91613b8a9dc9 100644
--- a/drivers/gpu/drm/radeon/uvd_v4_2.c
+++ b/drivers/gpu/drm/radeon/uvd_v4_2.c
@@ -53,12 +53,13 @@ int uvd_v4_2_resume(struct radeon_device *rdev)
WREG32(UVD_VCPU_CACHE_SIZE0, size);
addr += size;
- size = RADEON_UVD_STACK_SIZE >> 3;
+ size = RADEON_UVD_HEAP_SIZE >> 3;
WREG32(UVD_VCPU_CACHE_OFFSET1, addr);
WREG32(UVD_VCPU_CACHE_SIZE1, size);
addr += size;
- size = RADEON_UVD_HEAP_SIZE >> 3;
+ size = (RADEON_UVD_STACK_SIZE +
+ (RADEON_UVD_SESSION_SIZE * rdev->uvd.max_handles)) >> 3;
WREG32(UVD_VCPU_CACHE_OFFSET2, addr);
WREG32(UVD_VCPU_CACHE_SIZE2, size);
@@ -70,5 +71,8 @@ int uvd_v4_2_resume(struct radeon_device *rdev)
addr = (rdev->uvd.gpu_addr >> 32) & 0xFF;
WREG32(UVD_LMI_EXT40_ADDR, addr | (0x9 << 16) | (0x1 << 31));
+ if (rdev->uvd.fw_header_present)
+ WREG32(UVD_GP_SCRATCH4, rdev->uvd.max_handles);
+
return 0;
}