From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH i-g-t] tools/intel_reg_decode: drop confusing use of IS_965()
Date: Fri, 29 Apr 2016 18:00:04 +0300 [thread overview]
Message-ID: <1461942004-9901-1-git-send-email-jani.nikula@intel.com> (raw)
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>
---
tools/intel_reg_decode.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/intel_reg_decode.c b/tools/intel_reg_decode.c
index 470fecc165c6..253655482290 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);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
reply other threads:[~2016-04-29 15:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461942004-9901-1-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox