]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Standardize pat_index to u16 type
authorXin Wang <x.wang@intel.com>
Thu, 16 Apr 2026 04:55:24 +0000 (21:55 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Tue, 21 Apr 2026 17:20:17 +0000 (10:20 -0700)
Ensure all pat_index definitions consistently use u16 type across
the XE driver. This addresses two remaining instances where pat_index
was incorrectly typed:

- xe_vm_snapshot structure used int for pat_index field
- xe_device pat.idx array used u32 instead of u16

This cleanup improves type consistency and ensures proper alignment
with the PAT subsystem design.

Signed-off-by: Xin Wang <x.wang@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260416045526.536497-2-x.wang@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_vm.c

index e9e11bb1c65ff34a2f68ca6395f7172b4974ce2b..89437de3001a704d4f2b61933f9f892068612730 100644 (file)
@@ -401,7 +401,7 @@ struct xe_device {
                const struct xe_pat_table_entry *pat_primary_pta;
                /** @pat.pat_media_pta: media GT PAT entry for page table accesses */
                const struct xe_pat_table_entry *pat_media_pta;
-               u32 idx[__XE_CACHE_LEVEL_COUNT];
+               u16 idx[__XE_CACHE_LEVEL_COUNT];
        } pat;
 
        /** @d3cold: Encapsulate d3cold related stuff */
index 2408b547ca3dd31f1e8f42ae849623d0802fdd11..f97c7af2f17cac552ff0b0e8d5adf68ff73b2afc 100644 (file)
@@ -4407,7 +4407,7 @@ struct xe_vm_snapshot {
 #define XE_VM_SNAP_FLAG_IS_NULL                BIT(2)
                unsigned long flags;
                int uapi_mem_region;
-               int pat_index;
+               u16 pat_index;
                int cpu_caching;
                struct xe_bo *bo;
                void *data;