diff options
author | Matthew Brost <matthew.brost@intel.com> | 2023-01-24 16:33:09 -0800 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-19 18:27:46 -0500 |
commit | 9d25e284ea468930b0310b432784eef45e83e378 (patch) | |
tree | a5d2391b868d2bd9d1f9a2fdfb3495452bcafed1 | |
parent | 0335b53cc48cab91bb089ee5c7558cc84da3958d (diff) |
drm/xe: Add has_range_tlb_invalidation device attribute
This will help implementing range based TLB invalidations.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_device_types.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index 81bc293fb240..ef723b08de89 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -87,6 +87,8 @@ struct xe_device { bool has_flat_ccs; /** @has_4tile: Whether tile-4 tiling is supported */ bool has_4tile; + /** @has_range_tlb_invalidation: Has range based TLB invalidations */ + bool has_range_tlb_invalidation; } info; /** @irq: device interrupt state */ diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 67fd9c3818f9..2482ce8e3df4 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -70,6 +70,7 @@ struct xe_device_desc { bool supports_usm; bool has_flat_ccs; bool has_4tile; + bool has_range_tlb_invalidation; }; #define PLATFORM(x) \ @@ -139,6 +140,7 @@ static const struct xe_device_desc dg1_desc = { .require_force_probe = true, \ .graphics_ver = 12, \ .graphics_rel = 50, \ + .has_range_tlb_invalidation = true, \ .has_flat_ccs = true, \ .dma_mask_size = 46, \ .max_tiles = 1, \ @@ -255,6 +257,7 @@ static const struct xe_device_desc mtl_desc = { .max_tiles = 2, .vm_max_level = 3, .media_ver = 13, + .has_range_tlb_invalidation = true, PLATFORM(XE_METEORLAKE), .extra_gts = xelpmp_gts, .platform_engine_mask = MTL_MAIN_ENGINES, @@ -407,6 +410,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xe->info.supports_usm = desc->supports_usm; xe->info.has_flat_ccs = desc->has_flat_ccs; xe->info.has_4tile = desc->has_4tile; + xe->info.has_range_tlb_invalidation = desc->has_range_tlb_invalidation; spd = subplatform_get(xe, desc); xe->info.subplatform = spd ? spd->subplatform : XE_SUBPLATFORM_NONE; |