summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-12-20 09:45:03 +0100
committerDave Airlie <airlied@redhat.com>2011-12-20 10:14:36 +0000
commitee909f17f5dfecba935c50f1f5c04a6901a284b3 (patch)
tree8569c48afa31d57f5e610afa1cc9588d38a22bdc
parent25e4d769e96839f7c635a98887ef704016777ec7 (diff)
avivotool: allow reading basic audio info on Evergreen
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--avivotool.c14
-rw-r--r--radeon_reg.h7
2 files changed, 21 insertions, 0 deletions
diff --git a/avivotool.c b/avivotool.c
index b935bd3..33469d6 100644
--- a/avivotool.c
+++ b/avivotool.c
@@ -939,6 +939,7 @@ void eg_cmd_regs(const char *type)
{
int show_all = (strcmp(type, "all") == 0);
int show_mc = (show_all || strstr(type, "mc"));
+ int show_hdmi = (show_all || strstr(type, "hdmi"));
int show_grphs = 0;
int i;
uint32_t tmp, tmp1;
@@ -1081,6 +1082,19 @@ void eg_cmd_regs(const char *type)
for (i = 0x28000 ; i <= 0x2a000; i+=4)
SHOW_UNKNOWN_REG(i);
}
+
+ if (show_hdmi) {
+ printf("\nAudio clocks:\n");
+ SHOW_REG(EVERGREEN_AUDIO_PLL1_MUL);
+ SHOW_REG(EVERGREEN_AUDIO_PLL1_DIV);
+ SHOW_REG(EVERGREEN_AUDIO_PLL1_UNK);
+
+ printf("\nAudio general:\n");
+ SHOW_REG(EVERGREEN_AUDIO_ENABLE);
+
+ printf("\nAudio params:\n");
+ SHOW_REG(EVERGREEN_AUDIO_VENDOR_ID);
+ }
}
void radeon_cmd_regs(const char *type)
diff --git a/radeon_reg.h b/radeon_reg.h
index c5e57ff..98a8eee 100644
--- a/radeon_reg.h
+++ b/radeon_reg.h
@@ -3034,6 +3034,13 @@
#define RADEON_MC_DEBUG 0x188
#endif
+#define EVERGREEN_AUDIO_PLL1_MUL 0x5b0
+#define EVERGREEN_AUDIO_PLL1_DIV 0x5b4
+#define EVERGREEN_AUDIO_PLL1_UNK 0x5bc
+
+#define EVERGREEN_AUDIO_ENABLE 0x5e78
+#define EVERGREEN_AUDIO_VENDOR_ID 0x5ec0
+
/* GRPH blocks at 0x6800, 0x7400, 0x10000, 0x10c00, 0x11800, 0x12400 */
#define EVERGREEN_GRPH_ENABLE 0x6800
#define EVERGREEN_GRPH_CONTROL 0x6804