Re: X support on 2004 ibook (radeon 9200)
On Thu, 2004-05-13 at 15:53, gibson_andrew_guard-ppclist@yahoo.com
wrote:
> Just thought i'd add my two cents in. I've been
> having the exact same problem (same new 2004 ibook),
> when I start X I get blinking horizontal lines and
> then when I try and kill the xserver the whole ibook
> locks up.
>
> I'm using vanilla 2.6.6 kernel confiuged according to
> instructions in:
> http://seb.france.free.fr/linux/ibookG4/iBookG4-howto.html
Apply this patch to 2.6.6 to get radeonfb to not flicker on this
newer model.
===== drivers/video/aty/radeon_base.c 1.12 vs edited =====
--- 1.12/drivers/video/aty/radeon_base.c Fri Mar 5 21:40:50 2004
+++ edited/drivers/video/aty/radeon_base.c Thu May 13 11:22:21 2004
@@ -1144,6 +1144,7 @@
/* Set PPLL ref. div */
if (rinfo->family == CHIP_FAMILY_R300 ||
+ rinfo->family == CHIP_FAMILY_RS300 ||
rinfo->family == CHIP_FAMILY_R350 ||
rinfo->family == CHIP_FAMILY_RV350) {
if (mode->ppll_ref_div & R300_PPLL_REF_DIV_ACC_MASK) {
@@ -1855,7 +1856,8 @@
rinfo->family == CHIP_FAMILY_RV280 ||
rinfo->family == CHIP_FAMILY_RV350) &&
!machine_is_compatible("PowerBook4,3") &&
- !machine_is_compatible("PowerBook6,3"))
+ !machine_is_compatible("PowerBook6,3") &&
+ !machine_is_compatible("PowerBook6,5"))
conv_table = backlight_conv_m7;
else
conv_table = backlight_conv_m6;
@@ -2129,7 +2131,31 @@
#endif /* CONFIG_PPC_OF */
/* framebuffer size */
- tmp = INREG(CONFIG_MEMSIZE);
+ if ((rinfo->family == CHIP_FAMILY_RS100) ||
+ (rinfo->family == CHIP_FAMILY_RS200) ||
+ (rinfo->family == CHIP_FAMILY_RS300)) {
+ u32 tom = INREG(NB_TOM);
+ tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
+
+ OUTREG(MC_FB_LOCATION, tom);
+ OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
+ OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);
+ OUTREG(OV0_BASE_ADDR, (tom & 0xffff) << 16);
+
+ /* This is supposed to fix the crtc2 noise problem. */
+ OUTREG(GRPH2_BUFFER_CNTL, INREG(GRPH2_BUFFER_CNTL) & ~0x7f0000);
+
+ if ((rinfo->family == CHIP_FAMILY_RS100) ||
+ (rinfo->family == CHIP_FAMILY_RS200)) {
+ /* This is to workaround the asic bug for RMX, some versions
+ of BIOS dosen't have this register initialized correctly.
+ */
+ OUTREGP(CRTC_MORE_CNTL, CRTC_H_CUTOFF_ACTIVE_EN,
+ ~CRTC_H_CUTOFF_ACTIVE_EN);
+ }
+ } else {
+ tmp = INREG(CONFIG_MEMSIZE);
+ }
/* mem size is bits [28:0], mask off the rest */
rinfo->video_ram = tmp & CONFIG_MEMSIZE_MASK;
===== drivers/video/aty/radeon_monitor.c 1.6 vs edited =====
--- 1.6/drivers/video/aty/radeon_monitor.c Wed Mar 31 23:41:00 2004
+++ edited/drivers/video/aty/radeon_monitor.c Thu May 13 11:22:36 2004
@@ -653,7 +653,8 @@
rinfo->panel_info.use_bios_dividers = 1;
}
/* iBook G4 */
- if (machine_is_compatible("PowerBook6,3")) {
+ if (machine_is_compatible("PowerBook6,3") |
+ machine_is_compatible("PowerBook6,5")) {
rinfo->panel_info.ref_divider = rinfo->pll.ref_div;
rinfo->panel_info.post_divider = 0x6;
rinfo->panel_info.fbk_divider = 0xad;
Reply to: