Skip to contentSkip to conversation

drm/i915: Correct debugfs printout for RC1e.

PATCH Applied Eric Anholt 5 participants 12 messages Jan 24, 2012

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

PATCH 1/2 drm/i915: Correct debugfs printout for RC1e.

We had two things in a row claiming to be RC6.

---
 drivers/gpu/drm/i915/i915_debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
index a017b98..60dcee3 100644
@@ -1106,7 +1106,7 @@ static int gen6_drpc_info(struct seq_file *m)
 	seq_printf(m, "SW control enabled: %s\n",
 		   yesno((rpmodectl1 & GEN6_RP_MEDIA_MODE_MASK) ==
 			  GEN6_RP_MEDIA_SW_MODE));
-	seq_printf(m, "RC6 Enabled: %s\n",
+	seq_printf(m, "RC1e Enabled: %s\n",
 		   yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
 	seq_printf(m, "RC6 Enabled: %s\n",
 		   yesno(rcctl1 & GEN6_RC_CTL_RC6_ENABLE));
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 2/2 drm/i915: Re-enable gen7 RC6 and GPU turbo after resume.

---
 drivers/gpu/drm/i915/i915_suspend.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_suspend.c +2 -2
index 30d924f..2b5eb22 100644
@@ -827,7 +827,7 @@ int i915_save_state(struct drm_device *dev)
 
 	if (IS_IRONLAKE_M(dev))
 		ironlake_disable_drps(dev);
-	if (IS_GEN6(dev))
+	if (INTEL_INFO(dev)->gen >= 6)
 		gen6_disable_rps(dev);
 
 	/* Cache mode state */
@@ -886,7 +886,7 @@ int i915_restore_state(struct drm_device *dev)
 		intel_init_emon(dev);
 	}
 
-	if (IS_GEN6(dev)) {
+	if (INTEL_INFO(dev)->gen >= 6) {
 		gen6_enable_rps(dev_priv);
 		gen6_update_ring_freq(dev_priv);
 	}
Signature · 1 line
1.7.7.3
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915: Re-enable gen7 RC6 and GPU turbo after resume.

Quoted 8 lines · Eric Anholt
drivers/gpu/drm/i915/i915_suspend.c +1 -1
 	if (IS_IRONLAKE_M(dev))
 		ironlake_disable_drps(dev);
-	if (IS_GEN6(dev))
+	if (INTEL_INFO(dev)->gen >= 6)
 		gen6_disable_rps(dev);
 
 	/* Cache mode state */

drivers/gpu/drm/i915/i915_suspend.c int i915_restore_state(struct drm_device *dev) · line 892

Quoted 8 lines
drivers/gpu/drm/i915/i915_suspend.c +1 -1
@@ -886,7 +886,7 @@ int i915_restore_state(struct drm_device *dev)
 		intel_init_emon(dev);
 	}
 
-	if (IS_GEN6(dev)) {
+	if (INTEL_INFO(dev)->gen >= 6) {
 		gen6_enable_rps(dev_priv);
 		gen6_update_ring_freq(dev_priv);
 	}

I fear we'll continue to find stuff like this...

I just reviewed all of the IS_GEN6 calls and found that i915_forcewake_open/i915_forcewake_release only work on GEN6; I assume these are supposed to work on GEN6 and after, so a test like the above might be appropriate?

I didn't see much else, although there are some suspicious bits in i915_debugfs.c that could probably use review.

In any case, the above patch is

and I will merge it into -fixes

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: [PATCH 2/2] drm/i915: Re-enable gen7 RC6 and GPU turbo after resume.

Quoted 21 lines · Keith Packard
Quoted 8 lines · Eric Anholt
drivers/gpu/drm/i915/i915_suspend.c +1 -1
 	if (IS_IRONLAKE_M(dev))
 		ironlake_disable_drps(dev);
-	if (IS_GEN6(dev))
+	if (INTEL_INFO(dev)->gen >= 6)
 		gen6_disable_rps(dev);
 
 	/* Cache mode state */

drivers/gpu/drm/i915/i915_suspend.c int i915_restore_state(struct drm_device *dev) · line 892

Quoted 8 lines
drivers/gpu/drm/i915/i915_suspend.c +1 -1
@@ -886,7 +886,7 @@ int i915_restore_state(struct drm_device *dev)
 		intel_init_emon(dev);
 	}
 
-	if (IS_GEN6(dev)) {
+	if (INTEL_INFO(dev)->gen >= 6) {
 		gen6_enable_rps(dev_priv);
 		gen6_update_ring_freq(dev_priv);
 	}

I fear we'll continue to find stuff like this...

Quoted 4 lines

I just reviewed all of the IS_GEN6 calls and found that i915_forcewake_open/i915_forcewake_release only work on GEN6; I assume these are supposed to work on GEN6 and after, so a test like the above might be appropriate?

Oh, so that's why the tools didn't work. Sigh.

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] drm/i915: Re-enable gen7 RC6 and GPU turbo after resume.

In reply to Eric Anholt
Quoted 3 lines · Eric Anholt
Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] drm/i915: Re-enable gen7 RC6 and GPU turbo after resume.

