Skip to contentSkip to conversation

drm/i915: Don't pretend ips is always enabled on BDW.

PATCH New Rodrigo Vivi 3 participants 4 messages Jun 27, 2014 – Jul 7, 2014

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: Don't pretend ips is always enabled on BDW.

As pointed out before we don't have a reliable way to read back ips status on BDW without the risk to disable it when reading. However now we are pretending that IPS on BDW is always on and getting people confused about it.

So this patch allows people to know if ips was ever attempted to be enabled. Even if the current status is impossible to be ascertain.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +10 -4
index a93b3bf..5e36b3c 100644
@@ -1523,10 +1523,16 @@ static int i915_ips_status(struct seq_file *m, void *unused)
 
 	intel_runtime_pm_get(dev_priv);
 
-	if (IS_BROADWELL(dev) || I915_READ(IPS_CTL) & IPS_ENABLE)
-		seq_puts(m, "enabled\n");
-	else
-		seq_puts(m, "disabled\n");
+	seq_puts(m, "Enabled on boot: %s\n", yesno(i915.ips_enabled));
+
+	if (IS_BROADWELL(dev)) {
+		seq_puts(m, "Currently: impossible to ascertain\n");
+	} else {
+		if (I915_READ(IPS_CTL) & IPS_ENABLE)
+			seq_puts(m, "Currently: enabled\n");
+		else
+			seq_puts(m, "Currently: disabled\n");
+	}
 
 	intel_runtime_pm_put(dev_priv);
 
Signature · 1 line
1.9.3
author maintainer
#1 lore raw

PATCH 1/1 drm/i915: Don't pretend ips is always enabled on BDW.

As pointed out before we don't have a reliable way to read back ips status on BDW without the risk to disable it when reading. However now we are pretending that IPS on BDW is always on and getting people confused about it.

So this patch allows people to know if ips was ever attempted to be enabled. Even if the current status is impossible to be ascertain.

v2: (spotted by Paulo):
* A version that at least compiles
* with more clear messages
* let Cheryview on the safe side until we aren't sure that checking ips state on ips won't disable it.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +11 -4
index a93b3bf..380be89 100644
@@ -1523,10 +1523,17 @@ static int i915_ips_status(struct seq_file *m, void *unused)
 
 	intel_runtime_pm_get(dev_priv);
 
-	if (IS_BROADWELL(dev) || I915_READ(IPS_CTL) & IPS_ENABLE)
-		seq_puts(m, "enabled\n");
-	else
-		seq_puts(m, "disabled\n");
+	seq_printf(m, "Enabled by kernel parameter: %s\n",
+		   yesno(i915.enable_ips));
+
+	if (INTEL_INFO(dev)->gen >= 8) {
+		seq_puts(m, "Currently: unknown\n");
+	} else {
+		if (I915_READ(IPS_CTL) & IPS_ENABLE)
+			seq_puts(m, "Currently: enabled\n");
+		else
+			seq_puts(m, "Currently: disabled\n");
+	}
 
 	intel_runtime_pm_put(dev_priv);
 
Signature · 1 line
1.9.3
Reviewed-by on v1 1/1
#2 lore raw

2014-06-30 8:45 GMT-03:00 Rodrigo Vivi <[email protected]>:

Quoted 8 lines

As pointed out before we don't have a reliable way to read back ips status on BDW without the risk to disable it when reading. However now we are pretending that IPS on BDW is always on and getting people confused about it.

So this patch allows people to know if ips was ever attempted to be enabled. Even if the current status is impossible to be ascertain.

Quoted 8 lines

v2: (spotted by Paulo):
* A version that at least compiles
* with more clear messages
* let Cheryview on the safe side until we aren't sure that checking ips state on ips won't disable it.

Quoted 37 lines
---
 drivers/gpu/drm/i915/i915_debugfs.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +11 -5
index a93b3bf..380be89 100644
@@ -1523,10 +1523,17 @@ static int i915_ips_status(struct seq_file *m, void *unused)
 
        intel_runtime_pm_get(dev_priv);
 
-       if (IS_BROADWELL(dev) || I915_READ(IPS_CTL) & IPS_ENABLE)
-               seq_puts(m, "enabled\n");
-       else
-               seq_puts(m, "disabled\n");
+       seq_printf(m, "Enabled by kernel parameter: %s\n",
+                  yesno(i915.enable_ips));
+
+       if (INTEL_INFO(dev)->gen >= 8) {
+               seq_puts(m, "Currently: unknown\n");
+       } else {
+               if (I915_READ(IPS_CTL) & IPS_ENABLE)
+                       seq_puts(m, "Currently: enabled\n");
+               else
+                       seq_puts(m, "Currently: disabled\n");
+       }
 
        intel_runtime_pm_put(dev_priv);
 
--

1.9.3

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

Signature · 1 line
Paulo Zanoni
#3 lore raw
Quoted 15 lines · Paulo Zanoni

2014-06-30 8:45 GMT-03:00 Rodrigo Vivi <[email protected]>:

Quoted 14 lines

As pointed out before we don't have a reliable way to read back ips status on BDW without the risk to disable it when reading. However now we are pretending that IPS on BDW is always on and getting people confused about it.

So this patch allows people to know if ips was ever attempted to be enabled. Even if the current status is impossible to be ascertain.

v2: (spotted by Paulo):
* A version that at least compiles
* with more clear messages
* let Cheryview on the safe side until we aren't sure that checking ips state on ips won't disable it.

Quoted 4 lines
Quoted 2 lines

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