Skip to content

Commit 23346f8

Browse files
matt-auldThomas Hellström
authored andcommitted
drm/xe/migrate: fix pat index usage
XE_CACHE_WB must be converted into the per-platform pat index for that particular caching mode, otherwise we are just encoding whatever happens to be the value of that enum. Fixes: e8babb2 ("drm/xe: Convert multiple bind ops into single job") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Cc: <stable@vger.kernel.org> # v6.12+ Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241126181259.159713-3-matthew.auld@intel.com (cherry picked from commit f3dc924) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 87651f3 commit 23346f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/xe/xe_migrate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ __xe_migrate_update_pgtables(struct xe_migrate *m,
13501350

13511351
/* For sysmem PTE's, need to map them in our hole.. */
13521352
if (!IS_DGFX(xe)) {
1353+
u16 pat_index = xe->pat.idx[XE_CACHE_WB];
13531354
u32 ptes, ofs;
13541355

13551356
ppgtt_ofs = NUM_KERNEL_PDE - 1;
@@ -1409,7 +1410,7 @@ __xe_migrate_update_pgtables(struct xe_migrate *m,
14091410
pt_bo->update_index = current_update;
14101411

14111412
addr = vm->pt_ops->pte_encode_bo(pt_bo, 0,
1412-
XE_CACHE_WB, 0);
1413+
pat_index, 0);
14131414
bb->cs[bb->len++] = lower_32_bits(addr);
14141415
bb->cs[bb->len++] = upper_32_bits(addr);
14151416
}

0 commit comments

Comments
 (0)