[RFC 0/7] Runtime PM encapsulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While reworking other parts of the code to rely less on i915 and use the
new uncore logic for register access, I've noticed that, after the
conversion, in a few places the i915 structure is required only for the
rpm_get/put calls. We do have a reference to the rpm structure in the
uncore one, so, since we're relying on the latter more, having the rpm
code work directly on its own sub-structure will allow us to ditch
dev_priv in a few more places. Also, having a section of the code work on
its own logic sub-structure instead getting it out of dev_priv every time
makes the flow generally cleaner IMO.

This series grows the code slightly due to flipping all the get/put call
points derive the rpm structure from dev_priv, but we should recoup that
over time while we complete the rework.

While applying the changes I noticed that there is also a lot of
potential for refactoring/encapsuliation around the display power
functions. I experimented a bit with splitting these functions to their
own file and moving most of the logic to work on i915_power_domains since
we keep getting that structure out of i915, but the code is not as easy
to update due to frequent calls to other areas in the display domain,
so I gave up for now.

Series very lightly tested.

Cc: Imre Deak <imre.deak@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Daniele Ceraolo Spurio (7):
  drm/i915: prefer i915_runtime_pm in intel_runtime function
  drm/i915: Remove rpm asserts that use i915
  drm/i915: make enable/disable rpm assert function use the rpm
    structure
  drm/i915: move and rename i915_runtime_pm
  drm/i915: move a few more functions to accept the rpm structure
  drm/i915: update rpm_get/put to use the rpm structure
  drm/i915: update with_intel_runtime_pm to use the rpm structure

 drivers/gpu/drm/i915/gt/intel_context.c       |   2 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   8 +-
 drivers/gpu/drm/i915/gt/intel_hangcheck.c     |   4 +-
 drivers/gpu/drm/i915/gt/intel_reset.c         |   6 +-
 drivers/gpu/drm/i915/gt/selftest_hangcheck.c  |  20 +-
 drivers/gpu/drm/i915/gt/selftest_lrc.c        |  36 +--
 .../gpu/drm/i915/gt/selftest_workarounds.c    |  16 +-
 drivers/gpu/drm/i915/gvt/aperture_gm.c        |  17 +-
 drivers/gpu/drm/i915/gvt/gvt.h                |   4 +-
 drivers/gpu/drm/i915/gvt/sched_policy.c       |   4 +-
 drivers/gpu/drm/i915/gvt/scheduler.c          |   4 +-
 drivers/gpu/drm/i915/i915_debugfs.c           |  79 +++----
 drivers/gpu/drm/i915/i915_drv.c               |  57 ++---
 drivers/gpu/drm/i915/i915_drv.h               |  50 +----
 drivers/gpu/drm/i915/i915_gem.c               |  30 +--
 drivers/gpu/drm/i915/i915_gem_fence_reg.c     |   6 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c           |   8 +-
 drivers/gpu/drm/i915/i915_gem_shrinker.c      |  12 +-
 drivers/gpu/drm/i915/i915_irq.c               |  38 ++--
 drivers/gpu/drm/i915/i915_perf.c              |   6 +-
 drivers/gpu/drm/i915/i915_pmu.c               |  11 +-
 drivers/gpu/drm/i915/i915_sysfs.c             |  14 +-
 drivers/gpu/drm/i915/i915_vma.c               |   2 +-
 drivers/gpu/drm/i915/intel_csr.c              |   2 +-
 drivers/gpu/drm/i915/intel_display.c          |   4 +-
 drivers/gpu/drm/i915/intel_drv.h              | 105 ---------
 drivers/gpu/drm/i915/intel_fbdev.c            |   6 +-
 drivers/gpu/drm/i915/intel_guc.c              |   4 +-
 drivers/gpu/drm/i915/intel_guc_log.c          |   6 +-
 drivers/gpu/drm/i915/intel_hotplug.c          |   4 +-
 drivers/gpu/drm/i915/intel_huc.c              |   2 +-
 drivers/gpu/drm/i915/intel_panel.c            |   2 +-
 drivers/gpu/drm/i915/intel_pm.c               |   8 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       | 205 ++++++++----------
 drivers/gpu/drm/i915/intel_runtime_pm.h       | 185 ++++++++++++++--
 drivers/gpu/drm/i915/intel_uc.c               |   2 +-
 drivers/gpu/drm/i915/intel_uncore.c           |  26 +--
 drivers/gpu/drm/i915/intel_uncore.h           |   4 +-
 drivers/gpu/drm/i915/intel_wakeref.c          |   4 +-
 drivers/gpu/drm/i915/selftests/huge_pages.c   |   4 +-
 drivers/gpu/drm/i915/selftests/i915_active.c  |   8 +-
 drivers/gpu/drm/i915/selftests/i915_gem.c     |  10 +-
 .../drm/i915/selftests/i915_gem_coherency.c   |   4 +-
 .../gpu/drm/i915/selftests/i915_gem_context.c |  18 +-
 .../gpu/drm/i915/selftests/i915_gem_evict.c   |   6 +-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c |   8 +-
 .../gpu/drm/i915/selftests/i915_gem_object.c  |   6 +-
 drivers/gpu/drm/i915/selftests/i915_request.c |  22 +-
 .../gpu/drm/i915/selftests/i915_timeline.c    |  16 +-
 drivers/gpu/drm/i915/selftests/intel_guc.c    |   8 +-
 drivers/gpu/drm/i915/selftests/intel_uncore.c |   4 +-
 .../gpu/drm/i915/selftests/mock_gem_device.c  |   2 +-
 52 files changed, 553 insertions(+), 566 deletions(-)

-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux