aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-04-13 22:27:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:22:48 -0400
commit66067ad73c384a1780421e48a72a69b393359aa7 (patch)
treef3ce48e9d291db22f6f2462e8cf076d4ab046e02 /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
parent1bf912ffa611bc91522f6e524568b747db6f4c9c (diff)
drm/amdgpu: double fence slot
we introduced vmid fence, so one hw submission could produce two fences. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 100f4c6a8c1b..50e95ab9615a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -352,9 +352,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
352 setup_timer(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback, 352 setup_timer(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback,
353 (unsigned long)ring); 353 (unsigned long)ring);
354 354
355 ring->fence_drv.num_fences_mask = num_hw_submission - 1; 355 ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1;
356 spin_lock_init(&ring->fence_drv.lock); 356 spin_lock_init(&ring->fence_drv.lock);
357 ring->fence_drv.fences = kcalloc(num_hw_submission, sizeof(void *), 357 ring->fence_drv.fences = kcalloc(num_hw_submission * 2, sizeof(void *),
358 GFP_KERNEL); 358 GFP_KERNEL);
359 if (!ring->fence_drv.fences) 359 if (!ring->fence_drv.fences)
360 return -ENOMEM; 360 return -ENOMEM;