diff options
author | Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> | 2019-06-13 16:21:49 -0700 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-14 15:58:33 +0100 |
commit | d5b6c275d04aacffc06b5bad837a6805091fb7c6 (patch) | |
tree | 712e9788bfa62ed681bbb4398b7344a346af3cc4 /drivers/gpu/drm/i915/intel_drv.h | |
parent | cc49abc2460fadcc5fc8ec703538100405a405d4 (diff) | |
download | lwn-d5b6c275d04aacffc06b5bad837a6805091fb7c6.tar.gz lwn-d5b6c275d04aacffc06b5bad837a6805091fb7c6.zip |
drm/i915: prefer i915_runtime_pm in intel_runtime function
As a first step towards updating the code to work on the runtime_pm
structure instead of i915, rework all the internals to use and pass
around that.
v2: add comment for kdev (Jani), move rpm init after pdev init for
mock_device
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-2-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 3e337317f77e..aec40adf4876 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1656,14 +1656,18 @@ ____assert_rpm_wakelock_held(struct i915_runtime_pm *rpm, int wakeref_count) } static inline void -assert_rpm_raw_wakeref_held(struct drm_i915_private *i915) +__assert_rpm_raw_wakeref_held(struct i915_runtime_pm *rpm) { - struct i915_runtime_pm *rpm = &i915->runtime_pm; - ____assert_rpm_raw_wakeref_held(rpm, atomic_read(&rpm->wakeref_count)); } static inline void +assert_rpm_raw_wakeref_held(struct drm_i915_private *i915) +{ + __assert_rpm_raw_wakeref_held(&i915->runtime_pm); +} + +static inline void __assert_rpm_wakelock_held(struct i915_runtime_pm *rpm) { ____assert_rpm_wakelock_held(rpm, atomic_read(&rpm->wakeref_count)); |