Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/23] Allow configfs to disable specific GT type(s)
@ 2025-10-13 20:09 Matt Roper
  2025-10-13 20:09 ` [PATCH v5 01/23] drm/xe/huc: Adjust HuC check on primary GT Matt Roper
                   ` (26 more replies)
  0 siblings, 27 replies; 30+ messages in thread
From: Matt Roper @ 2025-10-13 20:09 UTC (permalink / raw)
  To: intel-xe
  Cc: matthew.d.roper, Gustavo Sousa, Michal Wajdeczko, Lucas De Marchi

During various debug or hardware bring-up activities, it is often useful
to completely disable one of the GTs to reduce the scope of the debug.
Add a configfs attribute to make this easy to do in a standard manner,
similar to the existing attribute we have to limit engines.

One of the changes in this series is that we reverse direction on the
placement of a few feature flags.  Previously we had moved things like
number of page table levels, size of the virtual address space, or
presence/absence of FlatCCS into the graphics descriptor to tie it to
the general architecture (Xe2, Xe3, etc.).  But upon further reflection,
these kind of flags and values are truly platform-specific
characteristics rather than being tied just to the graphics IP.  The
value of these winds up being platform-wide (as already evidenced by the
fact that we copied their values into xe->info rather than gt->info) and
all IP blocks in a hardware platform (graphics, media, and display) are
going to have a consistent understanding of these characteristics;
they're not just "graphics" values, and we need to be able to detect and
handle them properly even when "graphics" (in the form of the primary
GT) is absent.  So this series moves some of those flags back into the
platform-level descriptors and tries to keep the graphics descriptor's
fields focused on values that are truly tied to the primary GT.

Note that at the moment it's only possible to disable the media GT.
Although this series includes a number of patches aimed at reducing the
driver's reliance on the primary GT and assumptions that the primary GT
will always be present and non-NULL, we're not quite at the point where
the driver can actually run with primary GT disabled.  The main
remaining blocker for that is the reliance on the BCS engines (which
reside in the primary GT) for various VRAM and migration operations.
Additional work after this series will be required to eliminate those
dependencies.

v5:
 - Add a missing vm_max_level setting.  (Gustavo)
 - Rename xe_configfs_*_gt_supported to xe_configfs_*_gt_allowed for
   consistency with configfs interface and other functions.  (Gustavo)
 - Make new configfs functions take 'struct pci_dev' instead of 'struct
   xe_device' for consistency with other configfs helpers.  (Michal)

v4:
 - Initialize gt->tile for SR-IOV's dummy GT to prevent null derefence.
 - Switch internal function interface from one function that returns a
   mask to two functions (one primary, one media) that return true/false
   if the engine type is enabled.
 - Use scope-based cleanup in a couple places to fix memory leaks on
   error paths and to make code simpler in general.
 - Block SR-IOV without primary GT simply by adjusting .has_sriov during
   early init.
 - Drop some outdated comments and commit message paragraphs that should
   have been removed with the code changes in v3.
 - Tweak wording of a couple commit messages to reduce ambiguity of
   meaning.

v3:
 - Drop default values and set va_bits / vm_max_level on all descriptors
   (Michal, Lucas)
 - Use a specifically allocated GT to do SRIOV pre-init GT operations
   rather than filling tile0's primary GT with data for each tile & GT.
   This allows the primary GT's allocation to be moved to a more
   appropriate place (and skipped completely if the primary GT is
   disabled).
 - If primary GT is disabled, do PF->native demotion and VF probe failure
   in xe_info_init rather than SRIOV pre-init.  (Michal)

v2:
 - About 20 extra patches added to reduce dependencies on an
   always-present primary GT.
 - Kerneldoc and string parsing fixes to the configfs attribute handling
   (Gustavo)

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>

