Index: [thread] [date] [subject] [author]
  From: Bob Barry <bobb@adsme.co.za>
  To  : Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
  Date: Thu, 13 May 1999 16:00:16 +0200

Re: Multiple ATI Video Cards

Dear atyfb authors -

I've been trying without success to get two video cards and monitors running
under Linux.  I'm using Redhat 6.0 with kernel 2.2.8, with built-in ATI driver
and framebuffer support.  Framebuffer 0 works fine for general console
operation, and runs GGI's "demo" and XF68_FBDev beautifully.

Both cards appear to initialize at startup - "dmesg" shows:

Starting kswapd v 1.5 
atyfb: 3D RAGE IIC (PCI) [0x4756 rev 0x7a] 2M EDO, 230 MHz PLL, 83 Mhz MCLK
Console: switching to colour frame buffer device 80x60
fb0: ATY Mach64 frame buffer device on PCI
atyfb: 3D RAGE IIC (PCI) [0x4756 rev 0x7a] 512K RESV, 230 MHz PLL, 83 Mhz MCLK
fb1: ATY Mach64 frame buffer device on PCI
Detected PS/2 Mouse Port.

But the second monitor just displays a raster of vertical green lines.

======================

"lspci -vvx" gives:

00:0b.0 VGA compatible controller: ATI Technologies Inc 215IIC [Mach64 GT IIC] (rev 7a)
	Subsystem: Unknown device 1002:0088
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
	Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 8 min, 64 set, cache line size 08
	Interrupt: pin A routed to IRQ 5
	Region 0: Memory at e5000000 (32-bit, prefetchable)
	Region 1: I/O ports at 6c00
	Region 2: Memory at e9000000 (32-bit, non-prefetchable)
	Capabilities: [5c] Power Management version 1
		Flags: PMEClk- AuxPwr- DSI- D1- D2- PME-
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 02 10 56 47 87 00 90 02 7a 00 00 03 08 40 00 00
10: 08 00 00 e5 01 6c 00 00 00 00 00 e9 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 02 10 88 00
30: 00 00 00 e6 5c 00 00 00 00 00 00 00 05 01 08 00

00:0c.0 VGA compatible controller: ATI Technologies Inc 215IIC [Mach64 GT IIC] (rev 7a)
	Subsystem: Unknown device 1002:0088
	Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
	Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 10
	Region 0: Memory at e7000000 (32-bit, prefetchable)
	Region 1: I/O ports at 7000 [disabled]
	Region 2: Memory at e9001000 (32-bit, non-prefetchable)
	Capabilities: [5c] Power Management version 1
		Flags: PMEClk- AuxPwr- DSI- D1- D2- PME-
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
00: 02 10 56 47 82 00 90 02 7a 00 00 03 08 40 00 00
10: 08 00 00 e7 01 70 00 00 00 10 00 e9 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 02 10 88 00
30: 00 00 00 e8 5c 00 00 00 00 00 00 00 0a 01 08 00

ARE THE I/O PORTS AT 7000 SUPPOSED TO BE ENABLED?

======================

"fbset -fb /dev/fb0 -i -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb0'
Using current video mode from `/dev/fb0'

mode "name"
    # D: 25.172 MHz, H: 31.466 kHz, V: 59.934 Hz
    geometry 640 480 640 3251 8
    timings 39726 48 16 33 10 96 2
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : ATY Mach64
    Address     : 0xe5000000
    Size        : 2093056
    Type        : PACKED PIXELS
    Visual      : PSEUDOCOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 640
    MMIO Address: 0xe57ff800
    MMIO Size   : 2048
    Accelerator : ATI Mach64GT

======================

"fbset -fb /dev/fb1 -i -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb1'
Using current video mode from `/dev/fb1'

mode "name"
    # D: 25.172 MHz, H: 31.466 kHz, V: 59.934 Hz
    geometry 640 480 640 793 8
    timings 39726 48 16 33 10 96 2
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : ATY Mach64
    Address     : 0xe7000000
    Size        : 520192
    Type        : PACKED PIXELS
    Visual      : PSEUDOCOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 640
    MMIO Address: 0xe77ff800
    MMIO Size   : 2048
    Accelerator : ATI Mach64GT


======================

"fbset -fb /dev/fb0 "800x600-60" -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb0'
Reading mode database from file `/etc/fb.modes'
Using video mode `800x600-60'
Setting video mode to `/dev/fb0'

======================

"fbset -fb /dev/fb1 "800x600-60" -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb1'
Reading mode database from file `/etc/fb.modes'
Using video mode `800x600-60'
Setting video mode to `/dev/fb1'

AND THE GREEN-LINE PATTERN CHANGES TO HIGHER RESOLUTION!

======================

"fbset -fb /dev/fb0 -i -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb0'
Using current video mode from `/dev/fb0'

mode "name"
    # D: 39.954 MHz, H: 37.835 kHz, V: 60.247 Hz
    geometry 800 600 800 600 8
    timings 25029 88 40 23 1 128 4
    hsync high
    vsync high
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : ATY Mach64
    Address     : 0xe5000000
    Size        : 2093056
    Type        : PACKED PIXELS
    Visual      : PSEUDOCOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 800
    MMIO Address: 0xe57ff800
    MMIO Size   : 2048
    Accelerator : ATI Mach64GT

======================

"fbset -fb /dev/fb1 -i -v" gives:

Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

Opening frame buffer device `/dev/fb1'
Using current video mode from `/dev/fb1'

mode "name"
    # D: 25.172 MHz, H: 31.466 kHz, V: 59.934 Hz
    geometry 640 480 640 793 8
    timings 39726 48 16 33 10 96 2
endmode

Getting further frame buffer information
Frame buffer device information:
    Name        : ATY Mach64
    Address     : 0xe7000000
    Size        : 520192
    Type        : PACKED PIXELS
    Visual      : PSEUDOCOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 640
    MMIO Address: 0xe77ff800
    MMIO Size   : 2048
    Accelerator : ATI Mach64GT
Linux Frame Buffer Device Configuration Version 2.0-pre (28/10/1998)
(C) Copyright 1995-1998 by Geert Uytterhoeven

NOTE THAT STATUS IS READ AS 640x480, BUT GREEN-LINE PATTERN IS
STILL AT HIGHER RESOLUTION!

======================

After "export FRAMEBUFFER=/dev/fb0", GGI's demo runs beautifully on fb0.

After "export FRAMEBUFFER=/dev/fb1", GGI's demo writes flickering trash to
fb1, and leaves it with a low-resolution raster of green lines. 

======================

Using utility "setpci", I have tried changing the pci COMMAND of device 0:c.0
from 0082 to 0083 and 0087, without effect.  And changing pci COMMAND of device 
0:b.0 from 0087 to 0082 also has no effect.  But "setpci" doesn't talk to
atyfb, so this isn't surprising.

I have swapped monitors and cards, with no change in the above operation.

Should both video cards (and their framebuffers) initialize automatically at startup?

Is there anything I can do to get the second card going?  Does the kernel
require any startup parameters?

I've seen mention of "Mach64 Programmer's Guide", but not found it either on
www or on the CD that came with the cards.  Is it available?  Would it do me any
good?

Is there any means (or any requirement) to reset a framebuffer except at
startup?  I see that the code for "aty_init" and "atyfb_init" are
"__initfunc", so they aren't reuseable are they?

Any suggestions or explanation would be appreciated.

Bob Barry

Index: [thread] [date] [subject] [author]