All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: michal.mrozek@intel.com, himal.prasad.ghimiray@intel.com,
	francois.dugast@intel.com, thomas.hellstrom@linux.intel.com,
	matthew.auld@intel.com
Subject: [PATCH 3/3] drm/xe: Enable compressed memory for SVM
Date: Mon, 14 Jul 2025 10:33:42 -0700	[thread overview]
Message-ID: <20250714173342.2997396-4-matthew.brost@intel.com> (raw)
In-Reply-To: <20250714173342.2997396-1-matthew.brost@intel.com>

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_migrate.c | 10 ++++++++--
 drivers/gpu/drm/xe/xe_vm.c      |  5 +----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 936daa2b363d..0519b9025e0f 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -1723,8 +1723,11 @@ struct dma_fence *xe_migrate_to_vram(struct xe_migrate *m,
 				     dma_addr_t *src_addr,
 				     u64 dst_addr)
 {
+	struct xe_device *xe = gt_to_xe(m->tile->primary_gt);
+
 	return xe_migrate_vram(m, npages * PAGE_SIZE, 0, src_addr, dst_addr,
-			       XE_MIGRATE_COPY_TO_VRAM, false);
+			       XE_MIGRATE_COPY_TO_VRAM,
+			       xe_migrate_needs_ccs_emit(xe));
 }
 
 /**
@@ -1744,8 +1747,11 @@ struct dma_fence *xe_migrate_from_vram(struct xe_migrate *m,
 				       u64 src_addr,
 				       dma_addr_t *dst_addr)
 {
+	struct xe_device *xe = gt_to_xe(m->tile->primary_gt);
+
 	return xe_migrate_vram(m, npages * PAGE_SIZE, 0, dst_addr, src_addr,
-			       XE_MIGRATE_COPY_TO_SRAM, false);
+			       XE_MIGRATE_COPY_TO_SRAM,
+			       xe_migrate_needs_ccs_emit(xe));
 }
 
 static void xe_migrate_dma_unmap(struct xe_device *xe, dma_addr_t *dma_addr,
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 73cb981c0956..2035604121e6 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2362,10 +2362,7 @@ vm_bind_ioctl_ops_create(struct xe_vm *vm, struct xe_vma_ops *vops,
 			op->map.is_cpu_addr_mirror = flags &
 				DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR;
 			op->map.dumpable = flags & DRM_XE_VM_BIND_FLAG_DUMPABLE;
-			if (op->map.is_cpu_addr_mirror)
-				op->map.pat_index = 0;
-			else
-				op->map.pat_index = pat_index;
+			op->map.pat_index = pat_index;
 			op->map.invalidate_on_bind =
 				__xe_vm_needs_clear_scratch_pages(vm, flags);
 		} else if (__op->op == DRM_GPUVA_OP_PREFETCH) {
-- 
2.34.1


  parent reply	other threads:[~2025-07-14 17:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 17:33 [PATCH 0/3] SVM compression fixes Matthew Brost
2025-07-14 17:33 ` [PATCH 1/3] drm/xe: Disable compression on SVM Matthew Brost
2025-07-15  8:15   ` Matthew Auld
2025-07-15  8:26     ` Ghimiray, Himal Prasad
2025-07-15 15:55       ` Matthew Brost
2025-07-15  8:25   ` Ghimiray, Himal Prasad
2025-07-15 15:55     ` Matthew Brost
2025-07-14 17:33 ` [PATCH 2/3] drm/xe: Update xe_migrate_vram to support compression Matthew Brost
2025-07-15  8:37   ` Matthew Auld
2025-07-15  8:49     ` Matthew Auld
2025-07-15 15:58       ` Matthew Brost
2025-07-14 17:33 ` Matthew Brost [this message]
2025-07-14 17:43 ` ✗ CI.checkpatch: warning for SVM compression fixes Patchwork
2025-07-14 17:45 ` ✓ CI.KUnit: success " Patchwork
2025-07-14 18:25 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-14 20:20 ` ✗ Xe.CI.Full: failure " Patchwork
2025-07-15 12:59 ` [PATCH 0/3] " Matthew Auld
2025-07-15 16:25   ` Matthew Brost

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=20250714173342.2997396-4-matthew.brost@intel.com \
    --to=matthew.brost@intel.com \
    --cc=francois.dugast@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=michal.mrozek@intel.com \
    --cc=thomas.hellstrom@linux.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.