[PATCH] drm/xe/vm: Use xe_vm_lock() helper for locking

Ghimiray, Himal Prasad himal.prasad.ghimiray at intel.com
Wed Apr 24 02:26:34 UTC 2024


On 23-04-2024 22:46, Matthew Brost wrote:
> On Tue, Apr 23, 2024 at 08:21:34AM -0700, Dixit, Ashutosh wrote:
>> On Tue, 23 Apr 2024 00:03:32 -0700, Himal Prasad Ghimiray wrote:
>> Hi Himal,
>>
>>> There is no change in functionality. Using the helper function
>>> defined within the driver.
>>>
>>> Cc: Matthew Brost<matthew.brost at intel.com>
>>> Signed-off-by: Himal Prasad Ghimiray<himal.prasad.ghimiray at intel.com>
>>> ---
>>>   drivers/gpu/drm/xe/xe_vm.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
>>> index 85d6f359142d..e9c8dc6d7b83 100644
>>> --- a/drivers/gpu/drm/xe/xe_vm.c
>>> +++ b/drivers/gpu/drm/xe/xe_vm.c
>>> @@ -1279,7 +1279,7 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
>>>
>>> 	drm_gem_object_put(vm_resv_obj);
>>>
>>> -	err = dma_resv_lock_interruptible(xe_vm_resv(vm), NULL);
>>> +	err = xe_vm_lock(vm, true);
>>> 	if (err)
>>> 		goto err_close;
>> But isn't dma_resv_lock coupled with dma_resv_unlock? So that should also
>> be changed, if at all? And what about other places in Xe which still
> Yes, this function should be updated with s/dma_resv_unlock/xe_vm_unlock
> now.


Thank you, Ashutosh/Matt, for bringing this to my attention. It was an 
oversight on my part, and I will update it in the next version

>
>> contain dma_resv_lock_interruptible?
>>
> I found two places that also could be updated to use the locking
> wrappers:
>
> xe_lrc_snapshot_capture_delayed should be updated with xe_bo_lock
> xe_vm_snapshot_capture_delayed should be updated with xe_bo_lock


Will upload a patch to take care of this.

Thanks.


>
> Matt
>
>> Ashutosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20240424/6b14d1bb/attachment-0001.htm>


More information about the Intel-xe mailing list