Re: [PATCH v2 10/11] drm/i915: Create generic functions to control RC6, RPS

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

 





On 10/6/2017 6:16 PM, Chris Wilson wrote:
Quoting Sagar Arun Kamble (2017-10-06 13:13:39)
Prepared generic functions intel_enable_rc6, intel_disable_rc6,
intel_enable_rps and intel_disable_rps functions to setup RC6/RPS
based on platforms.

v2: Make intel_enable/disable_rc6/rps static. (Chris)

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
Cc: Imre Deak <imre.deak@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@xxxxxxxxx>
---
  drivers/gpu/drm/i915/intel_pm.c | 97 ++++++++++++++++++++++++++---------------
  1 file changed, 62 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ce2dc5b..03264fe 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -7972,75 +7972,102 @@ void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv)
         gen6_reset_rps_interrupts(dev_priv);
  }
-void intel_disable_gt_powersave(struct drm_i915_private *dev_priv)
+static void intel_disable_rc6(struct drm_i915_private *dev_priv)
  {
-       if (!READ_ONCE(dev_priv->pm.rps.enabled))
-               return;
-
-       mutex_lock(&dev_priv->pm.pcu_lock);
lockdep_assert_held(dev_priv->pm.pcu_lock); ?

We often skip it for statics, unless we know we are planning on adding
an interface that may not take the lock.
Sure will add this. Thanks.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux