summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pt.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-03-23 19:25:00 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:30:21 +0300
commit59ea53eecb7154a2ac8aa39f21f16a144be3eecc (patch)
tree127d08d4a705a6f1247791f9b1d48f335706c752 /drivers/gpu/drm/xe/xe_pt.c
parent99c5952fe36107ee57fa0ad7115ffa76222a8810 (diff)
downloadlinux-59ea53eecb7154a2ac8aa39f21f16a144be3eecc.tar.xz
drm/xe: Use BO's GT to determine dma_offset when programming PTEs
Rather than using the passed in GT, use the BO's GT determine dma_offset when programming PTEs as these two GT's could differ (i.e. mapping a BO from a remote GT). The BO's GT is correct GT to use as this where BO resides, while the passed in GT is where the mapping is created. v2: (Thomas) - Kernel doc, extra new line (CI) - Rebase to tip Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pt.c')
-rw-r--r--drivers/gpu/drm/xe/xe_pt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 64da98152455..7aa12f86e55b 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -758,10 +758,12 @@ xe_pt_stage_bind(struct xe_gt *gt, struct xe_vma *vma,
int ret;
if (is_vram) {
+ struct xe_gt *bo_gt = xe_bo_to_gt(bo);
+
xe_walk.default_pte = GEN12_PPGTT_PTE_LM;
if (vma && vma->use_atomic_access_pte_bit)
xe_walk.default_pte |= GEN12_USM_PPGTT_PTE_AE;
- xe_walk.dma_offset = gt->mem.vram.io_start -
+ xe_walk.dma_offset = bo_gt->mem.vram.io_start -
gt_to_xe(gt)->mem.vram.io_start;
xe_walk.cache = XE_CACHE_WB;
} else {