[PATCH v7 05/13] drm/xe/exec_queue: Remove duplicated code

Matthew Brost matthew.brost at intel.com
Thu Aug 8 03:50:38 UTC 2024


On Wed, Aug 07, 2024 at 06:23:34PM +0200, Francois Dugast wrote:
> 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 at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_exec_queue.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index 77edb20aa21c..85da2a30a4a4 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -833,10 +833,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);
>  }
>  
>  /**
> -- 
> 2.43.0
> 


More information about the Intel-xe mailing list