Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Atwood <matthew.s.atwood@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH i-g-t v2 06/11] lib/xe: Assert that cache is available for xe_wa()
Date: Tue, 20 Oct 2026 14:33:15 -0700	[thread overview]
Message-ID: <20261020213315.GE180749@msatwood-mobl> (raw)
In-Reply-To: <20260923-wa_14026539277-v2-6-528b575299d2@intel.com>

On Wed, Sep 23, 2026 at 06:41:13PM -0300, Gustavo Sousa wrote:
> While we do print a warning if xe_wa() is called without the necessary
> data cached in xe_device, it would make any test that relies on it to
> be unreliable in that scenario.
> 
> Make sure that we cause the test to fail instead by adding an
> igt_assert() to check that the wa_cache is not NULL.
> 
> Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  lib/xe/xe_wa.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/lib/xe/xe_wa.c b/lib/xe/xe_wa.c
> index 05af64151e7c..5f09efd2373a 100644
> --- a/lib/xe/xe_wa.c
> +++ b/lib/xe/xe_wa.c
> @@ -178,14 +178,12 @@ int xe_wa_test_debugfs_dump_has_wa(char *dump, const char *wa)
>   * @wa: Name of the workaround to be checked.
>   *
>   * Return a boolean indicating whether the workaround is enabled.
> - * On error, returns false and a warning is printed.
>   */
>  bool xe_wa(int fd, const char *wa)
>  {
>  	struct xe_wa_cache *wa_cache = xe_device_get(fd)->wa_cache;
>  
> -	if (igt_warn_on(!wa_cache))
> -		return false;
> +	igt_assert(wa_cache);
>  
>  	for (int i = 0; i < wa_cache->num_dumps; i++)
>  		if (debugfs_dump_has_wa(wa_cache->dumps[i], wa))
> 
> -- 
> 2.55.0
> 

  reply	other threads:[~2026-10-20 21:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 21:41 [PATCH i-g-t v2 00/11] Implement Wa_14026539277 Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 01/11] lib/xe: Move lib/intel_wa to lib/xe/xe_wa Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 02/11] lib/xe: Make debugfs_file_has_wa() aware of the debugfs file layout Gustavo Sousa
2026-10-20 21:15   ` Matt Atwood
2026-09-23 21:41 ` [PATCH i-g-t v2 03/11] lib/xe: Gather workarounds debugfs dumps in a cache struct Gustavo Sousa
2026-10-20 21:24   ` Matt Atwood
2026-10-20 22:49     ` Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 04/11] lib/xe: Cache workaround information in xe_device Gustavo Sousa
2026-10-20 21:30   ` Matt Atwood
2026-09-23 21:41 ` [PATCH i-g-t v2 05/11] lib/xe: Return boolean from xe_wa() Gustavo Sousa
2026-10-20 21:32   ` Matt Atwood
2026-09-23 21:41 ` [PATCH i-g-t v2 06/11] lib/xe: Assert that cache is available for xe_wa() Gustavo Sousa
2026-10-20 21:33   ` Matt Atwood [this message]
2026-09-23 21:41 ` [PATCH i-g-t v2 07/11] tests/intel/xe_pat: Adapt pat_entry_is_wb() to Xe3p Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 08/11] lib/xe: Add xe_wa_from_cache() Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 09/11] lib/intel_pat: Encapsulate management of xe_device's pat_cache Gustavo Sousa
2026-10-20 21:35   ` Matt Atwood
2026-09-23 21:41 ` [PATCH i-g-t v2 10/11] lib/intel_pat: Pass xe_device to xe_get_pat_config() Gustavo Sousa
2026-09-23 21:41 ` [PATCH i-g-t v2 11/11] intel: Implement Wa_14026539277 Gustavo Sousa
2026-09-24  1:52 ` ✓ i915.CI.BAT: success for Implement Wa_14026539277 (rev2) Patchwork
2026-09-24  2:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-24 16:04 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-25  0:41 ` ✗ i915.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=20261020213315.GE180749@msatwood-mobl \
    --to=matthew.s.atwood@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=igt-dev@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