From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: Re: [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation
Date: Mon, 25 Aug 2025 17:38:31 +0200 [thread overview]
Message-ID: <7ab48a20d83006a1aa4393dd91cd8cf74aed5538.camel@linux.intel.com> (raw)
In-Reply-To: <20250825152841.3837378-1-matthew.brost@intel.com>
On Mon, 2025-08-25 at 08:28 -0700, Matthew Brost wrote:
> On the first validate of an imported dma-buf (initial bind), the
> device
> has no GPU mappings, so a rebind is unnecessary. Rebinding here is
> harmful in multi-GPU setups and for VMs using preempt-fence mode, as
> it
> would evict in-flight GPU work.
>
> v2:
> - Drop dma_buf_validated, check for XE_PL_SYSTEM (Thomas)
>
> Signed-off-by: Matthee Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_bo.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index 6fea39842e1e..a0630e120cd2 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -816,7 +816,8 @@ static int xe_bo_move(struct ttm_buffer_object
> *ttm_bo, bool evict,
> }
>
> if (ttm_bo->type == ttm_bo_type_sg) {
> - ret = xe_bo_move_notify(bo, ctx);
> + if (new_mem->mem_type == XE_PL_SYSTEM)
> + ret = xe_bo_move_notify(bo, ctx);
> if (!ret)
> ret = xe_bo_move_dmabuf(ttm_bo, new_mem);
> return ret;
LGTM. If CI is happy,
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
next prev parent reply other threads:[~2025-08-25 15:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-25 15:28 [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation Matthew Brost
2025-08-25 15:38 ` Thomas Hellström [this message]
2025-08-25 15:51 ` ✗ CI.checkpatch: warning for drm/xe: Don't trigger rebind on initial dma-buf validation (rev2) Patchwork
2025-08-25 15:53 ` ✓ CI.KUnit: success " Patchwork
2025-08-25 16:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-25 22:41 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-26 12:42 ` [PATCH v2] drm/xe: Don't trigger rebind on initial dma-buf validation Upadhyay, Tejas
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=7ab48a20d83006a1aa4393dd91cd8cf74aed5538.camel@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--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 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.