From: Matt Roper <matthew.d.roper@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.d.roper@intel.com
Subject: [PATCH v3 4/6] drm/xe: Assign GT IDs properly on multi-tile + multi-GT platforms
Date: Mon, 30 Jun 2025 10:34:43 -0700 [thread overview]
Message-ID: <20250630173438.2342706-12-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20250630173438.2342706-8-matthew.d.roper@intel.com>
Although "multi-tile" and "multiple GTs per tile" are mutually-exclusive
characteristics on all of our platforms today, this may not always be
true. Assign GT IDs according to xe->info.max_gt_per_tile in a way that
should work even if future platforms have different configurations.
This patch should not change the behavior of current platforms; it only
future-proofs for potential future designs.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/xe/xe_mmio.c | 8 --------
drivers/gpu/drm/xe/xe_pci.c | 14 ++++----------
2 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7357458bc0d2..b65d888ee8e4 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -82,14 +82,6 @@ static void mmio_multi_tile_setup(struct xe_device *xe, size_t tile_mmio_size)
drm_info(&xe->drm, "tile_count: %d, reduced_tile_count %d\n",
xe->info.tile_count, tile_count);
xe->info.tile_count = tile_count;
-
- /*
- * FIXME: Needs some work for standalone media, but
- * should be impossible with multi-tile for now:
- * multi-tile platform with standalone media doesn't
- * exist
- */
- xe->info.gt_count = xe->info.tile_count;
}
}
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 658bfbddf9a8..bccd81e19bb0 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -694,10 +694,11 @@ static int xe_info_init(struct xe_device *xe,
*/
for_each_tile(tile, xe, id) {
gt = tile->primary_gt;
- gt->info.id = xe->info.gt_count++;
gt->info.type = XE_GT_TYPE_MAIN;
+ gt->info.id = tile->id * xe->info.max_gt_per_tile;
gt->info.has_indirect_ring_state = graphics_desc->has_indirect_ring_state;
gt->info.engine_mask = graphics_desc->hw_engine_mask;
+ xe->info.gt_count++;
if (MEDIA_VER(xe) < 13 && media_desc)
gt->info.engine_mask |= media_desc->hw_engine_mask;
@@ -715,17 +716,10 @@ static int xe_info_init(struct xe_device *xe,
gt = tile->media_gt;
gt->info.type = XE_GT_TYPE_MEDIA;
+ gt->info.id = tile->id * xe->info.max_gt_per_tile + 1;
gt->info.has_indirect_ring_state = media_desc->has_indirect_ring_state;
gt->info.engine_mask = media_desc->hw_engine_mask;
-
- /*
- * FIXME: At the moment multi-tile and standalone media are
- * mutually exclusive on current platforms. We'll need to
- * come up with a better way to number GTs if we ever wind
- * up with platforms that support both together.
- */
- drm_WARN_ON(&xe->drm, id != 0);
- gt->info.id = xe->info.gt_count++;
+ xe->info.gt_count++;
}
return 0;
--
2.49.0
next prev parent reply other threads:[~2025-06-30 17:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 17:34 [PATCH v3 0/6] Future-proof for multi-tile + multi-GT cases Matt Roper
2025-06-30 17:34 ` [PATCH v3 1/6] drm/xe: Export xe_step_name for kunit tests Matt Roper
2025-06-30 23:54 ` Lucas De Marchi
2025-06-30 17:34 ` [PATCH v3 2/6] drm/xe: Track maximum GTs per tile on a per-platform basis Matt Roper
2025-07-01 5:05 ` Riana Tauro
2025-07-01 16:55 ` Matt Roper
2025-07-02 4:50 ` Riana Tauro
2025-06-30 17:34 ` [PATCH v3 3/6] drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count Matt Roper
2025-06-30 17:34 ` Matt Roper [this message]
2025-06-30 22:08 ` [PATCH v3 4/6] drm/xe: Assign GT IDs properly on multi-tile + multi-GT platforms Cavitt, Jonathan
2025-06-30 17:34 ` [PATCH v3 5/6] drm/xe: Don't compare GT ID to GT count when determining valid GTs Matt Roper
2025-06-30 22:08 ` Cavitt, Jonathan
2025-06-30 17:34 ` [PATCH v3 6/6] drm/xe/xe_query: Use separate iterator while filling GT list Matt Roper
2025-06-30 22:08 ` Cavitt, Jonathan
2025-06-30 22:14 ` Matt Roper
2025-06-30 22:15 ` [PATCH v3.1 " Matt Roper
2025-07-01 14:05 ` Cavitt, Jonathan
2025-07-01 7:31 ` ✗ CI.checkpatch: warning for Future-proof for multi-tile + multi-GT cases (rev4) Patchwork
2025-07-01 7:32 ` ✓ CI.KUnit: success " Patchwork
2025-07-01 8:10 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-07-01 16:18 ` ✗ CI.checkpatch: warning for Future-proof for multi-tile + multi-GT cases (rev5) Patchwork
2025-07-01 16:19 ` ✓ CI.KUnit: success " Patchwork
2025-07-02 22:41 ` ✗ Xe.CI.Full: failure for Future-proof for multi-tile + multi-GT cases (rev4) Patchwork
2025-07-02 23:14 ` Matt Roper
2025-07-02 23:22 ` Matt Roper
2025-07-03 10:23 ` ✗ Xe.CI.Full: failure for Future-proof for multi-tile + multi-GT cases (rev5) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250630173438.2342706-12-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox