[Intel-xe] [PATCH 1/4] Revert "FIXME: drm/i915: runtime pm changes"
Jouni Högander
jouni.hogander at intel.com
Mon Sep 18 07:00:57 UTC 2023
This reverts commit 742e449ddca435897eec6d9c21d4d2573b77242d.
This change is not needed anymore as next patch is changing this to
use pm_runtime_suspended() instead of custom suspended boolean.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
.../drm/i915/display/intel_display_power.c | 23 ++++++++++---------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index c257542d269d..068dc223653d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -216,10 +216,8 @@ bool __intel_display_power_is_enabled(struct drm_i915_private *dev_priv,
struct i915_power_well *power_well;
bool is_enabled;
-#ifdef I915
if (dev_priv->runtime_pm.suspended)
return false;
-#endif
is_enabled = true;
@@ -638,6 +636,7 @@ release_async_put_domains(struct i915_power_domains *power_domains,
struct drm_i915_private *dev_priv =
container_of(power_domains, struct drm_i915_private,
display.power.domains);
+ struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
enum intel_display_power_domain domain;
intel_wakeref_t wakeref;
@@ -646,8 +645,8 @@ release_async_put_domains(struct i915_power_domains *power_domains,
* wakeref to make the state checker happy about the HW access during
* power well disabling.
*/
- assert_rpm_raw_wakeref_held(&dev_priv->runtime_pm);
- wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
+ assert_rpm_raw_wakeref_held(rpm);
+ wakeref = intel_runtime_pm_get(rpm);
for_each_power_domain(domain, mask) {
/* Clear before put, so put's sanity check is happy. */
@@ -655,7 +654,7 @@ release_async_put_domains(struct i915_power_domains *power_domains,
__intel_display_power_put_domain(dev_priv, domain);
}
- intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
+ intel_runtime_pm_put(rpm, wakeref);
}
static void
@@ -665,7 +664,8 @@ intel_display_power_put_async_work(struct work_struct *work)
container_of(work, struct drm_i915_private,
display.power.domains.async_put_work.work);
struct i915_power_domains *power_domains = &dev_priv->display.power.domains;
- intel_wakeref_t new_work_wakeref = intel_runtime_pm_get_raw(&dev_priv->runtime_pm);
+ struct intel_runtime_pm *rpm = &dev_priv->runtime_pm;
+ intel_wakeref_t new_work_wakeref = intel_runtime_pm_get_raw(rpm);
intel_wakeref_t old_work_wakeref = 0;
mutex_lock(&power_domains->lock);
@@ -706,9 +706,9 @@ intel_display_power_put_async_work(struct work_struct *work)
mutex_unlock(&power_domains->lock);
if (old_work_wakeref)
- intel_runtime_pm_put_raw(&dev_priv->runtime_pm, old_work_wakeref);
+ intel_runtime_pm_put_raw(rpm, old_work_wakeref);
if (new_work_wakeref)
- intel_runtime_pm_put_raw(&dev_priv->runtime_pm, new_work_wakeref);
+ intel_runtime_pm_put_raw(rpm, new_work_wakeref);
}
/**
@@ -730,7 +730,8 @@ void __intel_display_power_put_async(struct drm_i915_private *i915,
int delay_ms)
{
struct i915_power_domains *power_domains = &i915->display.power.domains;
- intel_wakeref_t work_wakeref = intel_runtime_pm_get_raw(&i915->runtime_pm);
+ struct intel_runtime_pm *rpm = &i915->runtime_pm;
+ intel_wakeref_t work_wakeref = intel_runtime_pm_get_raw(rpm);
delay_ms = delay_ms >= 0 ? delay_ms : 100;
@@ -762,9 +763,9 @@ void __intel_display_power_put_async(struct drm_i915_private *i915,
mutex_unlock(&power_domains->lock);
if (work_wakeref)
- intel_runtime_pm_put_raw(&i915->runtime_pm, work_wakeref);
+ intel_runtime_pm_put_raw(rpm, work_wakeref);
- intel_runtime_pm_put(&i915->runtime_pm, wakeref);
+ intel_runtime_pm_put(rpm, wakeref);
}
/**
--
2.34.1
More information about the Intel-xe
mailing list