Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count
Date: Fri, 13 Jun 2025 19:59:49 +0200	[thread overview]
Message-ID: <de11c42c-98b4-4ae8-a91e-ed2f06cc8337@intel.com> (raw)
In-Reply-To: <20250613001438.678728-10-matthew.d.roper@intel.com>



On 13.06.2025 02:14, Matt Roper wrote:
> Add a simple kunit test to ensure each platform's GT per tile count is
> non-zero and does not exceed the global XE_MAX_GT_PER_TILE definition.
> 
> We need to move 'struct xe_subplatform_desc' from the .c file to the
> types header to ensure it is accessible from the kunit test.
> 

...

> diff --git a/drivers/gpu/drm/xe/tests/xe_pci_test.h b/drivers/gpu/drm/xe/tests/xe_pci_test.h
> index ede46800aff1..5abbf522f7a8 100644
> --- a/drivers/gpu/drm/xe/tests/xe_pci_test.h
> +++ b/drivers/gpu/drm/xe/tests/xe_pci_test.h
> @@ -14,13 +14,16 @@
>  struct xe_device;
>  struct xe_graphics_desc;
>  struct xe_media_desc;
> +struct xe_device_desc;
>  
>  typedef int (*xe_device_fn)(struct xe_device *);

note: this is not used, can be dropped/replaced

>  typedef void (*xe_graphics_fn)(const struct xe_graphics_desc *);
>  typedef void (*xe_media_fn)(const struct xe_media_desc *);
> +typedef void (*xe_platform_fn)(const struct xe_device_desc *);

this is more like 'device_desc' function, so either:

	xe_device_desc_fn
or
	xe_device_fn

since previous typedef is not used anywhere

>  
>  void xe_call_for_each_graphics_ip(xe_graphics_fn xe_fn);
>  void xe_call_for_each_media_ip(xe_media_fn xe_fn);
> +void xe_call_for_each_platform(xe_platform_fn xe_fn);

to match above pattern maybe:

	void xe_call_for_each_device_desc(xe_device_desc_fn fn);

then later we could add really something like:

	typedef void (*xe_platform_fn)(enum xe_platform platform,
				       enum xe_subplatform subplatform);

	void xe_call_for_each_platform(xe_platform_fn xe_fn);

which would help us create new tests based on per-platform pattern.

or maybe we should already start converting existing tests that use
xe_call_for_each() into parametrized tests that use generators instead?



  reply	other threads:[~2025-06-13 17:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  0:14 [PATCH 0/5] Future-proof for multi-tile + multi-GT cases Matt Roper
2025-06-13  0:14 ` [PATCH 1/5] drm/xe: Export xe_step_name for kunit tests Matt Roper
2025-06-13 15:52   ` Michal Wajdeczko
2025-06-13  0:14 ` [PATCH 2/5] drm/xe: Track maximum GTs per tile on a per-platform basis Matt Roper
2025-06-13 20:32   ` Lucas De Marchi
2025-06-13  0:14 ` [PATCH 3/5] drm/xe/tests/pci: Ensure all platforms have a valid GT/tile count Matt Roper
2025-06-13 17:59   ` Michal Wajdeczko [this message]
2025-06-13 19:21     ` Michal Wajdeczko
2025-06-13  0:14 ` [PATCH 4/5] drm/xe: Assign GT IDs properly on multi-tile + multi-GT platforms Matt Roper
2025-06-13  0:14 ` [PATCH 5/5] drm/xe: Don't compare GT ID to GT count when determining valid GTs Matt Roper
2025-06-13  7:36 ` ✗ CI.checkpatch: warning for Future-proof for multi-tile + multi-GT cases Patchwork
2025-06-13  7:37 ` ✗ CI.KUnit: failure " 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=de11c42c-98b4-4ae8-a91e-ed2f06cc8337@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@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