In reply to Eric Anholt
Quoted 20 lines · Eric Anholt
---
  drivers/gpu/drm/i915/i915_suspend.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_suspend.c +1 -1
index 30d924f..2b5eb22 100644
@@ -827,7 +827,7 @@ int i915_save_state(struct drm_device *dev)
 
  	if (IS_IRONLAKE_M(dev))
  		ironlake_disable_drps(dev);
-	if (IS_GEN6(dev))
+	if (INTEL_INFO(dev)->gen>= 6)
  		gen6_disable_rps(dev);
 
  	/* Cache mode state */

drivers/gpu/drm/i915/i915_suspend.c int i915_restore_state(struct drm_device *dev) · line 892

Quoted 8 lines
drivers/gpu/drm/i915/i915_suspend.c +1 -1
@@ -886,7 +886,7 @@ int i915_restore_state(struct drm_device *dev)
  		intel_init_emon(dev);
  	}
 
-	if (IS_GEN6(dev)) {
+	if (INTEL_INFO(dev)->gen>= 6) {
  		gen6_enable_rps(dev_priv);
  		gen6_update_ring_freq(dev_priv);
  	}
Reviewed-by on v1 1/2
#7 lore raw
In reply to Eric Anholt

drivers/gpu/drm/i915/i915_debugfs.c static int gen6_drpc_info(struct seq_file *m) · line 1110

Quoted 6 lines · Eric Anholt
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
 	seq_printf(m, "SW control enabled: %s\n",
 		   yesno((rpmodectl1 & GEN6_RP_MEDIA_MODE_MASK) ==
 			  GEN6_RP_MEDIA_SW_MODE));
-	seq_printf(m, "RC6 Enabled: %s\n",
+	seq_printf(m, "RC1e Enabled: %s\n",
 		   yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));

(I'll stick this in -fixes)

Signature · 1 line
[email protected]

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/2
#10 lore raw
In reply to Eric Anholt
Quoted 12 lines · Eric Anholt

We had two things in a row claiming to be RC6.

---
  drivers/gpu/drm/i915/i915_debugfs.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
index a017b98..60dcee3 100644

drivers/gpu/drm/i915/i915_debugfs.c static int gen6_drpc_info(struct seq_file *m) · line 1112

Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -1106,7 +1106,7 @@ static int gen6_drpc_info(struct seq_file *m)
  	seq_printf(m, "SW control enabled: %s\n",
  		   yesno((rpmodectl1&  GEN6_RP_MEDIA_MODE_MASK) ==
  			  GEN6_RP_MEDIA_SW_MODE));
-	seq_printf(m, "RC6 Enabled: %s\n",
+	seq_printf(m, "RC1e Enabled: %s\n",
  		   yesno(rcctl1&  GEN6_RC_CTL_RC1e_ENABLE));
  	seq_printf(m, "RC6 Enabled: %s\n",
  		   yesno(rcctl1&  GEN6_RC_CTL_RC6_ENABLE));