From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe: Adjust tile_present mask when skipping rebinds
Date: Wed, 01 Nov 2023 17:40:51 +0100 [thread overview]
Message-ID: <ddca518e22ac158cf6fb8a2f626376ef51ca3732.camel@linux.intel.com> (raw)
In-Reply-To: <20231031185014.1605381-1-matthew.brost@intel.com>
On Tue, 2023-10-31 at 11:50 -0700, Matthew Brost wrote:
> If a rebind is skipped the tile_present mask needs to be updated for
> the
> newly created vma to properly reflect the state of the vma.
>
> Reported-by: <christoph.manszewski@intel.com>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/xe/xe_vm.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 498c0b3e1d73..d26c90f0d702 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -2340,6 +2340,10 @@ static int xe_vma_op_commit(struct xe_vm *vm,
> struct xe_vma_op *op)
> op->flags |= XE_VMA_OP_COMMITTED;
> break;
> case DRM_GPUVA_OP_REMAP:
> + {
> + u8 tile_present =
> + gpuva_to_vma(op->base.remap.unmap->va)-
> >tile_present;
> +
> prep_vma_destroy(vm, gpuva_to_vma(op-
> >base.remap.unmap->va),
> true);
> op->flags |= XE_VMA_OP_COMMITTED;
> @@ -2348,15 +2352,21 @@ static int xe_vma_op_commit(struct xe_vm *vm,
> struct xe_vma_op *op)
> err |= xe_vm_insert_vma(vm, op->remap.prev);
> if (!err)
> op->flags |=
> XE_VMA_OP_PREV_COMMITTED;
> - if (!err && op->remap.skip_prev)
> + if (!err && op->remap.skip_prev) {
> + op->remap.prev->tile_present =
> + tile_present;
> op->remap.prev = NULL;
> + }
> }
> if (op->remap.next) {
> err |= xe_vm_insert_vma(vm, op->remap.next);
> if (!err)
> op->flags |=
> XE_VMA_OP_NEXT_COMMITTED;
> - if (!err && op->remap.skip_next)
> + if (!err && op->remap.skip_next) {
> + op->remap.next->tile_present =
> + tile_present;
> op->remap.next = NULL;
> + }
> }
>
> /* Adjust for partial unbind after removin VMA from
> VM */
> @@ -2365,6 +2375,7 @@ static int xe_vma_op_commit(struct xe_vm *vm,
> struct xe_vma_op *op)
> op->base.remap.unmap->va->va.range = op-
> >remap.range;
> }
> break;
> + }
> case DRM_GPUVA_OP_UNMAP:
> prep_vma_destroy(vm, gpuva_to_vma(op->base.unmap.va),
> true);
> op->flags |= XE_VMA_OP_COMMITTED;
prev parent reply other threads:[~2023-11-01 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 18:50 [Intel-xe] [PATCH] drm/xe: Adjust tile_present mask when skipping rebinds Matthew Brost
2023-10-31 20:21 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-10-31 20:21 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-10-31 20:22 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-01 16:40 ` Thomas Hellström [this message]
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=ddca518e22ac158cf6fb8a2f626376ef51ca3732.camel@linux.intel.com \
--to=thomas.hellstrom@linux.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 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.