Skip to contentSkip to conversation

xdrm/i915: Respect HW RC6 states availability

PATCH In review Rodrigo Vivi 3 participants 5 messages Oct 24, 2012 – Oct 26, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 xdrm/i915: Respect HW RC6 states availability

If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.

v2: fixed "if" comparison pointed by Chris Wilson

---
 drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +4 -1
index 50f5809..b6362d0 100644
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
 int intel_enable_rc6(const struct drm_device *dev)
 {
 	/* Respect the kernel parameter if it is set */
-	if (i915_enable_rc6 >= 0)
+	if (i915_enable_rc6 == 0)
 		return i915_enable_rc6;
 
 	if (INTEL_INFO(dev)->gen == 5) {
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
 		return INTEL_RC6_ENABLE;
 	}
 
+	if (i915_enable_rc6 > 0)
+		return i915_enable_rc6;
+
 	DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
 	return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
 }
Signature · 1 line
1.7.11.7
#2 lore raw
Quoted 5 lines · On Wed, 24 Oct 2012 20:05:15 -0200 Rodrigo Vivi <[email protected]> wrote:

If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.

v2: fixed "if" comparison pointed by Chris Wilson

For future reference, putting "v2" in the title is often helpful in situations like this.

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index 50f5809..b6362d0 100644

drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device
 *dev) int intel_enable_rc6(const struct drm_device *dev)
 {
 	/* Respect the kernel parameter if it is set */
-	if (i915_enable_rc6 >= 0)
+	if (i915_enable_rc6 == 0)
 		return i915_enable_rc6;
 
 	if (INTEL_INFO(dev)->gen == 5) {

drivers/gpu/drm/i915/intel_pm.c int intel_enable_rc6(const struct drm_device · line 2402

Quoted 9 lines
drivers/gpu/drm/i915/intel_pm.c +3 -0
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device
 *dev) return INTEL_RC6_ENABLE;
 	}
 
+	if (i915_enable_rc6 > 0)
+		return i915_enable_rc6;
+
 	DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
 	return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
 }

I like the direction this patch is going but I think it does limit people with knowledge might want to do (for instance, I ran with rc6 on ILK just fine for quite a while).

How about we use add_taint instead, and a printk with KERN_WARNING for platforms which have known issues?

#3 lore raw
Quoted 7 lines · Ben Widawsky

Rodrigo Vivi <[email protected]> wrote:
I like the direction this patch is going but I think it does limit people with knowledge might want to do (for instance, I ran with rc6 on ILK just fine for quite a while).

How about we use add_taint instead, and a printk with KERN_WARNING for platforms which have known issues?

Good suggestion. I will definitely try to remember to apply this in future. :)

I don't see anything wrong with allowing people to shoot themselves in the foot (as they often have the habit of hitting the wrong one), just so long as we are clear that it is not the default for a very good reason. -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw

PATCH 1/1 drm/i915: Respect HW RC6 states availability

In reply to a message not in the archive

If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.

v2: fixed "if" comparison pointed by Chris Wilson

---
 drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +4 -1
index 50f5809..b6362d0 100644
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
 int intel_enable_rc6(const struct drm_device *dev)
 {
 	/* Respect the kernel parameter if it is set */
-	if (i915_enable_rc6 >= 0)
+	if (i915_enable_rc6 == 0)
 		return i915_enable_rc6;
 
 	if (INTEL_INFO(dev)->gen == 5) {
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
 		return INTEL_RC6_ENABLE;
 	}
 
+	if (i915_enable_rc6 > 0)
+		return i915_enable_rc6;
+
 	DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
 	return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
 }
Signature · 1 line
1.7.11.7
#5 lore raw

Re: [PATCH] drm/i915: Respect HW RC6 states availability

please ignore the other one. Stupid me (again) confused emacs with vim and messed title up.
also I don't know why git send-email didn't like my in-reply-to

Quoted 35 lines · Rodrigo Vivi

If Hardware doesn't allow RC6p or RC6pp we shall avoid end users turning them on, falling back to the only RC6 deepness available.

v2: fixed "if" comparison pointed by Chris Wilson

---
 drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +4 -2
index 50f5809..b6362d0 100644
@@ -2370,7 +2370,7 @@ static void gen6_disable_rps(struct drm_device *dev)
 int intel_enable_rc6(const struct drm_device *dev)
 {
        /* Respect the kernel parameter if it is set */
-       if (i915_enable_rc6 >= 0)
+       if (i915_enable_rc6 == 0)
                return i915_enable_rc6;
 
        if (INTEL_INFO(dev)->gen == 5) {
@@ -2394,6 +2394,9 @@ int intel_enable_rc6(const struct drm_device *dev)
                return INTEL_RC6_ENABLE;
        }
 
+       if (i915_enable_rc6 > 0)
+               return i915_enable_rc6;
+
        DRM_DEBUG_DRIVER("RC6 and deep RC6 enabled\n");
        return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
 }
--

1.7.11.7

Signature · 2 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br