summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-08 14:55:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-08 14:55:36 +0100
commit4c0176e49700401a568d592865d6f53649075ca7 (patch)
treee6e6a35afb4e531766fe3a56c177c472ef0d58de
parenta0a0b6ab34f4413cc911d6e9b60e831f72a1e11a (diff)
intel_reg_dumper: Slightly tidy the reporting of pipe configs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tools/intel_reg_dumper.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 4c44dc65..f6695a95 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -143,7 +143,6 @@ DEBUGSTRING(i830_debug_pipeconf)
{
char *enabled = val & PIPEACONF_ENABLE ? "enabled" : "disabled";
char *bit30;
- char *bpc = NULL;
if (IS_965(devid))
bit30 = val & I965_PIPECONF_ACTIVE ? "active" : "inactive";
@@ -152,6 +151,8 @@ DEBUGSTRING(i830_debug_pipeconf)
val & PIPEACONF_DOUBLE_WIDE ? "double-wide" : "single-wide";
if (HAS_PCH_SPLIT(devid)) {
+ char *bpc;
+
switch (val & (7 << 5)) {
case PIPECONF_8BPP:
bpc = "8bpc";
@@ -165,11 +166,12 @@ DEBUGSTRING(i830_debug_pipeconf)
case PIPECONF_12BPP:
bpc = "12bpc";
break;
+ default:
+ bpc = "invalid bpc";
+ break;
}
- }
- if (HAS_PCH_SPLIT(devid))
snprintf(result, len, "%s, %s, %s", enabled, bit30, bpc);
- else
+ } else
snprintf(result, len, "%s, %s", enabled, bit30);
}