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.

68 lines
2.9 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-iBook.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 iBook the PLL values for the LCD port are not caluculated correctly - since
  20. I do not have the databook I applied the same hack as present in the BenH
  21. kernel radeon fb and added a new default value case ...
  22. - Rene Rebe <rene@rocklinux.org>
  23. diff -ur xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
  24. --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2004-02-21 18:25:41.000000000 +0100
  25. +++ xc-working/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2004-02-21 18:27:10.000000000 +0100
  26. @@ -1808,6 +1808,11 @@
  27. pll->reference_div = 12;
  28. pll->xclk = 23000;
  29. break;
  30. + case PCI_CHIP_RADEON_LW: /* Guessed based on iBook Open Firmware data -ReneR */
  31. + pll->reference_freq = 2700;
  32. + pll->reference_div = 12;
  33. + pll->xclk = 36000;
  34. + break;
  35. default:
  36. pll->reference_freq = 2700;
  37. pll->reference_div = 67;
  38. @@ -6064,7 +6069,7 @@
  39. save->disp_merge_cntl &= ~RADEON_DISP_RGB_OFFSET_EN;
  40. #if X_BYTE_ORDER == X_BIG_ENDIAN
  41. - /* Alhought we current onlu use aperture 0, also setting aperture 1 should not harm -ReneR */
  42. + /* Alhought we currently only use aperture 0, setting aperture 1 should not harm. -ReneR */
  43. switch (pScrn->bitsPerPixel) {
  44. case 16:
  45. save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP;
  46. @@ -6507,8 +6512,17 @@
  47. save->feedback_div,
  48. save->post_div));
  49. + ErrorF ("ref_div: %d, bitvalue: %d, feedback_div: %d\n",
  50. + pll->reference_div, post_div->bitvalue, save->feedback_div);
  51. +
  52. save->ppll_ref_div = pll->reference_div;
  53. save->ppll_div_3 = (save->feedback_div | (post_div->bitvalue << 16));
  54. +#if defined(__powerpc__) /* on iBooks the LCD pannel needs tweaked PLL timings -ReneR */
  55. + ErrorF ("pll_div_3: %d, ", save->ppll_div_3);
  56. + /* save->ppll_div_3 *= 6; */ /* just a test hack */
  57. + save->ppll_div_3 = 0x000600ad; /* -ReneR */
  58. + ErrorF ("is now: %d, should be: %d\n", save->ppll_div_3, 0x000600ad);
  59. +#endif
  60. save->htotal_cntl = 0;
  61. }