]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe/migrate: fix chunk handling for 2M page emit
authorMatthew Auld <matthew.auld@intel.com>
Wed, 22 Oct 2025 16:38:32 +0000 (17:38 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 23 Oct 2025 09:48:36 +0000 (10:48 +0100)
commitfb188d8b00fc221fcc744109dfa29b9945c91913
treebcc11a98e037db1e31efc7e8a1bb3142fbaadcbf
parentaaeef7a9c8b9206039a588a23e4dc11dddbefe2d
drm/xe/migrate: fix chunk handling for 2M page emit

On systems with PAGE_SIZE > 4K the chunk will likely be rounded down to
zero, if say we have single 2M page, so one huge pte, since we also try
to align the chunk to PAGE_SIZE / XE_PAGE_SIZE, which will be 16 on 64K
systems. Make the ALIGN_DOWN conditional for 4K PTEs where we can
encounter gpu_page_size < PAGE_SIZE.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20251022163836.191405-4-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_migrate.c