Subject: Re: 4400 vs 9500 strangeness
To: Riccardo Mottola <rollei@tiscalinet.it>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 11/20/2004 11:54:39
Hello,

> I wanted to try out Michael's improvments in the kernel and in the X
> server on my 4400 which has an integrated ATI card on which I weren't
> able to use X up to now.
Oops, didn't see this post when answering the other one %)

> The most noticeable thing is that at startup the first messages are in a
> small font at 1024x768 (so this OF detects the monitor).
I'd rather say this card's firmware does proper monitor detection and OF honours it :)

> Then the rest
> of the kernel messages as well as the console appear ina bigger sized
> font very similar to the one that sun sparcstations use.
That's what ofb is supposed to do.

> Also strangely
> the image is abit fuzzy and horizontal sznc seems unperfect, the left
> and right edges of the image show pciels coming and going...
Ouch.

> Then I try to configure X as much as possible closely as I did on the
> 9500.
> 
> My Mouse (physically the SAME mouse and keyboard I attach to the 9500)
> doesn't work, either with Xfree or Xmacppc. But dmesg shows it!
> 
> some dmesg:
> adb0 at obio0 offset 0x16000 irq 18: 4 targets
> aed0 at adb0 addr 0: ADB Event device
> akbd0 at adb0 addr 15: extended keyboard
> wskbd0 at akbd0: console keyboard
> ams0 at adb0 addr 14: 1-button, 100 dpi mouse
> wsmouse0 at ams0 mux 0
> akbd1 at adb0 addr 2: extended keyboard
> wskbd at akbd1 not configured
> ams1 at adb0 addr 3: 1-button, 100 dpi mouse
> wsmouse at ams1 not configured
> ofb0 at pci0 dev 17 function 0: ATI Technologies Mach64 VT
> ofb0: 1024 x 768, 8bpp
> wsdisplay0 at ofb0 kbdmux 1: console (std, vt100 emulation), using
> wskbd0
> wsmux1: connecting to wsdisplay0
> 
> Xmacppc comes up in 1024x768! but I need to kill the process having no
> mouse. Keyboad works and I can type in the console.
It shows two mice - are you sure you touch the right one?
( ok, one is not configured... )

> The troubles come with Xfree.
> 
> I tried setting colors to 8, 16, 24 but no big changes. The driver I
> selected in xf86config is "ati"
> The screen come sup, some windows are displayed but entire parts of the
> screen are duplicated but not regularly (that is not split in half
> vertically or horizontally. More like 3-4)! I see two xclocks...
> sometimes at some resolutions some parts are then colored with yellow.
Now that's weird, sounds like the driver did something seriously wrong :/

> But here are good news too. Once killed the X server, I get back to a
> uniformly mangled screen, small white checkers! but the font table is
> not corrupted and typing shows the console is perfectly usable!
Ok, that's what I get with the Voodoo.
And - does the font corruption thing on the MGA also occur when you run X in a lower resolution/colour depth?

> The
> "borders" were no text is written cotinue to have the strnge pattern,
> but this is only aesthetic and the console works perfectly.
Which kernel did you use? Mine probably won't work on the 4400, if it does could you try the 11_19 one? It /should/ tell OF to clean the screen when X exits.

> Afaik I should have at least 2MB of VRAM and IIRC the computer was
> uprgaded to 4. 4MB is also what Xfree detects.
Hmm, so at least the font corruption problem is not video RAM related - your MGA has 4MB too if I remember correcty?
Maybe limit it to 2MB. The error looks weird enough, maybe it tries to use memory thet's not there.

At least it seems to be unrelated to my patches.


> (--) Using wscons driver
> (WW) xf86EnableIO 6
> (WW) xf86EnableIO: 41b04000
> (WW) xf86EnableIO 6
Ok, that's my patch :)

