intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] drm/i915: Move the common RPS warnings to intel_set_rps()
@ 2017-02-20  9:47 Chris Wilson
  2017-02-20  9:47 ` [PATCH 2/7] drm/i915: Store the requested frequency whilst RPS is disabled Chris Wilson
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Chris Wilson @ 2017-02-20  9:47 UTC (permalink / raw)
  To: intel-gfx

Instead of having each back-end provide identical guards, just have a
singular set in intel_set_rps() to verify that the caller is obeying the
rules.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index fe243c65de1a..e1878cb5d569 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4914,10 +4914,6 @@ static u32 gen6_rps_pm_mask(struct drm_i915_private *dev_priv, u8 val)
  * update the GEN6_RP_INTERRUPT_LIMITS register accordingly. */
 static int gen6_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
-	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
-	WARN_ON(val > dev_priv->rps.max_freq);
-	WARN_ON(val < dev_priv->rps.min_freq);
-
 	/* min/max delay may still have been modified so be sure to
 	 * write the limits value.
 	 */
@@ -4955,10 +4951,6 @@ static int valleyview_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
 	int err;
 
-	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
-	WARN_ON(val > dev_priv->rps.max_freq);
-	WARN_ON(val < dev_priv->rps.min_freq);
-
 	if (WARN_ONCE(IS_CHERRYVIEW(dev_priv) && (val & 1),
 		      "Odd GPU freq value\n"))
 		val &= ~1;
@@ -5109,6 +5101,10 @@ int intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
 	int err;
 
+	lockdep_assert_held(&dev_priv->rps.hw_lock);
+	GEM_BUG_ON(val > dev_priv->rps.max_freq);
+	GEM_BUG_ON(val < dev_priv->rps.min_freq);
+
 	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
 		err = valleyview_set_rps(dev_priv, val);
 	else
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-02-20 14:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20  9:47 [PATCH 1/7] drm/i915: Move the common RPS warnings to intel_set_rps() Chris Wilson
2017-02-20  9:47 ` [PATCH 2/7] drm/i915: Store the requested frequency whilst RPS is disabled Chris Wilson
2017-02-20 12:36   ` Szwichtenberg, Radoslaw
2017-02-20  9:47 ` [PATCH 3/7] drm/i915: Remove unrequired POSTING_READ from gen6_set_rps() Chris Wilson
2017-02-20 11:15   ` Szwichtenberg, Radoslaw
2017-02-20 12:43     ` chris
2017-02-20  9:47 ` [PATCH 4/7] drm/i915: Use set_rps to enable RPS Chris Wilson
2017-02-20 14:29   ` Mika Kuoppala
2017-02-20 14:38     ` Chris Wilson
2017-02-20  9:47 ` [PATCH 5/7] drm/i915: Take forcewake for setting the RPS thresholds Chris Wilson
2017-02-20 14:34   ` Mika Kuoppala
2017-02-20 14:45     ` Chris Wilson
2017-02-20  9:47 ` [PATCH 6/7] drm/i915: Restart RPS using the same RP_CONTROL as from initialisation Chris Wilson
2017-02-20 13:33   ` Szwichtenberg, Radoslaw
2017-02-20 14:40   ` Mika Kuoppala
2017-02-20 14:47     ` Chris Wilson
2017-02-20 14:59       ` Mika Kuoppala
2017-02-20  9:47 ` [PATCH 7/7] drm/i915: Stop RPS as we adjust thresholds Chris Wilson
2017-02-20 12:35   ` Szwichtenberg, Radoslaw
2017-02-20 14:41   ` Mika Kuoppala
2017-02-20 10:51 ` ✗ Fi.CI.BAT: failure for series starting with [1/7] drm/i915: Move the common RPS warnings to intel_set_rps() Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).