Skip to contentSkip to conversation

drm/i915: Correct sandybrige overclocking

PATCH In review Ben Widawsky 4 participants 13 messages Mar 20, 2013 – Mar 25, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Correct sandybrige overclocking

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

I found this while reviewing Jesse's VLV patches.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -2
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");
Signature · 1 line
1.8.2
#1 lore raw
Quoted 6 lines · Ben Widawsky

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Quoted 6 lines
Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity,

(Clarity)! ((They) ((were) (not)) (even) (connected) (to) ((the) (mistake))). -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ben Widawsky
Quoted 45 lines · On Tue, 19 Mar 2013 20:19:56 -0700 Ben Widawsky <[email protected]> wrote:

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

I found this while reviewing Jesse's VLV patches.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2641

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +4 -2
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");

Yeah looks ok. I don't think I've seen a system where this flag gets set, but according to the docs this is the right thing to do.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#3 lore raw
Quoted 62 lines · Jesse Barnes
Quoted 45 lines · On Tue, 19 Mar 2013 20:19:56 -0700 Ben Widawsky <[email protected]> wrote:

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

I found this while reviewing Jesse's VLV patches.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2641

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +4 -2
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");

Yeah looks ok. I don't think I've seen a system where this flag gets set, but according to the docs this is the right thing to do.

Quoted 4 lines
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

So from what I gather, we shouldn't bother with -fixes, or stable, correct?

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#4 lore raw
Quoted 63 lines · On Wed, 20 Mar 2013 09:33:28 -0700 Ben Widawsky <[email protected]> wrote:
Quoted 62 lines · Jesse Barnes
Quoted 45 lines · On Tue, 19 Mar 2013 20:19:56 -0700 Ben Widawsky <[email protected]> wrote:

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

I found this while reviewing Jesse's VLV patches.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2641

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +4 -2
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");

Yeah looks ok. I don't think I've seen a system where this flag gets set, but according to the docs this is the right thing to do.

Quoted 7 lines
Quoted 4 lines
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

So from what I gather, we shouldn't bother with -fixes, or stable, correct?

Correct, unless someone complains about their gfx suddenly being a bit slower, it's not worth the risk.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#5 lore raw
Quoted 68 lines · Jesse Barnes
Quoted 65 lines · On Wed, 20 Mar 2013 09:33:28 -0700 Ben Widawsky <[email protected]> wrote:
Quoted 64 lines · Jesse Barnes
Quoted 45 lines · On Tue, 19 Mar 2013 20:19:56 -0700 Ben Widawsky <[email protected]> wrote:

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

I found this while reviewing Jesse's VLV patches.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2641

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +4 -2
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");

Yeah looks ok. I don't think I've seen a system where this flag gets set, but according to the docs this is the right thing to do.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center

So from what I gather, we shouldn't bother with -fixes, or stable, correct?

Correct, unless someone complains about their gfx suddenly being a bit slower, it's not worth the risk.

Concurred and so merged to dinq, thanks for the patch. I've also applied Chris' bikeshed.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#6 lore raw
In reply to Ben Widawsky
Quoted 29 lines · Ben Widawsky

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

Quoted 4 lines

I found this while reviewing Jesse's VLV patches.

Random guy on irc just confirmed that this actually fixes gpu overclocking on his machine: The overclock limit jumped from 1.1GHz to 1.9GHz (which is what he selected in his bios). Unfortunately he jumped irc before I could grab his tested-by, so won't (yet) move the patch to -fixes with a cc:
stable.

So: (Other) testers highly welcome ;-)

Cheers, Daniel

Quoted 29 lines
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -2
index c30e89a..86729b1 100644
@@ -2631,9 +2631,11 @@ static void gen6_enable_rps(struct drm_device *dev)
 	if (!ret) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
-		if (ret && pcu_mbox & (1<<31)) { /* OC supported */
+		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
+			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max from %dMHz to %dMHz\n",
+					 ((dev_priv->rps.max_delay & 0xff) * 50),
+					 ((pcu_mbox & 0xff) * 50));
 			dev_priv->rps.max_delay = pcu_mbox & 0xff;
-			DRM_DEBUG_DRIVER("overclocking supported, adjusting frequency max to %dMHz\n", pcu_mbox * 50);
 		}
 	} else {
 		DRM_DEBUG_DRIVER("Failed to set the min frequency\n");
Signature · 6 lines
1.8.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#7 lore raw
Quoted 35 lines · Daniel Vetter
Quoted 29 lines · Ben Widawsky

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

Quoted 4 lines

I found this while reviewing Jesse's VLV patches.

Quoted 7 lines

Random guy on irc just confirmed that this actually fixes gpu overclocking on his machine: The overclock limit jumped from 1.1GHz to 1.9GHz (which is what he selected in his bios). Unfortunately he jumped irc before I could grab his tested-by, so won't (yet) move the patch to -fixes with a cc:
stable.

So: (Other) testers highly welcome ;-)

Apparently massive overclocking like that makes your system die prematurely in a crash. So 3.10 it is, imo.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#8 lore raw
Quoted 42 lines · Daniel Vetter
Quoted 41 lines · Daniel Vetter
Quoted 29 lines · Ben Widawsky

Change the gen6+ max delay if the pcode read was successful (not the inverse).

The previous code was all sorts of wrong and has existed since I broke it:
commit 42c0526c930523425ff6edc95b7235ce7ab9308d

Author: Ben Widawsky <[email protected]>
Date:   Wed Sep 26 10:34:00 2012 -0700

drm/i915: Extract PCU communication

I added some parentheses for clarity, and I also corrected the debug message message to use the mask (wrong before I came along) and added a print to show the value we're changing from.

