From 3d59746808bc5f335104d27a8dce0fe94ab3cb78 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 3 Dec 2009 12:10:14 -0500 Subject: radeon: fix crtc2 dpms noticed by Matthijs Kooijman on fdo bug 22140 --- src/legacy_crtc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/legacy_crtc.c b/src/legacy_crtc.c index 5ea13bcc..aee3d15a 100644 --- a/src/legacy_crtc.c +++ b/src/legacy_crtc.c @@ -670,8 +670,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode) unsigned char *RADEONMMIO = pRADEONEnt->MMIO; if (radeon_crtc->crtc_id) - mask = (RADEON_CRTC2_EN | - RADEON_CRTC2_DISP_DIS | + mask = (RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_VSYNC_DIS | RADEON_CRTC2_HSYNC_DIS | RADEON_CRTC2_DISP_REQ_EN_B); @@ -683,7 +682,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode) switch(mode) { case DPMSModeOn: if (radeon_crtc->crtc_id) { - OUTREGP(RADEON_CRTC2_GEN_CNTL, RADEON_CRTC2_EN, ~mask); + OUTREGP(RADEON_CRTC2_GEN_CNTL, RADEON_CRTC2_EN, ~(RADEON_CRTC2_EN | mask)); } else { OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_EN, ~(RADEON_CRTC_EN | RADEON_CRTC_DISP_REQ_EN_B)); OUTREGP(RADEON_CRTC_EXT_CNTL, 0, ~mask); @@ -693,7 +692,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode) case DPMSModeSuspend: case DPMSModeOff: if (radeon_crtc->crtc_id) { - OUTREGP(RADEON_CRTC2_GEN_CNTL, mask, ~mask); + OUTREGP(RADEON_CRTC2_GEN_CNTL, mask, ~(RADEON_CRTC2_EN | mask)); } else { OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_DISP_REQ_EN_B, ~(RADEON_CRTC_EN | RADEON_CRTC_DISP_REQ_EN_B)); OUTREGP(RADEON_CRTC_EXT_CNTL, mask, ~mask); -- cgit v1.2.3