Skip to content

Commit a3d1e6f

Browse files
matt-auldgregkh
authored andcommitted
drm/i915/migrate: don't check the scratch page
[ Upstream commit 8eb7fcc ] 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 <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211206112539.3149779-1-matthew.auld@intel.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5bc0b2f commit a3d1e6f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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)