drm/xe: Add xe_vm_has_valid_gpu_mapping helper
authorMatthew Brost <matthew.brost@intel.com>
Mon, 16 Jun 2025 06:30:23 +0000 (23:30 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Tue, 17 Jun 2025 22:38:11 +0000 (15:38 -0700)
commitfab76ce56538fdeb9baaf1bfc06f34532e04f9d7
treef1d006009ba723ef1ada254e54c1b3f0e21c9f92
parent1a5ce0c5b95b0624ebd44f574b98003a466973be
drm/xe: Add xe_vm_has_valid_gpu_mapping helper

Rather than having multiple READ_ONCE of the tile_* fields and comments
in code, use helper with kernel doc for single access point and clear
rules.

v3:
 - s/xe_vm_has_valid_gpu_pages/xe_vm_has_valid_gpu_mapping

Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250616063024.2059829-2-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_gt_pagefault.c
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_svm.c
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm.h