Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH 5/6] drm/xe: Drop redundant parameter from xe_probe_info and friends
Date: Sat, 5 Sep 2026 10:58:54 -0300	[thread overview]
Message-ID: <87se3n7qap.fsf@intel.com> (raw)
In-Reply-To: <20260904170531.516-6-michal.wajdeczko@intel.com>

Michal Wajdeczko <michal.wajdeczko@intel.com> writes:

> We can now obtain the const pointer to struct xe_device_desc directly
> from the xe, no need to pass it as explicit parameter.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/xe/tests/xe_pci.c |  5 +++--
>  drivers/gpu/drm/xe/xe_pci.c       | 13 ++++++-------
>  2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b/drivers/gpu/drm/xe/tests/xe_pci.c
> index c817692c0ce3..7712282308c4 100644
> --- a/drivers/gpu/drm/xe/tests/xe_pci.c
> +++ b/drivers/gpu/drm/xe/tests/xe_pci.c
> @@ -311,10 +311,11 @@ 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 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)
>  {
> +	const struct xe_device_desc *desc = xe->desc;
> +
>  	probed_info->tile_count = 1 + desc->max_remote_tiles;
>  
>  	if (!data || desc->pre_gmdid_graphics_ip) {
> @@ -379,7 +380,7 @@ int xe_pci_fake_device_init(struct xe_device *xe)
>  	xe->sriov.__mode = data && data->sriov_mode ?
>  			   data->sriov_mode : XE_SRIOV_MODE_NONE;
>  
> -	err = fake_probe_info(xe, desc, data, &probed_info);
> +	err = fake_probe_info(xe, 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 6ca1ec311a4b..c401c8803796 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -836,14 +836,13 @@ static int xe_info_init_early(struct xe_device *xe,
>  }
>  
>  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;
>  
> -	probed_info->tile_count = 1 + desc->max_remote_tiles;
> +	probed_info->tile_count = 1 + xe->desc->max_remote_tiles;
>  
>  	/*
>  	 * Probe for tile count only for platforms that support multiple
> @@ -946,9 +945,10 @@ static struct xe_gt *alloc_media_gt(struct xe_tile *tile,
>  }
>  
>  static int xe_probe_ips(struct xe_device *xe,
> -			const struct xe_device_desc *desc,
>  			struct xe_probed_info *probed_info)
>  {
> +	const struct xe_device_desc *desc = xe->desc;
> +
>  	/*
>  	 * If this platform supports GMD_ID, we'll detect the proper IP
>  	 * descriptor to use from hardware registers.
> @@ -989,14 +989,13 @@ static int xe_probe_ips(struct xe_device *xe,
>   * Probe from the hardware the info required by xe_info_init().
>   */
>  static int xe_probe_info(struct xe_device *xe,
> -			 const struct xe_device_desc *desc,
>  			 struct xe_probed_info *probed_info)
>  {
>  	int err;
>  
> -	xe_probe_tile_count(xe, desc, probed_info);
> +	xe_probe_tile_count(xe, probed_info);
>  
> -	err = xe_probe_ips(xe, desc, probed_info);
> +	err = xe_probe_ips(xe, probed_info);
>  	if (err)
>  		return err;
>  
> @@ -1240,7 +1239,7 @@ static int __xe_pci_probe(struct pci_dev *pdev, const struct xe_device_desc *des
>  	if (err)
>  		return err;
>  
> -	err = xe_probe_info(xe, desc, &probed_info);
> +	err = xe_probe_info(xe, &probed_info);
>  	if (err)
>  		return err;
>  
> -- 
> 2.47.1

  reply	other threads:[~2026-09-05 13:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 17:05 [PATCH 0/6] drm/xe/log: Relax location ID recognition Michal Wajdeczko
2026-09-04 17:05 ` [PATCH 1/6] drm/xe: Drop unused parameter from xe_info_init Michal Wajdeczko
2026-09-04 18:09   ` Rodrigo Vivi
2026-09-05 13:04   ` Gustavo Sousa
2026-09-04 17:05 ` [PATCH 2/6] drm/xe: Keep reference to device descriptor Michal Wajdeczko
2026-09-04 17:14   ` sashiko-bot
2026-09-05 13:52     ` Gustavo Sousa
2026-09-07 19:30       ` Michal Wajdeczko
2026-09-11 11:25         ` Michal Wajdeczko
2026-09-11 16:36           ` Gustavo Sousa
2026-09-04 17:05 ` [PATCH 3/6] drm/xe: Drop redundant parameters from xe_info_init_early Michal Wajdeczko
2026-09-05 13:54   ` Gustavo Sousa
2026-09-04 17:05 ` [PATCH 4/6] drm/xe: Drop redundant parameter from xe_probe_info_early Michal Wajdeczko
2026-09-05 13:55   ` Gustavo Sousa
2026-09-04 17:05 ` [PATCH 5/6] drm/xe: Drop redundant parameter from xe_probe_info and friends Michal Wajdeczko
2026-09-05 13:58   ` Gustavo Sousa [this message]
2026-09-04 17:05 ` [PATCH 6/6] drm/xe/log: Relax location ID recognition Michal Wajdeczko
2026-09-04 18:44   ` Rodrigo Vivi
2026-09-09  9:00   ` Mallesh, Koujalagi
2026-09-09  9:42     ` Michal Wajdeczko
2026-09-09 11:02       ` Mallesh, Koujalagi
2026-09-09 13:01         ` Michal Wajdeczko
2026-09-04 17:13 ` ✓ CI.KUnit: success for " Patchwork
2026-09-04 17:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-05  1:36 ` ✓ Xe.CI.FULL: " 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=87se3n7qap.fsf@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.wajdeczko@intel.com \
    /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