Matt Roper (23):
  drm/xe/huc: Adjust HuC check on primary GT
  drm/xe: Drop GT parameter to xe_display_irq_postinstall()
  drm/xe: Move 'va_bits' flag back to platform descriptor
  drm/xe: Move 'vm_max_level' flag back to platform descriptor
  drm/xe: Move 'vram_flags' flag back to platform descriptor
  drm/xe: Move 'has_flatccs' flag back to platform descriptor
  drm/xe: Read VF GMD_ID with a specifically-allocated dummy GT
  drm/xe: Move primary GT allocation from xe_tile_init_early to
    xe_tile_init
  drm/xe: Skip L2 / TDF cache flushes if primary GT is disabled
  drm/xe/query: Report hwconfig size as 0 if primary GT is disabled
  drm/xe/pmu: Initialize PMU event types based on first available GT
  drm/xe: Check for primary GT before looking up Wa_22019338487
  drm/xe: Make display part of Wa_22019338487 a device workaround
  drm/xe/irq: Don't try to lookup engine masks for non-existent primary
    GT
  drm/xe: Handle Wa_22010954014 and Wa_14022085890 as device workarounds
  drm/xe/rtp: Pass xe_device parameter to FUNC matches
  drm/xe: Bypass Wa_14018094691 when primary GT is disabled
  drm/xe: Correct lineage for Wa_22014953428 and only check with valid
    GT
  drm/xe: Check that GT is not NULL before testing Wa_16023588340
  drm/xe: Don't check BIOS-disabled FlatCCS if primary GT is disabled
  drm/xe: Break GT setup out of xe_info_init()
  drm/xe/configfs: Add attribute to disable GT types
  drm/xe/sriov: Disable SR-IOV if primary GT is disabled via configfs

 drivers/gpu/drm/xe/display/intel_fbdev_fb.c   |   4 +-
 drivers/gpu/drm/xe/display/xe_display.c       |   5 +-
 drivers/gpu/drm/xe/display/xe_display.h       |   4 +-
 drivers/gpu/drm/xe/display/xe_display_wa.c    |   3 +-
 drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-
 drivers/gpu/drm/xe/tests/xe_pci.c             |   6 +-
 drivers/gpu/drm/xe/tests/xe_rtp_test.c        |   6 +-
 drivers/gpu/drm/xe/xe_configfs.c              | 143 +++++++++++
 drivers/gpu/drm/xe/xe_configfs.h              |   4 +
 drivers/gpu/drm/xe/xe_device.c                |   7 +
 drivers/gpu/drm/xe/xe_device_wa_oob.rules     |   3 +
 drivers/gpu/drm/xe/xe_ggtt.c                  |  31 ++-
 drivers/gpu/drm/xe/xe_gsc.c                   |   4 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                |   3 +-
 drivers/gpu/drm/xe/xe_huc.c                   |  10 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |  10 +-
 drivers/gpu/drm/xe/xe_irq.c                   |  14 +-
 drivers/gpu/drm/xe/xe_pci.c                   | 238 ++++++++++++------
 drivers/gpu/drm/xe/xe_pci_types.h             |   9 +-
 drivers/gpu/drm/xe/xe_platform_types.h        |   1 +
 drivers/gpu/drm/xe/xe_pmu.c                   |  11 +-
 drivers/gpu/drm/xe/xe_query.c                 |   2 +-
 drivers/gpu/drm/xe/xe_reg_whitelist.c         |   3 +-
 drivers/gpu/drm/xe/xe_rtp.c                   |  24 +-
 drivers/gpu/drm/xe/xe_rtp.h                   |  18 +-
 drivers/gpu/drm/xe/xe_rtp_types.h             |   4 +-
 drivers/gpu/drm/xe/xe_tile.c                  |   4 -
 drivers/gpu/drm/xe/xe_vm.c                    |   3 +-
 drivers/gpu/drm/xe/xe_wa.c                    |   2 +-
 drivers/gpu/drm/xe/xe_wa_oob.rules            |   8 +-
 include/drm/intel/pciids.h                    |   7 +-
 31 files changed, 439 insertions(+), 156 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-14 15:11 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 20:09 [PATCH v5 00/23] Allow configfs to disable specific GT type(s) Matt Roper
