diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-02 00:52:41 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:34:20 +0300 |
commit | 37efea9ca2583990fbd706af0364ce9feb16bb1a (patch) | |
tree | a418bfc86772f7e7d20de1fc45505377b9346b07 /drivers/gpu/drm/xe/xe_device_types.h | |
parent | 933b78d678213f5c045c52cbc42bbee6653af250 (diff) | |
download | linux-37efea9ca2583990fbd706af0364ce9feb16bb1a.tar.xz |
drm/xe: Allow GT looping and lookup on standalone media
Allow xe_device_get_gt() and for_each_gt() to operate as expected on
platforms with standalone media.
FIXME: We need to figure out a consistent ID scheme for GTs. This patch
keeps the pre-existing behavior of 0/1 being the GT IDs for both PVC
(multi-tile) and MTL (multi-GT), but depending on the direction we
decide to go with uapi, we may change this in the future (e.g., to
return 0/1 on PVC and 0/2 on MTL). Or if we decide we only need to
expose tiles to userspace and not GTs, we may not even need ID numbers
for the GTs anymore.
v2:
- Restructure a bit to make the assertions more clear.
- Clarify in commit message that the goal here is to preserve existing
behavior; UAPI-visible changes may be introduced in the future once
we settle on what we really want.
v3:
- Store total GT count in xe_device for ease of lookup. (Brian)
- s/(id__++)/(id__)++/ (Gustavo)
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Brian Welty <brian.welty@intel.com>
Acked-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-29-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_device_types.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_device_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index 16a77703d429..3b50134cdcc0 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -184,6 +184,8 @@ struct xe_device { u8 vram_flags; /** @tile_count: Number of tiles */ u8 tile_count; + /** @gt_count: Total number of GTs for entire device */ + u8 gt_count; /** @vm_max_level: Max VM level */ u8 vm_max_level; |