public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915/bdw: Set initial rps freq to RP1
@ 2014-04-01  0:16 Ben Widawsky
  2014-04-01  0:16 ` [PATCH 2/4] drm/i915/bdw: Extract rp_state_caps logic Ben Widawsky
  2014-04-01  0:16 ` [PATCH 3/4] drm/i915/bdw: RPS frequency bits are the same as HSW Ben Widawsky
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Widawsky @ 2014-04-01  0:16 UTC (permalink / raw)
  To: Intel GFX

Programming it outside of the rp0-rp1 range is considered a programming
error. Since we do not know that the previous value would actually be in
the range, program something we've read from the hardware, and therefore
know will work.

This is potentially an issue for platforms whose ranges are outside the
norms given in the programming guide (ie. early silicon)

v2: Use RP1 instead of RPn

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index e9a9aef..51ff40e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3284,8 +3284,10 @@ static void gen8_enable_rps(struct drm_device *dev)
 				    rc6_mask);
 
 	/* 4 Program defaults and thresholds for RPS*/
-	I915_WRITE(GEN6_RPNSWREQ, HSW_FREQUENCY(10)); /* Request 500 MHz */
-	I915_WRITE(GEN6_RC_VIDEO_FREQ, HSW_FREQUENCY(12)); /* Request 600 MHz */
+	I915_WRITE(GEN6_RPNSWREQ,
+		   HSW_FREQUENCY(dev_priv->rps.rp1_freq));
+	I915_WRITE(GEN6_RC_VIDEO_FREQ,
+		   HSW_FREQUENCY(dev_priv->rps.rp1_freq));
 	/* NB: Docs say 1s, and 1000000 - which aren't equivalent */
 	I915_WRITE(GEN6_RP_DOWN_TIMEOUT, 100000000 / 128); /* 1 second timeout */
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/4] drm/i915/bdw: Set initial rps freq to RP1
@ 2014-04-01  0:18 Ben Widawsky
  2014-04-01  0:18 ` [PATCH 2/4] drm/i915/bdw: Extract rp_state_caps logic Ben Widawsky
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Widawsky @ 2014-04-01  0:18 UTC (permalink / raw)
  To: Intel GFX

Programming it outside of the rp0-rp1 range is considered a programming
error. Since we do not know that the previous value would actually be in
the range, program something we've read from the hardware, and therefore
know will work.

This is potentially an issue for platforms whose ranges are outside the
norms given in the programming guide (ie. early silicon)

v2: Use RP1 instead of RPn

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index e9a9aef..51ff40e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3284,8 +3284,10 @@ static void gen8_enable_rps(struct drm_device *dev)
 				    rc6_mask);
 
 	/* 4 Program defaults and thresholds for RPS*/
-	I915_WRITE(GEN6_RPNSWREQ, HSW_FREQUENCY(10)); /* Request 500 MHz */
-	I915_WRITE(GEN6_RC_VIDEO_FREQ, HSW_FREQUENCY(12)); /* Request 600 MHz */
+	I915_WRITE(GEN6_RPNSWREQ,
+		   HSW_FREQUENCY(dev_priv->rps.rp1_freq));
+	I915_WRITE(GEN6_RC_VIDEO_FREQ,
+		   HSW_FREQUENCY(dev_priv->rps.rp1_freq));
 	/* NB: Docs say 1s, and 1000000 - which aren't equivalent */
 	I915_WRITE(GEN6_RP_DOWN_TIMEOUT, 100000000 / 128); /* 1 second timeout */
 
-- 
1.9.1

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

end of thread, other threads:[~2014-04-01  7:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01  0:16 [PATCH 1/4] drm/i915/bdw: Set initial rps freq to RP1 Ben Widawsky
2014-04-01  0:16 ` [PATCH 2/4] drm/i915/bdw: Extract rp_state_caps logic Ben Widawsky
2014-04-01  0:16 ` [PATCH 3/4] drm/i915/bdw: RPS frequency bits are the same as HSW Ben Widawsky
2014-04-01  7:38   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2014-04-01  0:18 [PATCH 1/4] drm/i915/bdw: Set initial rps freq to RP1 Ben Widawsky
2014-04-01  0:18 ` [PATCH 2/4] drm/i915/bdw: Extract rp_state_caps logic Ben Widawsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox