drm/amdgpu: double fence slot
authorChunming Zhou <David1.Zhou@amd.com>
Thu, 14 Apr 2016 02:27:28 +0000 (10:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:22:48 +0000 (20:22 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

index 100f4c6a8c1b2bb2a3e9001083a7dd0a465af84d..50e95ab9615a31afb9b4416201b3cad5751d7b09 100644 (file)
@@ -352,9 +352,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
        setup_timer(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback,
                    (unsigned long)ring);
 
-       ring->fence_drv.num_fences_mask = num_hw_submission - 1;
+       ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1;
        spin_lock_init(&ring->fence_drv.lock);
-       ring->fence_drv.fences = kcalloc(num_hw_submission, sizeof(void *),
+       ring->fence_drv.fences = kcalloc(num_hw_submission * 2, sizeof(void *),
                                         GFP_KERNEL);
        if (!ring->fence_drv.fences)
                return -ENOMEM;