> (--) PCI:*(0:17:0) ATI Technologies Inc 264VT [Mach64 VT] rev 64, Mem @
> 0x81000000/24, I/O @ 0x0400/8
> (II) ATI:  Shared PCI/AGP Mach64 in slot 0:17:0 detected.
> (II) ATI:  Shared PCI/AGP Mach64 in slot 0:17:0 assigned to active
> "Device" section "atirage".
> (II) Loading sub module "atimisc"
> (II) LoadModule: "atimisc"
> (II) Loading /usr/X11R6/lib/modules/drivers/atimisc_drv.o
> (II) Module atimisc: vendor="The XFree86 Project"
>         compiled for 4.4.0, module version = 6.5.6
>         Module class: XFree86 Video Driver
>         ABI class: XFree86 Video Driver, version 0.7
> (WW) ****INVALID IO ALLOCATION**** b: 0x400 e: 0x4ff correcting^G
> (II) window:
>         [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
> (II) resSize:
>         [0] -1  0       0x00000000 - 0xffffffff (0x0) IX[B]
> (II) window fixed:
>         [0] -1  0       0x00000000 - 0x0000ffff (0x10000) IX[B]
> (II) resource ranges after probing:
>         [0] -1  0       0xffffffff - 0xffffffff (0x1) MX[B]
>         [1] -1  0       0x00000000 - 0x00000000 (0x1) MX[B]
>         [2] -1  0       0xf3000000 - 0xf3ffffff (0x1000000) MX[B]E
>         [3] -1  0       0x80800000 - 0x80ffffff (0x800000) MX[B]E
>         [4] -1  0       0x81000000 - 0x81ffffff (0x1000000) MX[B](B)
>         [5] -1  0       0x00000000 - 0x000000ff (0x100) IX[B](B)
>         [6] -1  0       0x0000ffff - 0x0000ffff (0x1) IX[B]
>         [7] -1  0       0x00000000 - 0x00000000 (0x1) IX[B]
>         [8] -1  0       0x00000400 - 0x000004ff (0x100) IX[B](B)
> (==) ATI(0): Chipset:  "ati".
> (**) ATI(0): Depth 8, (--) framebuffer bpp 8
> (II) ATI(0): BIOS Data:  BIOSSize=0x0000, ROMTable=0x0000.
> (II) ATI(0): BIOS Data:  ClockTable=0x0000, FrequencyTable=0x0000.
> (II) ATI(0): BIOS Data:  LCDTable=0x0000, LCDPanelInfo=0x0000.
> (II) ATI(0): BIOS Data:  VideoTable=0x0000, HardwareTable=0x0000.
> (II) ATI(0): BIOS Data:  I2CType=0x00, Tuner=0x00, Decoder=0x00,
> Audio=0x0F.
> (--) ATI(0): ATI 264VT graphics controller detected.
> (--) ATI(0): Chip type 5654 "VT", version 0, foundry SGS, class 0,
> revision 0x01.
> (--) ATI(0): PCI bus interface detected.
> 
> that INVALID IO ALLOCATION doesn't look good, right ?
It certainly looks weird.

> --) ATI(0): ATI Mach64 adapter detected.
> (--) ATI(0): Internal RAMDAC (subtype 1) detected.
> (==) ATI(0): RGB weight 888
> (==) ATI(0): Default visual is PseudoColor
> (==) ATI(0): Using gamma correction (1.0, 1.0, 1.0)
> (II) ATI(0): Using Mach64 accelerator CRTC.
> (II) ATI(0): Storing hardware cursor image at 0x813FFC00.
> (II) ATI(0): Using 8 MB linear aperture at 0x81800000.
That seems ok, the Voodoo driver also maps 32MB for a 16MB card.

> (!!) ATI(0): Virtual resolutions will be limited to 4095 kB
>  due to linear aperture size and/or placement of hardware cursor image
> area.
> (II) ATI(0): Using Block 0 MMIO aperture at 0x817FFC00.
> (II) ATI(0): Using Block 1 MMIO aperture at 0x817FF800.
> (II) ATI(0): MMIO write caching enabled.
> (--) ATI(0): 4096 kB of SDRAM (1:1) detected (using 4095 kB).
> (WW) ATI(0): Cannot shadow an accelerated frame buffer.
> (--) ATI(0): Internal programmable clock generator detected.
> (--) ATI(0): Reference clock 157.5/11 (14.318) MHz.

> (II) ATI(0): I2C bus "Mach64" initialized.
> Any suggestions are welcome. Maybe I found a bug? or some new hint for
> Michael to improve his work?
> This ATi card is integrated on the board, even if it is plainly seen as
> a PCI card.
That's no contradiction, there's no way to distinguish a PCI card from an onboard component connected via PCI.
Although it seems to detect the right chip, maybe it helps to add
Chipset "mach64"
To limit video RAM ( maybe it's only 2MB for some reason )
VideoRam "2048"
( both in the Device section )

To make sure the patch does what it's supposed to do please try to use another resolution, only to see if it can actually change it. If it can then my patch isn't the culprit, if it sticks to 1024x768 then I'll have to look at the IO range mapping stuff.
Which PCI host bridge does the 4400 use? Probably not a bandit?

good luck
Michael