summaryrefslogtreecommitdiff
path: root/driver/xf86-video-ati/src/radeon_modes.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-02-06 22:53:17 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-02-06 22:53:17 +0000
commiteb2ee4ddbc560aaa5b74172c2c72851785efb40a (patch)
treea01988fa211bdbff64da3bea425a7f69f725987b /driver/xf86-video-ati/src/radeon_modes.c
parent36f7476dfa8dae71728fafaf1b27e51683bb0e69 (diff)
Revert the update to xf86-video-ati 6.14.3. Requested by espie@
who experiemnts regressions with this driver.
Diffstat (limited to 'driver/xf86-video-ati/src/radeon_modes.c')
-rw-r--r--driver/xf86-video-ati/src/radeon_modes.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/driver/xf86-video-ati/src/radeon_modes.c b/driver/xf86-video-ati/src/radeon_modes.c
index d5635c969..ec60cc9b4 100644
--- a/driver/xf86-video-ati/src/radeon_modes.c
+++ b/driver/xf86-video-ati/src/radeon_modes.c
@@ -67,18 +67,18 @@ void RADEONSetPitch (ScrnInfoPtr pScrn)
/* FIXME: May need to validate line pitch here */
if (info->ChipFamily < CHIP_FAMILY_R600) {
switch (pScrn->depth / 8) {
- case 1: pitch_mask = align_large ? 256 : 128;
+ case 1: pitch_mask = align_large ? 255 : 127;
break;
- case 2: pitch_mask = align_large ? 128 : 32;
+ case 2: pitch_mask = align_large ? 127 : 31;
break;
case 3:
- case 4: pitch_mask = align_large ? 64 : 16;
+ case 4: pitch_mask = align_large ? 63 : 15;
break;
}
} else
- pitch_mask = 256; /* r6xx/r7xx need 256B alignment for accel */
+ pitch_mask = 255; /* r6xx/r7xx need 256B alignment for accel */
- dummy = RADEON_ALIGN(pScrn->virtualX, pitch_mask);
+ dummy = (pScrn->virtualX + pitch_mask) & ~pitch_mask;
pScrn->displayWidth = dummy;
info->CurrentLayout.displayWidth = pScrn->displayWidth;
@@ -158,7 +158,7 @@ static DisplayModePtr RADEONFPNativeMode(xf86OutputPtr output)
new->VSyncEnd = new->VSyncStart + native_mode->VSyncWidth;
new->Clock = native_mode->DotClock;
- new->Flags = native_mode->Flags;
+ new->Flags = 0;
if (new) {
new->type = M_T_DRIVER | M_T_PREFERRED;
@@ -169,20 +169,6 @@ static DisplayModePtr RADEONFPNativeMode(xf86OutputPtr output)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added native panel mode: %dx%d\n",
native_mode->PanelXRes, native_mode->PanelYRes);
- } else if (native_mode->PanelXRes != 0 &&
- native_mode->PanelYRes != 0) {
-
- new = xf86CVTMode(native_mode->PanelXRes, native_mode->PanelYRes, 60.0, TRUE, FALSE);
-
- if (new) {
- new->type = M_T_DRIVER | M_T_PREFERRED;
-
- new->next = NULL;
- new->prev = NULL;
- }
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added native panel mode using CVT: %dx%d\n",
- native_mode->PanelXRes, native_mode->PanelYRes);
}
return new;