[RFC 00/20] First attempt to kill mem_access

Rodrigo Vivi rodrigo.vivi at intel.com
Thu Dec 28 02:12:12 UTC 2023


At first the mem_access seemed a good idea since it would ensure
we could map every memory access and apply some workarounds and
then use that to ensure that the device is awake.

However it has become a nightmare in locking conflicts with memory
locking. The only sane way to go is to move the runtime_pm protection
to the outer bounds and ensure that the device is resumed way
before memory locking.

So, this RFC here is the first attempt to kill the mem access and
have a clean rpm handling on the outer bounds.

Well, at this time we already know that we need to solve some TLB
invalidation issues and the last patch in this series needs to
be split in smaller pieces. But I'd like to at lest get
the discussion started.

Happy New Year,
Rodrigo.

Rodrigo Vivi (20):
  drm/xe: Document Xe PM component
  drm/xe: Fix display runtime_pm handling
  drm/xe: Create a xe_pm_runtime_resume_and_get variant for display
  drm/xe: Convert xe_pm_runtime_{get,put} to void and protect from
    recursion
  drm/xe: Prepare display for D3Cold
  drm/xe: Convert mem_access assertion towards the runtime_pm state
  drm/xe: Runtime PM wake on every IOCTL
  drm/xe: Runtime PM wake on every exec
  drm/xe: Runtime PM wake on every sysfs call
  drm/xe: Sort some xe_pm_runtime related functions
  drm/xe: Ensure device is awake before removing it
  drm/xe: Remove mem_access from guc_pc calls
  drm/xe: Runtime PM wake on every debugfs call
  drm/xe: Replace dma_buf mem_access per direct xe_pm_runtime calls
  drm/xe: Allow GuC CT fast path and worker regardless of runtime_pm
  drm/xe: Remove mem_access calls from migration
  drm/xe: Removing extra mem_access protection from runtime pm
  drm/xe: Convert hwmon from mem_access to xe_pm_runtime calls
  drm/xe: Remove unused runtime pm helper
  drm/xe: Mega Kill of mem_access

 .../gpu/drm/xe/compat-i915-headers/i915_drv.h |   8 +-
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |   7 +-
 drivers/gpu/drm/xe/tests/xe_bo.c              |   8 -
 drivers/gpu/drm/xe/tests/xe_migrate.c         |   2 -
 drivers/gpu/drm/xe/tests/xe_mocs.c            |   4 -
 drivers/gpu/drm/xe/xe_bo.c                    |   5 -
 drivers/gpu/drm/xe/xe_debugfs.c               |  10 +-
 drivers/gpu/drm/xe/xe_device.c                | 129 ++++-------
 drivers/gpu/drm/xe/xe_device.h                |   9 -
 drivers/gpu/drm/xe/xe_device_sysfs.c          |   4 +
 drivers/gpu/drm/xe/xe_device_types.h          |   9 -
 drivers/gpu/drm/xe/xe_dma_buf.c               |   5 +-
 drivers/gpu/drm/xe/xe_exec_queue.c            |  18 --
 drivers/gpu/drm/xe/xe_ggtt.c                  |   6 -
 drivers/gpu/drm/xe/xe_gsc.c                   |   3 -
 drivers/gpu/drm/xe/xe_gt.c                    |  17 --
 drivers/gpu/drm/xe/xe_gt_debugfs.c            |  53 ++++-
 drivers/gpu/drm/xe/xe_gt_freq.c               |  38 +++-
 drivers/gpu/drm/xe/xe_gt_idle.c               |  23 +-
 drivers/gpu/drm/xe/xe_gt_throttle_sysfs.c     |   3 +
 drivers/gpu/drm/xe/xe_guc_ct.c                |  40 ----
 drivers/gpu/drm/xe/xe_guc_debugfs.c           |   9 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                |  62 +----
 drivers/gpu/drm/xe/xe_huc_debugfs.c           |   5 +-
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c |  58 ++++-
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   7 +
 drivers/gpu/drm/xe/xe_hwmon.c                 |  25 ++-
 drivers/gpu/drm/xe/xe_pat.c                   |  10 -
 drivers/gpu/drm/xe/xe_pci.c                   |   2 +-
 drivers/gpu/drm/xe/xe_pm.c                    | 211 ++++++++++++++----
 drivers/gpu/drm/xe/xe_pm.h                    |   9 +-
 drivers/gpu/drm/xe/xe_query.c                 |   4 -
 drivers/gpu/drm/xe/xe_sched_job.c             |  10 +-
 drivers/gpu/drm/xe/xe_tile.c                  |  10 +-
 drivers/gpu/drm/xe/xe_tile_sysfs.c            |   1 +
 drivers/gpu/drm/xe/xe_ttm_sys_mgr.c           |   5 +-
 drivers/gpu/drm/xe/xe_vm.c                    |   7 -
 37 files changed, 445 insertions(+), 391 deletions(-)

-- 
2.43.0



More information about the Intel-xe mailing list