Looking over the code, I'm not actually sure what we're trying to do. I introduced the bug simply by extracting the function not implementing anything new. We already set max_delay based on the capabilities register (which is what we use elsewhere to determine min and max). This would potentially increase it, I suppose? Jesse, I can't find the document which explains the definitions of the pcode commands, maybe you have it around.

Based on Jesse's response, this could potentially be for -fixes, or stable, or maybe lead to us dropping it entirely. As the current code is is, things won't completely break because of the aforementioned capabilities register, and in my experimentation, enabling this has no effect, it goes from 1100->1100.

Quoted 4 lines

I found this while reviewing Jesse's VLV patches.

Random guy on irc just confirmed that this actually fixes gpu overclocking on his machine: The overclock limit jumped from 1.1GHz to 1.9GHz (which is what he selected in his bios). Unfortunately he jumped irc before I could grab his tested-by, so won't (yet) move the patch to -fixes with a cc:
stable.

Quoted 5 lines
Quoted 1 line

So: (Other) testers highly welcome ;-)

Apparently massive overclocking like that makes your system die prematurely in a crash. So 3.10 it is, imo.
-Daniel

It's like all overclocking I guess, we simply give the user an opportunity to shoot themselves in the foot. Glad to hear it is actually doing something though.

I agree that 3.10 sounds right; I'm thinking we'll want a module parameter or something as well, to prevent spurious bug reports. What do you think?

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#9 lore raw
Quoted 11 lines · Ben Widawsky
Quoted 3 lines

Apparently massive overclocking like that makes your system die prematurely in a crash. So 3.10 it is, imo.
-Daniel

It's like all overclocking I guess, we simply give the user an opportunity to shoot themselves in the foot. Glad to hear it is actually doing something though.

I agree that 3.10 sounds right; I'm thinking we'll want a module parameter or something as well, to prevent spurious bug reports. What do you think?

I think not having a module option is ok, I don't expect that the enthusiast boards required to adjust the limits are that common. So it shouldn't affect more than just a few users, and those it does affect should know what their doing. Module options after all don't prevent them from setting unstable rc6 options, either ;-)
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#10 lore raw

PATCH 1/1 drm/i915: Don't overclock on Haswell

In reply to Ben Widawsky

HSW doesn't overclock the same way as IVB or SNB. I do not know about VLV, so I've kept that off as well. I'm still working on getting the doc updates to explain how we overclock on Haswell.

---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index ce3db2c..9c11dd9 100644
@@ -2628,7 +2628,7 @@ static void gen6_enable_rps(struct drm_device *dev)
 		   (IS_HASWELL(dev) ? GEN7_RP_DOWN_IDLE_AVG : GEN6_RP_DOWN_IDLE_CONT));
 
 	ret = sandybridge_pcode_write(dev_priv, GEN6_PCODE_WRITE_MIN_FREQ_TABLE, 0);
-	if (!ret) {
+	if (!ret && IS_GEN6(dev) || IS_IVYBRIDGE(dev)) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
 		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */
Signature · 1 line
1.8.2
Reviewed-by on v1 1/1
#11 lore raw

Re: [PATCH] drm/i915: Don't overclock on Haswell

Quoted 15 lines · On Sat, 23 Mar 2013 17:46:31 -0700 Ben Widawsky <[email protected]> wrote:

HSW doesn't overclock the same way as IVB or SNB. I do not know about VLV, so I've kept that off as well. I'm still working on getting the doc updates to explain how we overclock on Haswell.

---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index ce3db2c..9c11dd9 100644

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2634

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -2628,7 +2628,7 @@ static void gen6_enable_rps(struct drm_device *dev)
 		   (IS_HASWELL(dev) ? GEN7_RP_DOWN_IDLE_AVG : GEN6_RP_DOWN_IDLE_CONT));
 
 	ret = sandybridge_pcode_write(dev_priv, GEN6_PCODE_WRITE_MIN_FREQ_TABLE, 0);
-	if (!ret) {
+	if (!ret && IS_GEN6(dev) || IS_IVYBRIDGE(dev)) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
 		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */

This won't affect VLV, since I have a new rps enable function in my latest set. But it looks fine.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#12 lore raw

Re: [PATCH] drm/i915: Don't overclock on Haswell

Quoted 30 lines · Jesse Barnes
Quoted 15 lines · On Sat, 23 Mar 2013 17:46:31 -0700 Ben Widawsky <[email protected]> wrote:

HSW doesn't overclock the same way as IVB or SNB. I do not know about VLV, so I've kept that off as well. I'm still working on getting the doc updates to explain how we overclock on Haswell.

---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index ce3db2c..9c11dd9 100644

drivers/gpu/drm/i915/intel_pm.c static void gen6_enable_rps(struct drm_device *dev) · line 2634

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -2628,7 +2628,7 @@ static void gen6_enable_rps(struct drm_device *dev)
 		   (IS_HASWELL(dev) ? GEN7_RP_DOWN_IDLE_AVG : GEN6_RP_DOWN_IDLE_CONT));
 
 	ret = sandybridge_pcode_write(dev_priv, GEN6_PCODE_WRITE_MIN_FREQ_TABLE, 0);
-	if (!ret) {
+	if (!ret && IS_GEN6(dev) || IS_IVYBRIDGE(dev)) {
 		pcu_mbox = 0;
 		ret = sandybridge_pcode_read(dev_priv, GEN6_READ_OC_PARAMS, &pcu_mbox);
 		if (!ret && (pcu_mbox & (1<<31))) { /* OC supported */

This won't affect VLV, since I have a new rps enable function in my latest set. But it looks fine.

Quoted 1 line

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch