diff options
Diffstat (limited to 'radeontool.c')
-rw-r--r-- | radeontool.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/radeontool.c b/radeontool.c index 2cd6f4d..dfb4608 100644 --- a/radeontool.c +++ b/radeontool.c @@ -282,10 +282,12 @@ void dump_tmds_regs(int index) void radeon_cmd_regs(void) { int init_head = -1; + unsigned int fp_debug_0 = radeon_get32(NV_PRAMDAC_FP_DEBUG_0, "NV_PRAMDAC_FP_DEBUG_0"); - if (arch >= 0x17 && arch != 0x1a && arch != 0x20) + if (arch >= 0x17 && arch != 0x1a && arch != 0x20) { init_head = get_vga_crtc_reg(0, NV_CIO_CRE_44); - else if (arch == 0x11) // just assume crtc 0 + fp_debug_0 = 0; + } else if (arch == 0x11) // just assume crtc 0 init_head = 0; #define SHOW_REG(r) printf("%s\t%08x\n", #r, radeon_get32(r, #r)) @@ -354,6 +356,11 @@ SHOW_REG(NV_PEXTDEV_BOOT_0); SHOW_RAMDAC_REG(NV_PRAMDAC_FP_DEBUG_0); SHOW_RAMDAC_REG(NV_PRAMDAC_FP_DEBUG_1); + if (fp_debug_0 & NV_PRAMDAC_FP_DEBUG_0_PWRDOWN_FPCLK) { + printf("Temporarily changing NV_PRAMDAC_FP_DEBUG_0 to avoid lockup\n"); + radeon_set32(NV_PRAMDAC_FP_DEBUG_0, "NV_PRAMDAC_FP_DEBUG_0", fp_debug_0 & ~NV_PRAMDAC_FP_DEBUG_0_PWRDOWN_FPCLK); + } + SHOW_RAMDAC_REG(NV_PRAMDAC_FP_TMDS_CONTROL); SHOW_RAMDAC_REG(NV_PRAMDAC_FP_TMDS_DATA); SHOW_RAMDAC_REG(0x6808b8); @@ -371,6 +378,9 @@ SHOW_REG(NV_PEXTDEV_BOOT_0); printf("TMDS0(dl): 04:\t%08X\n", get_tmds_index_reg(0, 1, 4)); dump_tmds_regs(1); printf("TMDS1(dl): 04:\t%08X\n", get_tmds_index_reg(1, 1, 4)); + + if (fp_debug_0 & NV_PRAMDAC_FP_DEBUG_0_PWRDOWN_FPCLK) + radeon_set32(NV_PRAMDAC_FP_DEBUG_0, "NV_PRAMDAC_FP_DEBUG_0", fp_debug_0); } #define REGLIST(r) { #r, r } |