All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Ashutosh Dixit <ashutosh.dixit@intel.com>
Subject: Re: [PATCH 2/2] drm/xe: Use xe_bo_lock()/xe_bo_unlock() helpers
Date: Wed, 24 Apr 2024 03:55:49 +0000	[thread overview]
Message-ID: <ZiiCxXA1GsldutR2@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240424035756.2169209-3-himal.prasad.ghimiray@intel.com>

On Wed, Apr 24, 2024 at 09:27:56AM +0530, Himal Prasad Ghimiray wrote:
> There is no change in functionality. Using the helper function
> defined within the driver for locking/unlocking the reservation
> object.
> 
> Cc: Matthew Brost <matthew.brost@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Suggested-by: Matthew Brost <matthew.brost@intel.com>

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

> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_lrc.c | 4 ++--
>  drivers/gpu/drm/xe/xe_vm.c  | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
> index 615bbc372ac6..2066d34ddf0b 100644
> --- a/drivers/gpu/drm/xe/xe_lrc.c
> +++ b/drivers/gpu/drm/xe/xe_lrc.c
> @@ -1382,7 +1382,7 @@ void xe_lrc_snapshot_capture_delayed(struct xe_lrc_snapshot *snapshot)
>  	if (!snapshot->lrc_snapshot)
>  		goto put_bo;
>  
> -	dma_resv_lock(bo->ttm.base.resv, NULL);
> +	xe_bo_lock(bo, false);
>  	if (!ttm_bo_vmap(&bo->ttm, &src)) {
>  		xe_map_memcpy_from(xe_bo_device(bo),
>  				   snapshot->lrc_snapshot, &src, snapshot->lrc_offset,
> @@ -1392,7 +1392,7 @@ void xe_lrc_snapshot_capture_delayed(struct xe_lrc_snapshot *snapshot)
>  		kvfree(snapshot->lrc_snapshot);
>  		snapshot->lrc_snapshot = NULL;
>  	}
> -	dma_resv_unlock(bo->ttm.base.resv);
> +	xe_bo_unlock(bo);
>  put_bo:
>  	xe_bo_put(bo);
>  }
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index c350c561e7d9..6606e2a32e2b 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3335,7 +3335,7 @@ void xe_vm_snapshot_capture_delayed(struct xe_vm_snapshot *snap)
>  		}
>  
>  		if (bo) {
> -			dma_resv_lock(bo->ttm.base.resv, NULL);
> +			xe_bo_lock(bo, false);
>  			err = ttm_bo_vmap(&bo->ttm, &src);
>  			if (!err) {
>  				xe_map_memcpy_from(xe_bo_device(bo),
> @@ -3344,7 +3344,7 @@ void xe_vm_snapshot_capture_delayed(struct xe_vm_snapshot *snap)
>  						   snap->snap[i].len);
>  				ttm_bo_vunmap(&bo->ttm, &src);
>  			}
> -			dma_resv_unlock(bo->ttm.base.resv);
> +			xe_bo_unlock(bo);
>  		} else {
>  			void __user *userptr = (void __user *)(size_t)snap->snap[i].bo_ofs;
>  
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-04-24  3:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  3:57 [PATCH v2 0/2] Use the helpers for locking/unlocking resv object Himal Prasad Ghimiray
2024-04-24  3:57 ` [PATCH 1/2] drm/xe/vm: Use xe_vm_lock()/xe_vm_unlock() helpers Himal Prasad Ghimiray
2024-04-24  3:54   ` Matthew Brost
2024-04-24  3:57     ` Ghimiray, Himal Prasad
2024-04-24  4:05       ` Nilawar, Badal
2024-04-24  4:09         ` Nilawar, Badal
2024-04-24  3:57 ` [PATCH 2/2] drm/xe: Use xe_bo_lock()/xe_bo_unlock() helpers Himal Prasad Ghimiray
2024-04-24  3:55   ` Matthew Brost [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-24  4:39 [PATCHi v3 0/2] Use the helpers for locking/unlocking resv object Himal Prasad Ghimiray
2024-04-24  4:39 ` [PATCH 2/2] drm/xe: Use xe_bo_lock()/xe_bo_unlock() helpers Himal Prasad Ghimiray
2024-04-24  3:45 [PATCH 0/2] Use the helpers for locking/unlocking resv object Himal Prasad Ghimiray
2024-04-24  3:45 ` [PATCH 2/2] drm/xe: Use xe_bo_lock()/xe_bo_unlock() helpers Himal Prasad Ghimiray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZiiCxXA1GsldutR2@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.