drm/xe: add XE_BO_FLAG_PINNED_LATE_RESTORE
authorMatthew Auld <matthew.auld@intel.com>
Thu, 3 Apr 2025 10:24:45 +0000 (11:24 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 4 Apr 2025 10:41:05 +0000 (11:41 +0100)
commit7f387e6012b67592420c9ac92fd82911232ddd39
tree506786af147bed2556d5fef8842f76a4279d9fd0
parent58fa61ce4a0d13614a98479734b7f1ac2027615a
drm/xe: add XE_BO_FLAG_PINNED_LATE_RESTORE

With the idea of having more pinned objects using the blitter engine
where possible, during suspend/resume, mark the pinned objects which
can be done during the late phase once submission/migration has been
setup. Start out simple with lrc and page-tables from userspace.

v2:
 - s/early_restore/late_restore; early restore was way too bold with too
   many places being impacted at once.
v3:
 - Split late vs early into separate lists, to align with newly added
   apply-to-pinned infra.
v4:
 - Rebase.
v5:
 - Make sure we restore the late phase kernel_bo_present in igpu.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Link: https://lore.kernel.org/r/20250403102440.266113-13-matthew.auld@intel.com
drivers/gpu/drm/xe/tests/xe_bo.c
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_bo_evict.c
drivers/gpu/drm/xe/xe_bo_evict.h
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_lrc.c
drivers/gpu/drm/xe/xe_pm.c
drivers/gpu/drm/xe/xe_pt.c