From: "Bhadane, Dnyaneshwar" <dnyaneshwar.bhadane@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 9/9] drm/xe: Add tile_count to xe_probed_info
Date: Fri, 19 Jun 2026 23:35:19 +0530 [thread overview]
Message-ID: <1ebdeefd-2d89-4864-8bb4-d8003d317220@intel.com> (raw)
In-Reply-To: <20260609-xe-probe-info-v1-9-21e83e188e60@intel.com>
On 10-Jun-26 1:47 AM, Gustavo Sousa wrote:
> On multi-tile platforms, we need to probe the hardware for the number
> of tiles that are present in the platform. That means that we should
> do that as part of xe_probe_info() instead of xe_info_init(). Do
> that.
>
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
LGTM,
Reviewed-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
> ---
> drivers/gpu/drm/xe/tests/xe_pci.c | 11 ++---------
> drivers/gpu/drm/xe/xe_pci.c | 27 +++++++++++++--------------
> 2 files changed, 15 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
> index 31ec41aa997d..8df9029afcd3 100644
> --- a/drivers/gpu/drm/xe/tests/xe_pci.c
> +++ b/drivers/gpu/drm/xe/tests/xe_pci.c
> @@ -311,17 +311,13 @@ const void *xe_pci_id_gen_param(struct kunit *test, const void *prev, char *desc
> }
> EXPORT_SYMBOL_IF_KUNIT(xe_pci_id_gen_param);
>
> -static void fake_xe_info_probe_tile_count(struct xe_device *xe,
> - const struct xe_device_desc *desc)
> -{
> - xe->info.tile_count = 1 + desc->max_remote_tiles;
> -}
> -
> static int fake_probe_info(struct xe_device *xe,
> const struct xe_device_desc *desc,
> struct xe_pci_fake_data *data,
> struct xe_probed_info *probed_info)
> {
> + probed_info->tile_count = 1 + desc->max_remote_tiles;
> +
> if (!data || desc->pre_gmdid_graphics_ip) {
> probed_info->graphics_ip = desc->pre_gmdid_graphics_ip;
> probed_info->media_ip = desc->pre_gmdid_media_ip;
> @@ -382,9 +378,6 @@ int xe_pci_fake_device_init(struct xe_device *xe)
> xe->sriov.__mode = data && data->sriov_mode ?
> data->sriov_mode : XE_SRIOV_MODE_NONE;
>
> - kunit_activate_static_stub(test, xe_info_probe_tile_count,
> - fake_xe_info_probe_tile_count);
> -
> err = fake_probe_info(xe, desc, data, &probed_info);
> if (err)
> return err;
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 6b2daad87316..1b5df4384689 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -728,6 +728,7 @@ static int handle_gmdid(struct xe_device *xe,
> struct xe_probed_info {
> u16 devid;
> u8 revid;
> + u8 tile_count;
> struct xe_step_info step;
> const struct xe_ip *graphics_ip;
> const struct xe_ip *media_ip;
> @@ -819,25 +820,21 @@ static int xe_info_init_early(struct xe_device *xe,
> return 0;
> }
>
> -/*
> - * Possibly override number of tile based on configuration register.
> - */
> -static void xe_info_probe_tile_count(struct xe_device *xe,
> - const struct xe_device_desc *desc)
> +static void xe_probe_tile_count(struct xe_device *xe,
> + const struct xe_device_desc *desc,
> + struct xe_probed_info *probed_info)
> {
> struct xe_mmio *mmio;
> u8 tile_count;
> u32 mtcfg;
>
> - KUNIT_STATIC_STUB_REDIRECT(xe_info_probe_tile_count, xe, desc);
> -
> - xe->info.tile_count = 1 + desc->max_remote_tiles;
> + probed_info->tile_count = 1 + desc->max_remote_tiles;
>
> /*
> * Probe for tile count only for platforms that support multiple
> * tiles.
> */
> - if (xe->info.tile_count == 1)
> + if (probed_info->tile_count == 1)
> return;
>
> mmio = xe_root_tile_mmio(xe);
> @@ -850,10 +847,10 @@ static void xe_info_probe_tile_count(struct xe_device *xe,
> mtcfg = xe_mmio_read32(mmio, XEHP_MTCFG_ADDR);
> tile_count = REG_FIELD_GET(TILE_COUNT, mtcfg) + 1;
>
> - if (tile_count < xe->info.tile_count) {
> + if (tile_count < probed_info->tile_count) {
> drm_info(&xe->drm, "tile_count: %d, reduced_tile_count %d\n",
> - xe->info.tile_count, tile_count);
> - xe->info.tile_count = tile_count;
> + probed_info->tile_count, tile_count);
> + probed_info->tile_count = tile_count;
> }
> }
>
> @@ -975,6 +972,8 @@ static int xe_probe_info(struct xe_device *xe,
> {
> int err;
>
> + xe_probe_tile_count(xe, desc, probed_info);
> +
> err = xe_probe_ips(xe, desc, probed_info);
> if (err)
> return err;
> @@ -1002,6 +1001,8 @@ static int xe_info_init(struct xe_device *xe,
>
> graphics_ip = probed_info->graphics_ip;
> media_ip = probed_info->media_ip;
> +
> + xe->info.tile_count = probed_info->tile_count;
> xe->info.step.basedie = probed_info->step.basedie;
> xe->info.step.graphics = probed_info->step.graphics;
> xe->info.step.media = probed_info->step.media;
> @@ -1037,8 +1038,6 @@ static int xe_info_init(struct xe_device *xe,
> xe->info.has_soc_remapper_telem = 0;
> }
>
> - xe_info_probe_tile_count(xe, desc);
> -
> for_each_remote_tile(tile, xe, id) {
> int err;
>
>
next prev parent reply other threads:[~2026-06-19 18:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 20:17 [PATCH 0/9] drm/xe: Probe info outside of xe_info_init() and xe_info_init_early() Gustavo Sousa
2026-06-09 20:17 ` [PATCH 1/9] drm/xe: Add framework for info probing Gustavo Sousa
2026-06-16 18:51 ` Violet Monti
2026-06-16 21:56 ` Matt Roper
2026-06-17 12:43 ` Gustavo Sousa
2026-06-19 17:45 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 2/9] drm/xe/step: Pass xe_step_info to xe_step_*_get() functions Gustavo Sousa
2026-06-16 19:31 ` Violet Monti
2026-06-19 17:47 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 3/9] drm/xe: Add devid and revid to xe_probed_info Gustavo Sousa
2026-06-16 19:33 ` Violet Monti
2026-06-19 17:54 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 4/9] drm/xe/step: Make xe_step_platform_get() independent from xe->info Gustavo Sousa
2026-06-16 19:37 ` Violet Monti
2026-06-09 20:17 ` [PATCH 5/9] drm/xe: Add platform-level step info to xe_probed_info Gustavo Sousa
2026-06-16 19:50 ` Violet Monti
2026-06-19 18:01 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 6/9] drm/xe/tests: Set non-GMDID graphics step in xe_pci_fake_device_init() Gustavo Sousa
2026-06-16 19:58 ` Violet Monti
2026-06-19 18:02 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 7/9] drm/xe: Add graphics/media IPs and their step info to xe_probed_info Gustavo Sousa
2026-06-16 20:22 ` Violet Monti
2026-06-19 18:04 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 8/9] drm/xe: Don't initialize tile_count in xe_info_init_early() Gustavo Sousa
2026-06-16 21:07 ` Violet Monti
2026-06-19 18:04 ` Bhadane, Dnyaneshwar
2026-06-09 20:17 ` [PATCH 9/9] drm/xe: Add tile_count to xe_probed_info Gustavo Sousa
2026-06-16 21:16 ` Violet Monti
2026-06-19 18:05 ` Bhadane, Dnyaneshwar [this message]
2026-06-09 20:58 ` ✓ CI.KUnit: success for drm/xe: Probe info outside of xe_info_init() and xe_info_init_early() Patchwork
2026-06-09 22:06 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-10 12:22 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-07-01 16:00 ` ✓ CI.KUnit: success for drm/xe: Probe info outside of xe_info_init() and xe_info_init_early() (rev2) Patchwork
2026-07-01 17:03 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-02 11:47 ` ✓ Xe.CI.FULL: " Patchwork
2026-07-02 22:13 ` [PATCH 0/9] drm/xe: Probe info outside of xe_info_init() and xe_info_init_early() Gustavo Sousa
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=1ebdeefd-2d89-4864-8bb4-d8003d317220@intel.com \
--to=dnyaneshwar.bhadane@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