diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2024-08-14 10:50:12 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2024-08-16 12:56:31 -0700 |
commit | 1787191f4c76990c4b2ac52217559d97a7627cdd (patch) | |
tree | c137bd56bf53deab3bb32862fde734d1a399ca26 /lib/xe | |
parent | c0ffc8107215a8d59f8b8a7e347efdfc75acc8e3 (diff) |
lib/xe: Add XE_MAX_ENGINE_INSTANCE
Replace all the duplicate defines of MAX_INSTANCE with a better one in
xe_query.h.
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20240814175013.3679997-1-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'lib/xe')
-rw-r--r-- | lib/xe/xe_query.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h index 054cd6343..fd1155f7f 100644 --- a/lib/xe/xe_query.h +++ b/lib/xe/xe_query.h @@ -76,6 +76,12 @@ struct xe_device { #define XE_IS_CLASS_SYSMEM(__region) ((__region)->mem_class == DRM_XE_MEM_REGION_CLASS_SYSMEM) #define XE_IS_CLASS_VRAM(__region) ((__region)->mem_class == DRM_XE_MEM_REGION_CLASS_VRAM) +/* + * Max possible engine instance in drm_xe_engine_class_instance::engine_instance. Only + * used to declare arrays of drm_xe_engine_class_instance + */ +#define XE_MAX_ENGINE_INSTANCE 9 + unsigned int xe_number_gt(int fd); uint64_t all_memory_regions(int fd); uint64_t system_memory(int fd); |