Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, X" <x.wang@intel.com>
To: <nishit.sharma@intel.com>, <igt-dev@lists.freedesktop.org>,
	<stuart.summers@intel.com>
Subject: Re: [PATCH i-g-t] lib/intel_pat: skip UC compression when FlatCCS unavailable
Date: Tue, 12 May 2026 17:13:05 -0700	[thread overview]
Message-ID: <8dc2f316-e65c-4f5f-9795-2c57920829be@intel.com> (raw)
In-Reply-To: <20260512033504.3665416-1-nishit.sharma@intel.com>



On 5/11/2026 20:35, nishit.sharma@intel.com wrote:
> From: Nishit Sharma <nishit.sharma@intel.com>
>
> Use igt_require in place of igt_assert to avoid treating unsupported
> platform conditions as test errors in CI. Since UC compression is
> supported only on FlatCCS platforms, skip the test on platforms without
> FlatCCS.
>
> Signed-off-by: Nishit Sharma <nishit.sharma@intel.com>
> ---
>   lib/intel_pat.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/intel_pat.c b/lib/intel_pat.c
> index 2f35bb772..bcf31b4b2 100644
> --- a/lib/intel_pat.c
> +++ b/lib/intel_pat.c
> @@ -276,7 +276,7 @@ uint8_t intel_get_pat_idx_uc_comp(int fd)
>   	uint16_t dev_id = intel_get_drm_devid(fd);
>   
>   	igt_assert(intel_gen(dev_id) >= 20);
> -	igt_assert(HAS_FLATCCS(dev_id));
> +	igt_require_f(HAS_FLATCCS(dev_id), "FlatCCS not available on platform, skipping");
>   
As a basic library function, I don't think we should skip test cases here.
Theoretically, this function should return a value to the caller under 
all circumstances.
When on an unsupported platform, it's more logical to directly return 
`XE_PAT_IDX_INVALID`,
allowing the caller to decide whether to skip the test.

Thanks
Xin
>   	intel_get_pat_idx(fd, &pat);
>   	igt_assert_f(pat.uc_comp != XE_PAT_IDX_INVALID,


      parent reply	other threads:[~2026-05-13  0:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  3:35 [PATCH i-g-t] lib/intel_pat: skip UC compression when FlatCCS unavailable nishit.sharma
2026-05-12  6:35 ` Goyal, Nakshtra
2026-05-12  7:01 ` ✓ i915.CI.BAT: success for " Patchwork
2026-05-12  8:06 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-12 15:50 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-12 15:52   ` Sharma, Nishit
2026-05-12 22:44 ` ✗ i915.CI.Full: " Patchwork
2026-05-13  0:13 ` Wang, X [this message]

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=8dc2f316-e65c-4f5f-9795-2c57920829be@intel.com \
    --to=x.wang@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nishit.sharma@intel.com \
    --cc=stuart.summers@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