[Intel-xe] [PATCH v5 00/23] drm/xe: Probe tweaks and reordering

Michał Winiarski michal.winiarski at intel.com
Wed Nov 29 22:34:45 UTC 2023


When Xe is loaded on SR-IOV VF, it won't be able to get most of the
information about the hardware directly from registers (it's necessary
to communicate with GuC in order to get the data, as VF doesn't have the
same level of MMIO surface as native device).
In order to keep the probe relatively uniform between native and VF
mode, it's necessary to slightly reorder the current driver init.

The series starts with generic tweaks (dead code removal and devres
usage), followed by initial reordering focused around MMIO init and info
init, followed by GGTT / GuC reordering.

v1 -> v2:
- Add GGTT / GuC reordering
- Don't reorder VRAM init check, as the value also hints at pcode status
  (Matt Roper)
- Add comments to "early" functions introduced as part of the series
  (Lucas)
- Move xe_info_init_early usage in kunit to correct patch (Matt Brost)
- Drop "shutdown" dead code removal
- Make "xe_tile_alloc" static

v2 -> v3:
- Fix warn with W=1 - xe_pci_clear_master should be static (CI)

v3 -> v4:
- Drop explicit call to pci_clear_master (Matt Roper)
- Don't define MEDIA_GMD_ID (Matt Roper)
- Keep the "peek_gmdid" for KUnit (Lucas)
- Assert that realloc transitions from RAM to VRAM to make sure
  iosys_map API is used correctly (Lucas)
- Fix GuC resource realloc by introducing drmm_release_action
- Convert xe_guc_pc_fini to act as drm-managed release function
- Introduce xe_gt_init_hwconfig (Matt Brost)
- Init PAT before loading GuC

v4 -> v5:
- Rebase to resolve conflicts when applying the series (CI)
- Add kerneldoc + kunit to DRM managed changes
- Check for error in managed create from data (Michał Wajdeczko)
- Move the comment (+ engine mask assignment) about using engine mask
  from hwconfig blob into xe_gt_init_hwconfig() (Brian Welty)

Michał Winiarski (23):
  drm/xe: Skip calling drm_dev_put on probe error
  drm/xe: Use managed pci_enable_device
  drm/xe/irq: Don't call pci_free_irq_vectors
  drm/xe: Move xe_set_dma_info outside of MMIO setup
  drm/xe: Move xe_mmio_probe_tiles outside of MMIO setup
  drm/xe: Split xe_info_init
  drm/xe: Introduce xe_tile_init_early and use at earlier point in probe
  drm/xe: Map the entire BAR0 and hold onto the initial mapping
  drm/xe/device: Introduce xe_device_probe_early
  drm/xe: Don't "peek" into GMD_ID
  drm/xe: Move system memory management init to earlier point in probe
  drm/xe: Move force_wake init to earlier point in probe
  drm/xe: Reorder GGTT init to earlier point in probe
  drm/xe: Add a helper for DRM device-lifetime BO create
  drm/xe/uc: Split xe_uc_fw_init
  drm/xe/uc: Store firmware binary in system-memory backed BO
  drm/xe/uc: Extract xe_uc_sanitize_reset
  drm/xe/guc: Split GuC params used for "hwconfig" and "post-hwconfig"
  drm/managed: Add drmm_release_action
  drm/tests: managed: Add a simple test for drmm_managed_release
  drm/xe/guc: Allocate GuC data structures in system memory for initial
    load
  drm/xe/guc: Move GuC power control init to "post-hwconfig"
  drm/xe: Initialize GuC earlier during probe

 drivers/gpu/drm/drm_managed.c            |  39 +++++++
 drivers/gpu/drm/tests/drm_managed_test.c |  65 +++++++++---
 drivers/gpu/drm/xe/tests/xe_pci.c        |   1 +
 drivers/gpu/drm/xe/xe_bo.c               |  41 +++++++
 drivers/gpu/drm/xe/xe_bo.h               |   5 +
 drivers/gpu/drm/xe/xe_device.c           |  76 ++++++++++---
 drivers/gpu/drm/xe/xe_device.h           |   5 +
 drivers/gpu/drm/xe/xe_ggtt.c             |  26 +++--
 drivers/gpu/drm/xe/xe_ggtt.h             |   2 +-
 drivers/gpu/drm/xe/xe_gt.c               |  66 ++++++++----
 drivers/gpu/drm/xe/xe_gt.h               |   1 +
 drivers/gpu/drm/xe/xe_guc.c              |  84 +++++++++++++--
 drivers/gpu/drm/xe/xe_guc_ads.c          |  20 +---
 drivers/gpu/drm/xe/xe_guc_ct.c           |   8 +-
 drivers/gpu/drm/xe/xe_guc_hwconfig.c     |  18 +---
 drivers/gpu/drm/xe/xe_guc_log.c          |  19 +---
 drivers/gpu/drm/xe/xe_guc_pc.c           |  25 +++--
 drivers/gpu/drm/xe/xe_guc_pc.h           |   1 -
 drivers/gpu/drm/xe/xe_hw_engine.c        |   8 +-
 drivers/gpu/drm/xe/xe_irq.c              |   5 +-
 drivers/gpu/drm/xe/xe_mmio.c             |  58 +++-------
 drivers/gpu/drm/xe/xe_mmio.h             |   2 +
 drivers/gpu/drm/xe/xe_pci.c              | 129 ++++++++++++++---------
 drivers/gpu/drm/xe/xe_tile.c             |  36 ++++++-
 drivers/gpu/drm/xe/xe_tile.h             |   2 +-
 drivers/gpu/drm/xe/xe_uc.c               |  23 ++--
 drivers/gpu/drm/xe/xe_uc.h               |   2 +-
 drivers/gpu/drm/xe/xe_uc_fw.c            |  81 ++++++++++----
 include/drm/drm_managed.h                |   4 +
 29 files changed, 582 insertions(+), 270 deletions(-)

-- 
2.43.0



More information about the Intel-xe mailing list