Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Brost,  Matthew" <matthew.brost@intel.com>
Subject: Re: [Intel-xe] [PATCH 1/3] drm/xe: Handle unmapped userptr in analyze VM
Date: Fri, 9 Jun 2023 18:36:26 +0000	[thread overview]
Message-ID: <a4cebd962bf714b43ee92302ac8f95dca9988491.camel@intel.com> (raw)
In-Reply-To: <20230609182627.143150-2-matthew.brost@intel.com>

On Fri, 2023-06-09 at 11:26 -0700, Matthew Brost wrote:
> A corner exists where a userptr may have no mapping when analyze VM is
> called, handle this case.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_vm.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index d1c380ad7f6b..e4311c48cc54 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -3453,9 +3453,13 @@ int xe_analyze_vm(struct drm_printer *p, struct xe_vm *vm, int gt_id)
>  		if (is_userptr) {
>  			struct xe_res_cursor cur;
>  
> -			xe_res_first_sg(vma->userptr.sg, 0, XE_PAGE_SIZE,
> -					&cur);
> -			addr = xe_res_dma(&cur);
> +			if (vma->userptr.sg) {
> +				xe_res_first_sg(vma->userptr.sg, 0, XE_PAGE_SIZE,
> +						&cur);
> +				addr = xe_res_dma(&cur);
> +			} else {
> +				addr = 0;
> +			}
>  		} else {
>  			addr = __xe_bo_addr(vma->bo, 0, XE_PAGE_SIZE, &is_vram);
>  		}


  reply	other threads:[~2023-06-09 18:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 18:26 [Intel-xe] [PATCH 0/3] A rebind fixes Matthew Brost
2023-06-09 18:26 ` [Intel-xe] [PATCH 1/3] drm/xe: Handle unmapped userptr in analyze VM Matthew Brost
2023-06-09 18:36   ` Souza, Jose [this message]
2023-06-09 21:18   ` Thomas Hellström
2023-06-09 18:26 ` [Intel-xe] [PATCH 2/3] drm/xe: Ban a VM if rebind worker hits an error Matthew Brost
2023-06-09 18:34   ` Souza, Jose
2023-06-09 18:42     ` Souza, Jose
2023-06-09 20:16       ` Matthew Brost
2023-06-09 20:15     ` Matthew Brost
2023-06-09 21:10   ` Thomas Hellström
2023-06-12 15:47     ` Matthew Brost
2023-06-13 17:11       ` Thomas Hellström
2023-06-09 18:26 ` [Intel-xe] [PATCH 3/3] drm/xe: Use Xe ordered workqueue for rebind worker Matthew Brost
2023-06-09 18:35   ` Souza, Jose
2023-06-09 21:22   ` Thomas Hellström
2023-06-09 18:28 ` [Intel-xe] ✓ CI.Patch_applied: success for A rebind fixes Patchwork
2023-06-09 18:28 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-06-09 18:30 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-06-09 18:34 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-06-09 18:34 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-06-09 18:35 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-06-09 19:10 ` [Intel-xe] ○ CI.BAT: info " Patchwork

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=a4cebd962bf714b43ee92302ac8f95dca9988491.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox