Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_ccs: stop using l3 enabled PAT index
@ 2025-09-08 18:20 Matthew Auld
  2025-09-09  5:09 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Matthew Auld @ 2025-09-08 18:20 UTC (permalink / raw)
  To: igt-dev; +Cc: Zbigniew Kempczyński, Juha-Pekka Heikkila

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-09 21:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 18:20 [PATCH i-g-t] tests/intel/kms_ccs: stop using l3 enabled PAT index Matthew Auld
2025-09-09  5:09 ` ✓ Xe.CI.BAT: success for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox