Skip to content

Commit 8eb7fcc

Browse files
committed
drm/i915/migrate: don't check the scratch page
The scratch page might not be allocated in LMEM(like on DG2), so instead of using that as the deciding factor for where the paging structures live, let's just query the pt before mapping it. Signed-off-by: Matthew Auld <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Ramalingam C <[email protected]> Reviewed-by: Ramalingam C <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 491fe46 commit 8eb7fcc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/i915/gt/intel_migrate.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
struct insert_pte_data {
1515
u64 offset;
16-
bool is_lmem;
1716
};
1817

1918
#define CHUNK_SZ SZ_8M /* ~1ms at 8GiB/s preemption delay */
@@ -40,7 +39,7 @@ static void insert_pte(struct i915_address_space *vm,
4039
struct insert_pte_data *d = data;
4140

4241
vm->insert_page(vm, px_dma(pt), d->offset, I915_CACHE_NONE,
43-
d->is_lmem ? PTE_LM : 0);
42+
i915_gem_object_is_lmem(pt->base) ? PTE_LM : 0);
4443
d->offset += PAGE_SIZE;
4544
}
4645

@@ -134,7 +133,6 @@ static struct i915_address_space *migrate_vm(struct intel_gt *gt)
134133
goto err_vm;
135134

136135
/* Now allow the GPU to rewrite the PTE via its own ppGTT */
137-
d.is_lmem = i915_gem_object_is_lmem(vm->vm.scratch[0]);
138136
vm->vm.foreach(&vm->vm, base, base + sz, insert_pte, &d);
139137
}
140138

0 commit comments

Comments
 (0)