From 6ad599a2e7f7fa86df6af7429a5d302ea497bbb8 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 16 Jul 2013 21:36:50 -0400 Subject: [PATCH] drm/radeon: dump output of vbios MC reg tables Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_atombios.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index fbdaff5..cf93fbf 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -3666,6 +3666,22 @@ int radeon_atom_get_mclk_range_table(struct radeon_device *rdev, return -EINVAL; } +static void radeon_print_mc_reg_table(struct atom_mc_reg_table *table) +{ + int i, j; + + for (i = 0; i < table->last; i++) + printk("%d s1 = 0x%04x pre_reg_data = 0x%02x\n", + i, table->mc_reg_address[i].s1, table->mc_reg_address[i].pre_reg_data); + + for (i = 0; i < table->num_entries; i++) { + printk("%d mclk_max = %u\n", i, table->mc_reg_table_entry[i].mclk_max); + for (j = 0; j < table->last; j++) + printk(" %d mc_data = 0x%08x\n", + j, table->mc_reg_table_entry[i].mc_data[j]); + } +} + #define MEM_ID_MASK 0xff000000 #define MEM_ID_SHIFT 24 #define CLOCK_RANGE_MASK 0x00ffffff @@ -3754,6 +3770,7 @@ int radeon_atom_init_mc_reg_table(struct radeon_device *rdev, DRM_ERROR("Unknown table version %d, %d\n", frev, crev); return -EINVAL; } + radeon_print_mc_reg_table(reg_table); return 0; } return -EINVAL; -- 1.7.7.5