aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorSimon Richter <Simon.Richter@hogyros.de>2025-08-18 15:47:35 +0900
committerMatthew Brost <matthew.brost@intel.com>2025-08-18 10:52:31 -0700
commitb85bb2d677153d990924d31be9416166d22382eb (patch)
treeb16b57aba71a9b146cada5d54a387f12cc889ffd /drivers/gpu/drm
parentdrm/xe: Untangle vm_bind_ioctl cleanup order (diff)
downloadlinux-b85bb2d677153d990924d31be9416166d22382eb.tar.gz
linux-b85bb2d677153d990924d31be9416166d22382eb.zip
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: Simon Richter <Simon.Richter@hogyros.de> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20250818064806.2835-1-Simon.Richter@hogyros.de
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/xe/xe_migrate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index ddfad7506a82..57e6d5a8ac39 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -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 +