[PATCH] drm/xe: Remove redundant rebind from preempt rebind worker

Cavitt, Jonathan jonathan.cavitt at intel.com
Tue Nov 12 21:47:39 UTC 2024


-----Original Message-----
From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Matthew Brost
Sent: Tuesday, November 12, 2024 1:41 PM
To: intel-xe at lists.freedesktop.org
Subject: [PATCH] drm/xe: Remove redundant rebind from preempt rebind worker
> 
> We issue a rebind in xe_preempt_work_begin so no need to call
> xe_vm_rebind again in the preempt rebind worker.

The call to xe_vm_rebind in xe_preempt_work_begin passes a rebind_worker value of "false",
whereas the call in preempt_rebind_work_func passes a rebind_worker value of "true".
Ergo, I think the execution requirements are different enough to warrant two separate calls.

I could be wrong, though, so I won't nack.
-Jonathan Cavitt

> 
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_vm.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 624133fae5f5..756c72cd6048 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -525,10 +525,6 @@ static void preempt_rebind_work_func(struct work_struct *w)
>  	if (err)
>  		goto out_unlock;
>  
> -	err = xe_vm_rebind(vm, true);
> -	if (err)
> -		goto out_unlock;
> -
>  	/* Wait on rebinds and munmap style VM unbinds */
>  	wait = dma_resv_wait_timeout(xe_vm_resv(vm),
>  				     DMA_RESV_USAGE_KERNEL,
> -- 
> 2.34.1
> 
> 


More information about the Intel-xe mailing list