summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-13 21:13:23 -0400
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-05-13 21:13:23 -0400
commit9c2f20a83a5fed14225f4c3ebcd8ca41e9d4bd48 (patch)
treef2bd9a385a7f3fa93ac9fc05b56b5e38e7ed4c45 /src/radeon_driver.c
parente187321ab8dd58d2b2fe92c062d070ba4820a2bf (diff)
RADEON: additional cleanups
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index ceea69d0..dbbf91f2 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2536,7 +2536,6 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10
if (!RADEONSetupConnectors(pScrn)) {
return FALSE;
}
-
RADEONMapControllers(pScrn);
@@ -5295,7 +5294,6 @@ static void RADEONInitLVDSRegisters(xf86OutputPtr output, RADEONSavePtr save,
ScrnInfoPtr pScrn = output->scrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
-/* XXX saved but never used??? */
if (IsPrimary)
save->lvds_gen_cntl = info->SavedReg.lvds_gen_cntl &
~RADEON_LVDS_SEL_CRTC2;
@@ -6150,7 +6148,7 @@ Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
RADEONRestoreFBDevRegisters(pScrn, &info->ModeReg);
} else {
info->IsSwitching = TRUE;
- ret = TRUE; //RADEONModeInit(xf86Screens[scrnIndex], mode);
+ ret = xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
info->IsSwitching = FALSE;
}
@@ -6327,16 +6325,16 @@ void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, Bool crtc2)
OUTREG(regcntl, crtcoffsetcntl);
}
- if (crtc2)
- OUTREG(reg, Base);
- else
- OUTREG(reg, Base);
+ OUTREG(reg, Base);
}
void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
RADEONInfoPtr info = RADEONPTR(pScrn);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86OutputPtr output = config->output[config->compat_output];
+ xf86CrtcPtr crtc = output->crtc;
#ifdef XF86DRI
if (info->CPStarted && pScrn->pScreen) DRILock(pScrn->pScreen, 0);
@@ -6345,12 +6343,17 @@ void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
if (info->accelOn)
RADEON_SYNC(info, pScrn);
- if (info->FBDev) {
- fbdevHWAdjustFrame(scrnIndex, x, y, flags);
- } else {
- RADEONDoAdjustFrame(pScrn, x, y, FALSE);
+ if (crtc && crtc->enabled) {
+ if (info->FBDev) {
+ fbdevHWAdjustFrame(scrnIndex, crtc->desiredX + x, crtc->desiredY + y, flags);
+ } else {
+ RADEONDoAdjustFrame(pScrn, crtc->desiredX + x, crtc->desiredY + y, FALSE);
+ }
+ crtc->x = output->initial_x + x;
+ crtc->y = output->initial_y + y;
}
+
#ifdef XF86DRI
if (info->CPStarted && pScrn->pScreen) DRIUnlock(pScrn->pScreen);
#endif