summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-15 00:44:29 -0400
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-15 00:44:29 -0400
commitfba1a11e287ebf04cf311645d31299896bad7283 (patch)
treecdd84c2b41113c115fd9addddfb7133b858fb9a1 /src
parent9ed00e959fcdab2739a7e64ca1e303a6faf28f15 (diff)
RADEON: Move DAC regs to their own Save() function
Diffstat (limited to 'src')
-rw-r--r--src/radeon_driver.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 32f51d66..d561fa0c 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -4692,7 +4692,6 @@ static void RADEONSaveCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save)
save->crtc_gen_cntl = INREG(RADEON_CRTC_GEN_CNTL);
save->crtc_ext_cntl = INREG(RADEON_CRTC_EXT_CNTL);
- save->dac_cntl = INREG(RADEON_DAC_CNTL);
save->crtc_h_total_disp = INREG(RADEON_CRTC_H_TOTAL_DISP);
save->crtc_h_sync_strt_wid = INREG(RADEON_CRTC_H_SYNC_STRT_WID);
save->crtc_v_total_disp = INREG(RADEON_CRTC_V_TOTAL_DISP);
@@ -4720,6 +4719,21 @@ static void RADEONSaveCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save)
}
}
+/* Read DAC registers */
+static void RADEONSaveDACRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save)
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ unsigned char *RADEONMMIO = info->MMIO;
+
+ save->dac_cntl = INREG(RADEON_DAC_CNTL);
+ save->dac2_cntl = INREG(RADEON_DAC_CNTL2);
+ save->tv_dac_cntl = INREG(RADEON_TV_DAC_CNTL);
+ save->disp_output_cntl = INREG(RADEON_DISP_OUTPUT_CNTL);
+ save->disp_tv_out_cntl = INREG(RADEON_DISP_TV_OUT_CNTL);
+ save->disp_hw_debug = INREG(RADEON_DISP_HW_DEBUG);
+
+}
+
/* Read flat panel registers */
static void RADEONSaveFPRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save)
{
@@ -4750,12 +4764,6 @@ static void RADEONSaveCrtc2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save)
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
- save->dac2_cntl = INREG(RADEON_DAC_CNTL2);
- save->tv_dac_cntl = INREG(RADEON_TV_DAC_CNTL);
- save->disp_output_cntl = INREG(RADEON_DISP_OUTPUT_CNTL);
- save->disp_tv_out_cntl = INREG(RADEON_DISP_TV_OUT_CNTL);
- save->disp_hw_debug = INREG (RADEON_DISP_HW_DEBUG);
-
save->crtc2_gen_cntl = INREG(RADEON_CRTC2_GEN_CNTL);
save->crtc2_h_total_disp = INREG(RADEON_CRTC2_H_TOTAL_DISP);
save->crtc2_h_sync_strt_wid = INREG(RADEON_CRTC2_H_SYNC_STRT_WID);
@@ -4842,6 +4850,7 @@ static void RADEONSaveMode(ScrnInfoPtr pScrn, RADEONSavePtr save)
RADEONSavePLLRegisters (pScrn, save);
RADEONSaveCrtcRegisters (pScrn, save);
RADEONSaveFPRegisters (pScrn, save);
+ RADEONSaveDACRegisters (pScrn, save);
RADEONSaveCrtc2Registers (pScrn, save);
RADEONSavePLL2Registers (pScrn, save);
/*RADEONSavePalette(pScrn, save);*/