diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-12-05 11:37:40 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-06 09:09:16 +0000 |
commit | 25e4d769e96839f7c635a98887ef704016777ec7 (patch) | |
tree | 27ddff3d26f90124bcb7d02a25227acb29805915 | |
parent | a3b0d103ccf6f948728464cd862ee43aced17a6e (diff) |
avivotool: allow reading regs from given range
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | avivotool.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/avivotool.c b/avivotool.c index 7626f70..b935bd3 100644 --- a/avivotool.c +++ b/avivotool.c @@ -184,6 +184,8 @@ static void usage(void) printf(" --skip=1 - use the second radeon card\n"); printf(" regs <set> - show a listing of some random registers\n"); printf(" <set> restricts: all, core, mc, crtc1, cur1\n"); + printf(" regsrange <start> <end> - show registers for a given range (wrong\n"); + printf(" range can result in lockup!)\n"); printf(" regmatch <pattern> - show registers matching wildcard pattern\n"); printf(" regset <pattern> <value> - set registers matching wildcard pattern\n"); printf(" romtables <path> - dumps the BIOS tables from either a given path\n"); @@ -1600,6 +1602,15 @@ void radeon_cmd_regs(const char *type) } +void radeon_regsrange(unsigned int start, unsigned int end) +{ + int i; + uint32_t tmp; + start -= start % 4; /* align access */ + for (i = start; i <= end; i += 4) + SHOW_UNKNOWN_REG(i); +} + void radeon_reg_match(const char *pattern) { int i; @@ -2293,6 +2304,11 @@ int main(int argc, char *argv[]) } } else if (argc == 4) { + if (strcmp(argv[1], "regsrange") == 0) { + radeon_regsrange(strtoul(argv[2], NULL, 0), + strtoul(argv[3], NULL, 0)); + return 0; + } if (strcmp(argv[1], "regset") == 0) { radeon_reg_set(argv[2], strtoul(argv[3], NULL, 0)); return 0; |