Skip to content

Commit 206fa53

Browse files
saiteja13427mattrope
authored andcommitted
drm/xe: Refactor max_remote_tiles
max_remote_tiles is more related to the platform than the GT IP. Thus move it to platform descriptor from graphics descriptor. Note that the FIXME is no more required, thus it can be dropped. v2: Rebase v3: Change the position of comment (MattR) Signed-off-by: Sai Teja Pottumuttu <[email protected]> Reviewed-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Matt Roper <[email protected]>
1 parent e4afdef commit 206fa53

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

drivers/gpu/drm/xe/xe_pci.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ struct xe_device_desc {
5656
enum xe_platform platform;
5757

5858
u8 dma_mask_size;
59+
u8 max_remote_tiles:2;
5960

6061
u8 require_force_probe:1;
6162
u8 is_dgfx:1;
@@ -138,7 +139,6 @@ static const struct xe_graphics_desc graphics_xehpc = {
138139
BIT(XE_HW_ENGINE_CCS2) | BIT(XE_HW_ENGINE_CCS3),
139140

140141
XE_HP_FEATURES,
141-
.max_remote_tiles = 1,
142142
.va_bits = 57,
143143
.vm_max_level = 4,
144144
.vram_flags = XE_VRAM_FLAGS_NEED64K,
@@ -331,6 +331,7 @@ static const __maybe_unused struct xe_device_desc pvc_desc = {
331331
.dma_mask_size = 52,
332332
.has_display = false,
333333
.has_heci_gscfi = 1,
334+
.max_remote_tiles = 1,
334335
.require_force_probe = true,
335336
};
336337

@@ -641,6 +642,7 @@ static int xe_info_init_early(struct xe_device *xe,
641642
xe->info.probe_display = IS_ENABLED(CONFIG_DRM_XE_DISPLAY) &&
642643
xe_modparam.probe_display &&
643644
desc->has_display;
645+
xe->info.tile_count = 1 + desc->max_remote_tiles;
644646

645647
err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0);
646648
if (err)
@@ -707,17 +709,6 @@ static int xe_info_init(struct xe_device *xe,
707709
xe->info.has_range_tlb_invalidation = graphics_desc->has_range_tlb_invalidation;
708710
xe->info.has_usm = graphics_desc->has_usm;
709711

710-
/*
711-
* All platforms have at least one primary GT. Any platform with media
712-
* version 13 or higher has an additional dedicated media GT. And
713-
* depending on the graphics IP there may be additional "remote tiles."
714-
* All of these together determine the overall GT count.
715-
*
716-
* FIXME: 'tile_count' here is misnamed since the rest of the driver
717-
* treats it as the number of GTs rather than just the number of tiles.
718-
*/
719-
xe->info.tile_count = 1 + graphics_desc->max_remote_tiles;
720-
721712
for_each_remote_tile(tile, xe, id) {
722713
int err;
723714

@@ -726,6 +717,12 @@ static int xe_info_init(struct xe_device *xe,
726717
return err;
727718
}
728719

720+
/*
721+
* All platforms have at least one primary GT. Any platform with media
722+
* version 13 or higher has an additional dedicated media GT. And
723+
* depending on the graphics IP there may be additional "remote tiles."
724+
* All of these together determine the overall GT count.
725+
*/
729726
for_each_tile(tile, xe, id) {
730727
gt = tile->primary_gt;
731728
gt->info.id = xe->info.gt_count++;

drivers/gpu/drm/xe/xe_pci_types.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ struct xe_graphics_desc {
1919

2020
u64 hw_engine_mask; /* hardware engines provided by graphics IP */
2121

22-
u8 max_remote_tiles:2;
23-
2422
u8 has_asid:1;
2523
u8 has_atomic_enable_pte_bit:1;
2624
u8 has_flat_ccs:1;

0 commit comments

Comments
 (0)