2025-10-13 20:09 ` [PATCH v5 01/23] drm/xe/huc: Adjust HuC check on primary GT Matt Roper
2025-10-13 20:09 ` [PATCH v5 02/23] drm/xe: Drop GT parameter to xe_display_irq_postinstall() Matt Roper
2025-10-13 20:09 ` [PATCH v5 03/23] drm/xe: Move 'va_bits' flag back to platform descriptor Matt Roper
2025-10-13 20:09 ` [PATCH v5 04/23] drm/xe: Move 'vm_max_level' " Matt Roper
2025-10-13 20:09 ` [PATCH v5 05/23] drm/xe: Move 'vram_flags' " Matt Roper
2025-10-13 20:09 ` [PATCH v5 06/23] drm/xe: Move 'has_flatccs' " Matt Roper
2025-10-13 20:09 ` [PATCH v5 07/23] drm/xe: Read VF GMD_ID with a specifically-allocated dummy GT Matt Roper
2025-10-13 20:09 ` [PATCH v5 08/23] drm/xe: Move primary GT allocation from xe_tile_init_early to xe_tile_init Matt Roper
2025-10-13 20:09 ` [PATCH v5 09/23] drm/xe: Skip L2 / TDF cache flushes if primary GT is disabled Matt Roper
2025-10-13 20:09 ` [PATCH v5 10/23] drm/xe/query: Report hwconfig size as 0 " Matt Roper
2025-10-13 20:09 ` [PATCH v5 11/23] drm/xe/pmu: Initialize PMU event types based on first available GT Matt Roper
2025-10-13 20:09 ` [PATCH v5 12/23] drm/xe: Check for primary GT before looking up Wa_22019338487 Matt Roper
2025-10-13 20:09 ` [PATCH v5 13/23] drm/xe: Make display part of Wa_22019338487 a device workaround Matt Roper
2025-10-13 20:09 ` [PATCH v5 14/23] drm/xe/irq: Don't try to lookup engine masks for non-existent primary GT Matt Roper
2025-10-13 20:09 ` [PATCH v5 15/23] drm/xe: Handle Wa_22010954014 and Wa_14022085890 as device workarounds Matt Roper
2025-10-13 20:09 ` [PATCH v5 16/23] drm/xe/rtp: Pass xe_device parameter to FUNC matches Matt Roper
2025-10-13 20:10 ` [PATCH v5 17/23] drm/xe: Bypass Wa_14018094691 when primary GT is disabled Matt Roper
2025-10-13 20:10 ` [PATCH v5 18/23] drm/xe: Correct lineage for Wa_22014953428 and only check with valid GT Matt Roper
2025-10-13 20:10 ` [PATCH v5 19/23] drm/xe: Check that GT is not NULL before testing Wa_16023588340 Matt Roper
2025-10-13 20:10 ` [PATCH v5 20/23] drm/xe: Don't check BIOS-disabled FlatCCS if primary GT is disabled Matt Roper
2025-10-13 20:10 ` [PATCH v5 21/23] drm/xe: Break GT setup out of xe_info_init() Matt Roper
2025-10-13 20:10 ` [PATCH v5 22/23] drm/xe/configfs: Add attribute to disable GT types Matt Roper
2025-10-13 20:10 ` [PATCH v5 23/23] drm/xe/sriov: Disable SR-IOV if primary GT is disabled via configfs Matt Roper
2025-10-13 20:25   ` Michal Wajdeczko
2025-10-13 23:30 ` ✗ CI.checkpatch: warning for Allow configfs to disable specific GT type(s) (rev5) Patchwork
2025-10-13 23:31 ` ✓ CI.KUnit: success " Patchwork
2025-10-14  0:11 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-14  8:08 ` ✓ Xe.CI.Full: " Patchwork
2025-10-14 15:10   ` Matt Roper

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