Skip to content

Commit

Permalink
drm/xe: Add has_range_tlb_invalidation device attribute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Brost authored and Rodrigo Vivi committed Dec 19, 2023
1 parent 0335b53 commit 9d25e28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/xe/xe_device_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/xe/xe_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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, \
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9d25e28

Please sign in to comment.