summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.h
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-05-09 20:34:42 +0300
committerImre Deak <imre.deak@intel.com>2019-05-14 14:06:30 +0300
commit6cfe7ec02e854278fb341e62db54d49a2b199c62 (patch)
tree352beeb2fa39885f36f8eae2339f0c7bf59adb9a /drivers/gpu/drm/i915/intel_runtime_pm.h
parentad5125d6ef2de22212de82debd0baaecdaa7e7cd (diff)
downloadlinux-6cfe7ec02e854278fb341e62db54d49a2b199c62.tar.bz2
drm/i915: Remove the unneeded AUX power ref from intel_dp_detect()
We don't need the AUX power for the whole duration of the detect, only when we're doing AUX transfers. The AUX transfer function takes its own reference on the AUX power domain already. The two places during detect which access display core registers (not specific to a pipe/port/transcoder) only need the power domain that is required for that access. That power domain is equivalent to the device global power domain on most platforms (enabled whenever we hold a runtime PM reference) except on CHV/VLV where it's equivalent to the display power well. Add a new power domain that reflects the above, and use this at the two spots accessing registers. With that we can avoid taking the AUX reference for the whole duration of the detect function. Put the domains asynchronously to avoid the unneeded on-off-on toggling. Also adapt the idea from with_intel_runtime_pm et al. for making it easy to write short sequences where a display power ref is needed. v2: (Ville) - Add with_intel_display_power() helper to simplify things. - s/bool res/bool is_connected/ Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-8-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.h')
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h
index 56ad79ef0806..b964ca7af9c8 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.h
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
@@ -91,6 +91,11 @@ intel_display_power_put_async(struct drm_i915_private *i915,
__intel_display_power_put_async(i915, domain, -1);
}
#endif
+
+#define with_intel_display_power(i915, domain, wf) \
+ for ((wf) = intel_display_power_get((i915), (domain)); (wf); \
+ intel_display_power_put_async((i915), (domain), (wf)), (wf) = 0)
+
void icl_dbuf_slices_update(struct drm_i915_private *dev_priv,
u8 req_slices);