From: Matthew Auld <matthew.auld@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>
Subject: [PATCH i-g-t] tests/intel/kms_ccs: stop using l3 enabled PAT index
Date: Mon, 8 Sep 2025 19:20:46 +0100 [thread overview]
Message-ID: <20250908182045.66769-2-matthew.auld@intel.com> (raw)
When populating the fb using an l3 compression enabled PAT index some or
all of the data may end up cached. However the HW looks to only perform
the compression step in this case upon evicting those entries, when also
trying to write them back to VRAM. This seems to be the cause of this
test randomly failing on BMG with the CCS state appearing to sometimes
be zeroed even after doing a compression enabled copy. From
experimentation adding a sleep before the surface copy cures the
failure, which fits since this will give plenty of time to enter rc6
which will indirectly also nuke the l3. Grabbing a forcewake around the
sleep brings back the failure which also makes sense since this will
inhibit the flush and also rules out missing synchronisation hidden by
the sleep. Using a large fb also cures the issue, which also fits since
the fb will now be larger than the entire l3, so some data will have to
be compressed when evicted.
To fix this don't use an l3 enabled PAT index prior to taking a snapshot
of the raw CCS state. Probably this also means the test is maybe too
much looking at implementation details, by assuming that zeroed CCS
state must also imply that there is no compression, even if compression
is merely delayed until the data is evicted.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5941
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5376
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/intel/kms_ccs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index cb0c80f03..ab081aa75 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -812,7 +812,7 @@ static struct igt_fb *get_fb(data_t *data, u64 modifier, double r, double g,
fb = get_fb(data, modifier, r, g, b, width, height,
data->format);
- igt_xe2_blit_with_dst_pat(fb, temp_fb, intel_get_pat_idx_wt(fb->fd));
+ igt_xe2_blit_with_dst_pat(fb, temp_fb, intel_get_pat_idx_uc_comp(fb->fd));
access_flat_ccs_surface(fb, true);
return fb;
--
2.51.0
next reply other threads:[~2025-09-08 18:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 18:20 Matthew Auld [this message]
2025-09-09 5:09 ` ✓ Xe.CI.BAT: success for tests/intel/kms_ccs: stop using l3 enabled PAT index Patchwork
2025-09-09 5:24 ` ✓ i915.CI.BAT: " Patchwork
2025-09-09 7:23 ` [PATCH i-g-t] " Zbigniew Kempczyński
2025-09-09 9:23 ` Matthew Auld
2025-09-09 10:42 ` Zbigniew Kempczyński
2025-09-09 14:04 ` ✓ Xe.CI.Full: success for " Patchwork
2025-09-09 21:00 ` ✓ 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=20250908182045.66769-2-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.com \
--cc=zbigniew.kempczynski@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