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

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