Commit b85bb2d6 authored by Simon Richter's avatar Simon Richter Committed by Matthew Brost
Browse files

drm/xe: Make page size consistent in loop



If PAGE_SIZE != XE_PAGE_SIZE (which is currently locked behind
CONFIG_BROKEN), this would generate the wrong number of PDEs.

Since these PDEs are consumed by the GPU, the GPU page size needs to be
used.

Signed-off-by: default avatarSimon Richter <Simon.Richter@hogyros.de>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250818064806.2835-1-Simon.Richter@hogyros.de
parent aa81d55a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ static int xe_migrate_prepare_vm(struct xe_tile *tile, struct xe_migrate *m,
	}

	/* Write PDE's that point to our BO. */
	for (i = 0; i < map_ofs / PAGE_SIZE; i++) {
	for (i = 0; i < map_ofs / XE_PAGE_SIZE; i++) {
		entry = vm->pt_ops->pde_encode_bo(bo, (u64)i * XE_PAGE_SIZE);

		xe_map_wr(xe, &bo->vmap, map_ofs + XE_PAGE_SIZE +