mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
3.5 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/x11/xfree86/radeon-dual-head.patch
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
On dual-head setups the accel engine is reset two times - but for the second
head not all mode data is present. So do not write random data into the
surface control register.
- Rene Rebe <rene@rocklinux.org>
diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c
--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c 2003-11-21 06:59:08.000000000 +0100
+++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c 2004-02-09 03:54:42.000000000 +0100
@@ -295,8 +295,10 @@
OUTREGP(RADEON_DP_DATATYPE, 0, ~RADEON_HOST_BIG_ENDIAN_EN);
#endif
- /* Restore SURFACE_CNTL */
- OUTREG(RADEON_SURFACE_CNTL, info->ModeReg.surface_cntl);
+ /* Restore SURFACE_CNTL - only the first head contains valid data -ReneR */
+ if (!info->IsSecondary) {
+ OUTREG(RADEON_SURFACE_CNTL, info->ModeReg.surface_cntl);
+ }
RADEONWaitForFifo(pScrn, 1);
OUTREG(RADEON_DEFAULT_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX
diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2003-11-21 06:59:08.000000000 +0100
+++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2004-02-09 15:57:10.000000000 +0100
@@ -6064,13 +6077,16 @@
save->disp_merge_cntl &= ~RADEON_DISP_RGB_OFFSET_EN;
#if X_BYTE_ORDER == X_BIG_ENDIAN
+ /* Alhought we current onlu use aperture 0, also setting aperture 1 should not harm -ReneR */
switch (pScrn->bitsPerPixel) {
case 16:
save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP;
+ save->surface_cntl |= RADEON_NONSURF_AP1_SWP_16BPP;
break;
case 32:
save->surface_cntl |= RADEON_NONSURF_AP0_SWP_32BPP;
+ save->surface_cntl |= RADEON_NONSURF_AP1_SWP_32BPP;
break;
}
#endif
diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h
--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h 2003-11-21 06:59:08.000000000 +0100
+++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h 2004-02-09 03:10:09.000000000 +0100
@@ -1064,6 +1064,8 @@
# define RADEON_SURF_TRANSLATION_DIS (1 << 8)
# define RADEON_NONSURF_AP0_SWP_16BPP (1 << 20)
# define RADEON_NONSURF_AP0_SWP_32BPP (1 << 21)
+# define RADEON_NONSURF_AP1_SWP_16BPP (1 << 22)
+# define RADEON_NONSURF_AP1_SWP_32BPP (1 << 23)
#define RADEON_SURFACE0_INFO 0x0b0c
#define RADEON_SURFACE0_LOWER_BOUND 0x0b04
#define RADEON_SURFACE0_UPPER_BOUND 0x0b08