diff options
author | Dave Airlie <airlied@redhat.com> | 2009-11-20 14:04:16 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-11-20 14:04:16 +1000 |
commit | 1ec79ae0085c8d4005196062cd69031aecb664de (patch) | |
tree | fb0fa1c1175647a9727ca61729dd1b95f6aff0c6 | |
parent | a9a8ccf4997ac6a4e627e938420199932097f9b4 (diff) |
radeontool: add mc dumps
-rw-r--r-- | radeontool.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/radeontool.c b/radeontool.c index 9db4b48..c63dbab 100644 --- a/radeontool.c +++ b/radeontool.c @@ -122,6 +122,17 @@ static void radeon_set_clk(unsigned long offset, const char *name, offset | RADEON_PLL_WR_EN, name, value); } +static unsigned int radeon_get_mcind(unsigned long offset, const char *name) +{ + return radeon_get_indexed(0x1f8, 0x1fc, offset, name, 0x3f); +} + +static void radeon_set_mcind(unsigned long offset, const char *name, + unsigned int value) +{ + return radeon_set_indexed(0x1f8, 0x1fc, offset | (1 << 8), name, value); +} + static void usage(void) { printf("usage: radeontool [options] [command]\n"); @@ -670,6 +681,11 @@ void radeon_reg_match(const char *pattern) value = radeon_get_clk(address, pattern); printf("%s\t0x%08x (%d)\n", pattern, value, value); } + else if (pattern[0] == 'M' && pattern[1] == 'C' && pattern[2] == ':') { + address = strtol(&(pattern[3]), NULL, 16); + value = radeon_get_mcind(address, pattern); + printf("%s\t0x%08x (%d)\n", pattern, value, value); + } else { for (i = 0; i < sizeof(reg_list) / sizeof(reg_list[0]); i++) { if (fnmatch(pattern, reg_list[i].name, 0) == 0) { @@ -678,6 +694,10 @@ void radeon_reg_match(const char *pattern) reg_list[i].type, reg_list[i].address, value, value); } } + for (i = 0; i < 0x2f; i++) { + value = radeon_get_mcind(i, "MC"); + printf("MC: %d\t0x%08x\n", i, value); + } } } |