diff options
author | Jani Nikula <jani.nikula@intel.com> | 2016-04-29 17:55:29 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2016-05-03 11:19:32 +0300 |
commit | 3edaa1d347e5c91058a5dfab821e57beb5217ccc (patch) | |
tree | c226597283b840b6a954e78785ba80ebd91092fd | |
parent | c038518438e85f5f91a8608b062f8353d9b6dede (diff) |
tools/intel_reg_decode: drop confusing use of IS_965()
Unlike in the kernel driver coding style, IS_965() matches the platform
and all subsequent ones. Replace IS_965() with suitable but less
confusing alternatives.
Most occurences are on code paths that only get called for gens 2, 3 and
4, so replace those with IS_GEN4(). In the one other call site just flip
the condition to check for gens 2 and 3 instead.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r-- | tools/intel_reg_decode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c index 470fecc1..25365548 100644 --- a/tools/intel_reg_decode.c +++ b/tools/intel_reg_decode.c @@ -54,7 +54,7 @@ DEBUGSTRING(i830_debug_dcc) if (!IS_MOBILE(devid)) return; - if (IS_965(devid)) { + if (IS_GEN4(devid)) { if (val & (1 << 1)) addressing = "dual channel interleaved"; else @@ -151,11 +151,11 @@ DEBUGSTRING(i830_debug_pipeconf) char buf[256]; int buf_len; - if (IS_965(devid)) - bit30 = val & I965_PIPECONF_ACTIVE ? "active" : "inactive"; + if (IS_GEN2(devid) || IS_GEN3(devid)) + bit30 = val & PIPEACONF_DOUBLE_WIDE ? + "double-wide" : "single-wide"; else - bit30 = - val & PIPEACONF_DOUBLE_WIDE ? "double-wide" : "single-wide"; + bit30 = val & I965_PIPECONF_ACTIVE ? "active" : "inactive"; buf_len = snprintf(buf, sizeof(buf), "%s, %s", enabled, bit30); @@ -701,7 +701,7 @@ DEBUGSTRING(i810_debug_915_fence) unsigned int offset = val & 0x0ff00000; int size = (1024 * 1024) << ((val & 0x700) >> 8); - if (IS_965(devid) || (IS_915(devid) && reg >= FENCE_NEW)) + if (IS_GEN4(devid) || (IS_915(devid) && reg >= FENCE_NEW)) return; if (format == 'X') @@ -722,7 +722,7 @@ DEBUGSTRING(i810_debug_965_fence_start) int pitch = ((val & 0xffc) >> 2) * 128 + 128; unsigned int offset = val & 0xfffff000; - if (!IS_965(devid)) + if (!IS_GEN4(devid)) return; snprintf(result, len, "%s, %c tile walk, %4d pitch, 0x%08x start", @@ -733,7 +733,7 @@ DEBUGSTRING(i810_debug_965_fence_end) { unsigned int end = val & 0xfffff000; - if (!IS_965(devid)) + if (!IS_GEN4(devid)) return; snprintf(result, len, " 0x%08x end", end); |