* [PATCH] drm/i915: Move the common RPS warnings to intel_set_rps()
@ 2017-02-17 8:37 Chris Wilson
2017-02-17 9:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-17 10:02 ` [PATCH] " Szwichtenberg, Radoslaw
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-02-17 8:37 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>
---
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 4e9488bd9c3c..9a5af34db74d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4915,10 +4915,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.
*/
@@ -4954,10 +4950,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;
@@ -5108,6 +5100,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] 3+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Move the common RPS warnings to intel_set_rps()
2017-02-17 8:37 [PATCH] drm/i915: Move the common RPS warnings to intel_set_rps() Chris Wilson
@ 2017-02-17 9:52 ` Patchwork
2017-02-17 10:02 ` [PATCH] " Szwichtenberg, Radoslaw
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-02-17 9:52 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Move the common RPS warnings to intel_set_rps()
URL : https://patchwork.freedesktop.org/series/19823/
State : success
== Summary ==
Series 19823v1 drm/i915: Move the common RPS warnings to intel_set_rps()
https://patchwork.freedesktop.org/api/1.0/series/19823/revisions/1/mbox/
fi-bdw-5557u total:252 pass:241 dwarn:0 dfail:0 fail:0 skip:11
fi-bsw-n3050 total:252 pass:213 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:252 pass:233 dwarn:0 dfail:0 fail:0 skip:19
fi-bxt-t5700 total:83 pass:70 dwarn:0 dfail:0 fail:0 skip:12
fi-byt-j1900 total:252 pass:225 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:252 pass:221 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16
fi-hsw-4770r total:252 pass:236 dwarn:0 dfail:0 fail:0 skip:16
fi-ilk-650 total:252 pass:202 dwarn:0 dfail:0 fail:0 skip:50
fi-ivb-3520m total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-ivb-3770 total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-kbl-7500u total:252 pass:234 dwarn:0 dfail:0 fail:0 skip:18
fi-skl-6260u total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10
fi-skl-6700hq total:252 pass:235 dwarn:0 dfail:0 fail:0 skip:17
fi-skl-6700k total:252 pass:230 dwarn:4 dfail:0 fail:0 skip:18
fi-skl-6770hq total:252 pass:242 dwarn:0 dfail:0 fail:0 skip:10
fi-snb-2520m total:252 pass:224 dwarn:0 dfail:0 fail:0 skip:28
fi-snb-2600 total:252 pass:223 dwarn:0 dfail:0 fail:0 skip:29
c2033e7aa383d062000e024c5fac5f46560327cd drm-tip: 2017y-02m-16d-20h-42m-04s UTC integration manifest
967417d drm/i915: Move the common RPS warnings to intel_set_rps()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3872/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Move the common RPS warnings to intel_set_rps()
2017-02-17 8:37 [PATCH] drm/i915: Move the common RPS warnings to intel_set_rps() Chris Wilson
2017-02-17 9:52 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-02-17 10:02 ` Szwichtenberg, Radoslaw
1 sibling, 0 replies; 3+ messages in thread
From: Szwichtenberg, Radoslaw @ 2017-02-17 10:02 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk
On Fri, 2017-02-17 at 08:37 +0000, Chris Wilson wrote:
> 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>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-17 10:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-17 8:37 [PATCH] drm/i915: Move the common RPS warnings to intel_set_rps() Chris Wilson
2017-02-17 9:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-02-17 10:02 ` [PATCH] " Szwichtenberg, Radoslaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox