All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] Selftests fixes for multi-gt platforms in i915
@ 2026-10-29  1:41 Krzysztof Niemiec
  2026-10-29  1:41 ` [RFC 1/5] drm/i915/selftests: Port GT-dependent selftests to work with multi-GT (low-hanging fruits part 1) Krzysztof Niemiec
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Krzysztof Niemiec @ 2026-10-29  1:41 UTC (permalink / raw)
  To: dri-devel, intel-gfx
  Cc: Krzysztof Karas, Sebastian Brzezinka, Janusz Krzysztofik,
	Andi Shyti, Krzysztof Niemiec

This series contains fixes in i915 selftests to make them work as
intended on multi-gt platforms like MTL.

Methodology to find these was: grep -R "to_gt()", and reading files that
use it. Some resulting files were omitted by choice.

The most notable example - gem/selftests/i915_gem_mman.c is ommited
despite *heavy* usage of to_gt(), due to the fact that i915's
implementation of GGTT mmap forces GT0 via to_gt(i915), so the way the
selftest works actually reflects the usage.

Files that only use mock device are also omitted due to the fact that
the mock device is hard-coded to have a single GT, so to_gt(i915) is
correct in that case. My reasoning for omission is that single gt is a
conscious, reasonable assumption to make when writing a mock device
test, and updating the tests to handle mutli-gt mock devices is out of
scope here and should be done IF there is ever a series adding multi-gt
to mock devices at all.

First two patches are "low-hanging fruits", where the tests already
depend on the passed GT parameter fully, they have just been mechanically
changed from i915->gt to to_gt(i915) when the multi-gt patches were
applied.

Patch 5 in the series (Port selftests that access ggtt) is written with
the weak assumption that separate GTs imply separate GGTTs, which is to
my knowledge not the case for example in MTL (where the media GT's
->ggtt will just point to the primary GT's ggtt). The way it is now is
generic and will work with separate GGTTs, however, if a stronger
assumption is preferred by the community (aka all platforms we will ever
run this on will have a single/shared GGTT), this patch can be dropped.

Patch 3 is also written with this assumption in mind, however, the PPGTT
part of the test should probably stay GT-specific, so it's not a simple
drop.

Patch 4 is opinionated in that there's two ways to accomplish the port:
run the affected test for each GT separately and skip on engines not
belonging on the currently processed GT, or run the test once, but
modify the lock such that it happens after selecting the engine and
affects engine->GT specifically. Patch 4 does latter right now.

Krzysztof Niemiec (5):
  drm/i915/selftests: Port GT-dependent selftests to work with multi-GT
    (low-hanging fruits part 1)
  drm/i915/selftests: Port GT-dependent selftests to work with multi-GT
    (low-hanging fruits part 2)
  drm/i915/selftests: Port i915_gem_gtt.c selftest file to multi-gt
  drm/i915/sefltests: Port i915_gem_context.c selftest file to multi-gt
  drm/i915/selftests: Port selftests that access ggtt to work with
    multi-gt

 .../gpu/drm/i915/gem/selftests/huge_pages.c   |  8 +-
 .../i915/gem/selftests/i915_gem_client_blt.c  | 29 +++++--
 .../drm/i915/gem/selftests/i915_gem_context.c | 19 +++--
 .../drm/i915/gem/selftests/i915_gem_migrate.c | 11 ++-
 drivers/gpu/drm/i915/gt/selftest_context.c    | 16 +++-
 drivers/gpu/drm/i915/gt/selftest_engine.c     | 15 ++--
 drivers/gpu/drm/i915/gt/selftest_engine_cs.c  | 15 +++-
 .../drm/i915/gt/selftest_engine_heartbeat.c   | 22 ++++--
 drivers/gpu/drm/i915/gt/selftest_execlists.c  | 19 +++--
 drivers/gpu/drm/i915/gt/selftest_gt_pm.c      | 15 +++-
 drivers/gpu/drm/i915/gt/selftest_hangcheck.c  | 24 +++---
 drivers/gpu/drm/i915/gt/selftest_lrc.c        | 11 ++-
 drivers/gpu/drm/i915/gt/selftest_migrate.c    | 38 ++++++---
 drivers/gpu/drm/i915/gt/selftest_mocs.c       | 11 ++-
 drivers/gpu/drm/i915/gt/selftest_reset.c      | 20 +++--
 .../drm/i915/gt/selftest_ring_submission.c    | 15 +++-
 drivers/gpu/drm/i915/gt/selftest_timeline.c   | 15 +++-
 .../gpu/drm/i915/gt/selftest_workarounds.c    | 15 +++-
 drivers/gpu/drm/i915/gt/uc/selftest_guc.c     | 20 +++--
 .../drm/i915/gt/uc/selftest_guc_hangcheck.c   | 20 +++--
 .../drm/i915/gt/uc/selftest_guc_multi_lrc.c   | 20 +++--
 drivers/gpu/drm/i915/selftests/i915_active.c  |  8 +-
 drivers/gpu/drm/i915/selftests/i915_gem.c     | 79 +++++++++++--------
 .../gpu/drm/i915/selftests/i915_gem_evict.c   | 15 +++-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 32 +++++---
 drivers/gpu/drm/i915/selftests/i915_perf.c    |  8 +-
 drivers/gpu/drm/i915/selftests/i915_request.c |  8 +-
 drivers/gpu/drm/i915/selftests/i915_vma.c     | 16 +++-
 .../drm/i915/selftests/intel_memory_region.c  | 16 +++-
 drivers/gpu/drm/i915/selftests/intel_uncore.c | 11 ++-
 30 files changed, 409 insertions(+), 162 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-29  2:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29  1:41 [RFC 0/5] Selftests fixes for multi-gt platforms in i915 Krzysztof Niemiec
2026-10-29  1:41 ` [RFC 1/5] drm/i915/selftests: Port GT-dependent selftests to work with multi-GT (low-hanging fruits part 1) Krzysztof Niemiec
2026-10-29  2:09   ` sashiko-bot
2026-10-29  1:41 ` [RFC 2/5] drm/i915/selftests: Port GT-dependent selftests to work with multi-GT (low-hanging fruits part 2) Krzysztof Niemiec
2026-10-29  1:56   ` sashiko-bot
2026-10-29  1:41 ` [RFC 3/5] drm/i915/selftests: Port i915_gem_gtt.c selftest file to multi-gt Krzysztof Niemiec
2026-10-29  1:41 ` [RFC 4/5] drm/i915/sefltests: Port i915_gem_context.c " Krzysztof Niemiec
2026-10-29  1:41 ` [RFC 5/5] drm/i915/selftests: Port selftests that access ggtt to work with multi-gt Krzysztof Niemiec
2026-10-29  1:51   ` sashiko-bot
2026-10-29  2:40 ` ✗ i915.CI.BAT: failure for Selftests fixes for multi-gt platforms in i915 Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.