aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/scheduler/sched_fence.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2015-08-19 13:00:55 +0000
committerAlex Deucher <[email protected]>2015-08-25 14:39:16 +0000
commitce882e6dc241ab8dded0eeeb33a86482d44a5689 (patch)
tree68d6186455e22e552efb3b5f46214e6d37540e07 /drivers/gpu/drm/amd/scheduler/sched_fence.c
parentdrm/amdgpu: improve sa_bo->fence by kernel fence (diff)
downloadkernel-ce882e6dc241ab8dded0eeeb33a86482d44a5689.tar.gz
kernel-ce882e6dc241ab8dded0eeeb33a86482d44a5689.zip
drm/amdgpu: remove v_seq handling from the scheduler v2
Simply not used any more. Only keep 32bit atomic for fence sequence numbering. v2: trivial rebase Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Jammy Zhou <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> (v1)
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/sched_fence.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/sched_fence.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/sched_fence.c b/drivers/gpu/drm/amd/scheduler/sched_fence.c
index a4751598c0b4..266ed7bbbc74 100644
--- a/drivers/gpu/drm/amd/scheduler/sched_fence.c
+++ b/drivers/gpu/drm/amd/scheduler/sched_fence.c
@@ -30,16 +30,19 @@
struct amd_sched_fence *amd_sched_fence_create(struct amd_sched_entity *s_entity)
{
struct amd_sched_fence *fence = NULL;
+ unsigned seq;
+
fence = kzalloc(sizeof(struct amd_sched_fence), GFP_KERNEL);
if (fence == NULL)
return NULL;
- fence->v_seq = atomic64_inc_return(&s_entity->last_queued_v_seq);
+
fence->entity = s_entity;
spin_lock_init(&fence->lock);
- fence_init(&fence->base, &amd_sched_fence_ops,
- &fence->lock,
- s_entity->fence_context,
- fence->v_seq);
+
+ seq = atomic_inc_return(&s_entity->fence_seq);
+ fence_init(&fence->base, &amd_sched_fence_ops, &fence->lock,
+ s_entity->fence_context, seq);
+
return fence;
}