drm/xe/exec_queue: Remove duplicated code
authorFrancois Dugast <francois.dugast@intel.com>
Fri, 9 Aug 2024 15:51:30 +0000 (17:51 +0200)
committerMatthew Brost <matthew.brost@intel.com>
Sun, 18 Aug 2024 01:31:53 +0000 (18:31 -0700)
This code section is the same as the body of
xe_exec_queue_last_fence_put_unlocked() so call the function instead and
remove duplicated code to make maintenance easier.

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809155156.1955925-6-francois.dugast@intel.com
drivers/gpu/drm/xe/xe_exec_queue.c

index ebc80add10aca4b4ebad00431ba5b15a4acd0cc0..3ce4582504f9e1e0e3878ce36a883717367ad824 100644 (file)
@@ -852,10 +852,7 @@ void xe_exec_queue_last_fence_put(struct xe_exec_queue *q, struct xe_vm *vm)
 {
        xe_exec_queue_last_fence_lockdep_assert(q, vm);
 
-       if (q->last_fence) {
-               dma_fence_put(q->last_fence);
-               q->last_fence = NULL;
-       }
+       xe_exec_queue_last_fence_put_unlocked(q);
 }
 
 /**