From 5fc21cd34436919300018d8d4850fc67db284eb3 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 7 May 2007 13:31:20 -0700 Subject: - fix randr 1.2 on pre-RV350 chips by enabling DAC_MACRO_CNTL writes - set dac_cntl on non-primary crtcs - set XCRT_CNT_EN in CRTC_EXT_CNTL just because - fix warnings in calls to xf86PrintModeline (wants screen index not pScrnInfo) --- src/radeon_display.c | 6 ++---- src/radeon_driver.c | 14 +++++++------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/radeon_display.c b/src/radeon_display.c index 7a8f94ff..f0015ae9 100644 --- a/src/radeon_display.c +++ b/src/radeon_display.c @@ -1431,8 +1431,7 @@ static void RADEONDacPowerSet(ScrnInfoPtr pScrn, Bool IsOn, Bool IsPrimaryDAC) CARD32 dac_cntl; CARD32 dac_macro_cntl = 0; dac_cntl = INREG(RADEON_DAC_CNTL); - if ((!info->IsMobility) || (info->ChipFamily >= CHIP_FAMILY_RV350)) - dac_macro_cntl = INREG(RADEON_DAC_MACRO_CNTL); + dac_macro_cntl = INREG(RADEON_DAC_MACRO_CNTL); if (IsOn) { dac_cntl &= ~RADEON_DAC_PDWN; dac_macro_cntl &= ~(RADEON_DAC_PDWN_R | @@ -1446,8 +1445,7 @@ static void RADEONDacPowerSet(ScrnInfoPtr pScrn, Bool IsOn, Bool IsPrimaryDAC) } ErrorF("Setting IsOn %d DAC CNTL %08X and DAC MACRO_CNTL %08X\n", IsOn, dac_cntl, dac_macro_cntl); OUTREG(RADEON_DAC_CNTL, dac_cntl); - if ((!info->IsMobility) || (info->ChipFamily >= CHIP_FAMILY_RV350)) - OUTREG(RADEON_DAC_MACRO_CNTL, dac_macro_cntl); + OUTREG(RADEON_DAC_MACRO_CNTL, dac_macro_cntl); } else { CARD32 tv_dac_cntl; CARD32 fp2_gen_cntl; diff --git a/src/radeon_driver.c b/src/radeon_driver.c index a5805832..712ec3b3 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -5302,10 +5302,6 @@ static void RADEONInitDACRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, } else { save->dac2_cntl = info->SavedReg.dac2_cntl & ~(RADEON_DAC2_DAC_CLK_SEL); } - save->dac_cntl = (RADEON_DAC_MASK_ALL - | RADEON_DAC_VGA_ADR_EN - | (info->dac6bits ? 0 : RADEON_DAC_8BIT_EN)); - } else { if ((info->ChipFamily == CHIP_FAMILY_R200) || IS_R300_VARIANT) { save->disp_output_cntl = info->SavedReg.disp_output_cntl & @@ -5315,6 +5311,9 @@ static void RADEONInitDACRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, save->dac2_cntl = info->SavedReg.dac2_cntl | RADEON_DAC2_DAC_CLK_SEL; } } + save->dac_cntl = (RADEON_DAC_MASK_ALL + | RADEON_DAC_VGA_ADR_EN + | (info->dac6bits ? 0 : RADEON_DAC_8BIT_EN)); } static void RADEONInitDAC2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save, @@ -5432,7 +5431,8 @@ static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, ? RADEON_CRTC_INTERLACE_EN : 0)); - save->crtc_ext_cntl |= (RADEON_CRTC_CRT_ON | + save->crtc_ext_cntl |= (RADEON_XCRT_CNT_EN| + RADEON_CRTC_CRT_ON | RADEON_CRTC_VSYNC_DIS | RADEON_CRTC_HSYNC_DIS | RADEON_CRTC_DISPLAY_DIS); @@ -5871,9 +5871,9 @@ Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1, ScrnInfoPtr pScrn0 = NULL; if (crtc_mask & 1) - xf86PrintModeline(pScrn, crtc1); + xf86PrintModeline(pScrn->scrnIndex, crtc1); if (crtc_mask & 2) - xf86PrintModeline(pScrn, crtc2); + xf86PrintModeline(pScrn->scrnIndex, crtc2); RADEONInitMemMapRegisters(pScrn, save, info); RADEONInitCommonRegisters(save, info); -- cgit v1.2.3