Skip to contentSkip to conversation

help on matroxfb

DISCUSSION Fuxin Zhang 2 participants 2 messages Aug 29, 2001 – Aug 30, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

hello,

I have touble to make matroxfb work,could you be so kind to help me out?

My configuration:
Algorithmics P6032 evaluation board + idt64474 mipsel CPU
(with pci slot,no AGP)
Millennium G450 (PCI),16M DDR mem,Dual head. linux kernel 2.4.2 from hardhat (www.mvista.com) with some
code by me to port it to p6032
(BTW,I just can't find where the often-mentioned sgi cvs
tree is,the one listed in FAQ seems not work for me,so i have to use hardhat kernel,if possible,I am willing to contribute to linux-mips:)

symptom:
1. The card is detected as a G450 (AGP)
2. memory cannot be autodetected. getmemory exit with realSize=0
3. if i set video.len mannually to 0x1000000(16M),then all seems to work,but the screen shows only some regular vertical lines and a real BIG cursor(about 2cm x 2cm!). There is about 0.5cm between two vertical lines.
4. I can use fbset to change fb modes,and the screen do react to changes,but only with slightly different lines or blank sc.
5. I can input with a keyboard,the big cursor moves as expected just no text is output.

tweaks I have tried:
1. Update matroxfb to the one in 2.4.9-ac2,it doesn't help
2. try all kind of options: novga,nobios,noaccel,nohwcursor etc but nothing seems to really help(with nohwcursor,the big cursor disappears)(of course,I may have left out the correct combination:,it is impossible to try all)

One thing that may be useful is that pci initialization may have
problems because my firmware (pmon from algor) has some bugs which prevent it from recognize and initialize the matrox card correctly. ( e.g. There is a type error in type1 configuration access code so
it can't initialize devices behind pci-pci bridge)
I fixed part of it but not sure enough is done.So i attached an output of "lspci -vv" for your reference.

The other attachment is boot time messages.I switch on most of
the matroxfb debug option so it contains many related info.

Thank you in advance.

Regards
Fuxin Zhang
[email protected]

LINUX starting...
YAMON MEMORY DESCRIPTOR dump:
memsize not set in boot prom, set to default (128Mb)
[0,802d9ae0]: base<00000000> size<00001000> type<Dont use memory>
[1,802d9aec]: base<00001000> size<000ef000> type<YAMON PROM memory>
[2,802d9af8]: base<000f0000> size<00010000> type<Dont use memory>
[3,802d9b04]: base<00100000> size<07f00000> type<Free memmory>
memsize not set in boot prom, set to default (128Mb)
Loading R4000 MMU routines.
CPU revision is: 00003000
Primary instruction cache 16kb, linesize 32 bytes.
Primary data cache 16kb, linesize 32 bytes.
Linux version 2.4.2_hhl20 (root@heart) (gcc version 2.95.3 20010315 (release/MontaVista)) #112 �� 8�� 30 05:20:13 CST 2001 Determined physical RAM map:
memory: 00001000 @ 00000000 (reserved)
memory: 000ef000 @ 00001000 (ROM data)
memory: 00010000 @ 000f0000 (reserved)
memory: 07f00000 @ 00100000 (usable)
On node 0 totalpages: 32768
zone(0): 4096 pages.
zone(1): 28672 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/hda3 console=ttyS0 video=matrox:init,noaccel
matrox options=init,noaccel
matroxfb_setup: option init
matroxfb_setup: option noaccel
calculating r4koff... 00079e31(499249)
CPU frequency 99.85 MHz
Console: colour dummy device 80x25
Calibrating delay loop... 99.53 BogoMIPS
Memory: 125956k/130048k available (1423k kernel code, 4092k reserved, 93k data, 200k init) Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes)
Buffer-cache hash table entries: 8192 (order: 3, 32768 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
Checking for 'wait' instruction... available.
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware on host bus 0.
Unknown bridge resource 0: assuming transparent
Unknown bridge resource 1: assuming transparent
Unknown bridge resource 2: assuming transparent
set ide irq to 14
enable ide ports<6>Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd v1.8
matroxfb: Matrox G450 (AGP) detected
ctrl=177dc000,video=18000000,memsize=2000000
matroxfb: cannot determine memory size
post_shift_max: 3
ref_freq: 27000
freq: 133333
vco_freq_min: 130000
in_div_min: 1
in_div_max: 31
feed_div_min: 7
feed_div_max: 127
fmax: 500000
clk: 07 4E 01 27000 266625 66666
post_shift_max: 3
ref_freq: 27000
freq: 25175
vco_freq_min: 130000
in_div_min: 1
in_div_max: 31
feed_div_min: 7
feed_div_max: 127
fmax: 500000
clk: 0C 60 03 27000 201461 100700
post_shift_max: 3
ref_freq: 27000
freq: 28322
vco_freq_min: 130000
in_div_min: 1
in_div_max: 31
feed_div_min: 7
feed_div_max: 127
fmax: 500000
clk: 0C 6C 03 27000 226384 113288
requested 640*480/8bpp (640*480)
requested 640*480/8bpp (640*26208)
matroxfb: acceleration disabled
matroxfb: 640x480x8bpp (virtual: 640x26208)
matroxfb: framebuffer at 0x18000000, mapped to 0xb8000000, size 16777216
requested 640*480/8bpp (640*26208)

matroxfb: acceleration disabled
post_shift_max: 3
ref_freq: 27000
freq: 25175
vco_freq_min: 130000
in_div_min: 1
in_div_max: 31
feed_div_min: 7
feed_div_max: 127
fmax: 500000
clk: 0C 60 03 27000 201461 100700
MiscOutReg: EF
SEQ regs:   00:01:0F:00:0E:
GDC regs:   00:00:00:00:00:40:05:0F:FF:
CRTC regs: 5F:4F:4F:83:52:9E:0B:3E:00:40:00:00:00:00:00:00:EA:2C:DF:28:00:DF:0C:C3:FF:
ATTR regs: 00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:41:FF:0F:00:00:
requested 640*480/8bpp (640*26208)
matroxfb: acceleration disabled
post_shift_max: 3
ref_freq: 27000
freq: 25175
vco_freq_min: 130000
in_div_min: 1
in_div_max: 31
feed_div_min: 7
feed_div_max: 127
fmax: 500000
clk: 0C 60 03 27000 201461 100700
MiscOutReg: EF
SEQ regs:   00:01:0F:00:0E:
GDC regs:   00:00:00:00:00:40:05:0F:FF:
CRTC regs: 5F:4F:4F:83:52:9E:0B:3E:00:40:00:00:00:00:00:00:EA:2C:DF:28:00:DF:0C:C3:FF:
ATTR regs: 00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F:41:FF:0F:00:00:
Console: switching to colour frame buffer device 80x30
fb0: MATROX VGA frame buffer device

Detected PS/2 Mouse Port.
pty: 256 Unix98 ptys configured
block: queued sectors max/low 83616kB/27872kB, 256 slots per queue Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 89
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xff10-0xff17<7>matroxfb: inDAC
, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xff18-0xff1f, BIOS settings: hdc:pio, hdd:pio

hda: IC35L040AVER07-0, ATA DISK drive
hda: IRQ probe failed (0x0)
hdb: IRQ probe failed (0x0)
hdb: IRQ probe failed (0x0)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: 80418240 sectors (41174 MB) w/1916KiB Cache, CHS=79780/16/63, (U)DMA Partition check:
hda: hda1 hda2 hda3 hda4
Serial driver version 5.02 (2000-08-09) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10d
pcnet32_probe_pci: found device 0x001022.0x002000

    ioaddr=0x0fffe0  resource_flags=0x000101

eth0: PCnet/FAST III 79C973 at 0xfffe0, 00 40 bc 05 00 27
pcnet32: pcnet32_private lp=a12c5000 lp_dma_addr=0x812c5000 assigned IRQ 43. pcnet32.c:v1.25kf 26.9.1999 [email protected]
post_shift_max: 3
ref_freq: 27000
freq: 25175
vco_freq_min: 110000
in_div_min: 2
in_div_max: 31
feed_div_min: 4
feed_div_max: 127
fmax: 500000
clk: 0C 60 03 27000 201461 100700
matroxfb_crtc2: secondary head of fb0 was registered as fb1
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing prom memory: 956kb freed
Freeing unused kernel memory: 200k freed
INIT: version 2.78 booting
Activating swap...
Unable to find swap-space signature
Checking root file system...
Parallelizing fsck version 1.19 (13-Jul-2000)
Mounting local filesystems...
/dev/hda1 on /oldroot type ext2 (rw,errors=remount-ro)
/dev/hda2 on /redhat type ext2 (rw,errors=remount-ro)
Unable to find swap-space signature
Cleaning: /etc/network/ifstate.
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces: done.
Starting portmap daemon: portmap.
Cleaning: /tmp /var/lock /var/run.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd klogd.
Starting internet superserver: inetd.

MontaVista Software's Hard Hat Linux 2.0

(none) login: root
Password:
Last login: Thu May 3 13:28:23 2001 on ttyS0
Linux (none) 2.4.2_hhl20 #112 �� 8�� 30 05:20:13 CST 2001 mips unknown

Welcome to MontaVista Software's Hard Hat Linux.

matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matroxfb_set_cmap
matroxfb: matroxfb_get_cmap_len
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolreg
matroxfb: matrox_setcolregdmesg: unmodified: line 1:$matroxfb: outDAC inDAC
inDAC
outDAC
inDAC
outDAC
150 Opening BINARY mode data connection for lspci.
226 Transfer complete.
3801 bytes sent in 0.00 secs (4605.4 kB/s)
ftp> put m
local: m remote: m
local: m: No such file or directory
ftp> put dmesg
local: dmesg remote: dmesg
200 PORT command successful.
150 Opening BINARY mode data connection for dmesg.
226 Transfer complete.
14170 bytes sent in 0.00 secs (7948.2 kB/s)
ftp> quit
221 Goodbye.

root@(none):~# ls
1	  baseline-7.1.tar.bz2	fp1.c	 install.tar.bz2  para_1    whetd
1_idt	  dhry			fp1.tar  install.tar.gz   para_z_1  xfree86
RPMS	  dhry.res		fp2	 lspci		  testgcc
SRPMS	  dmesg			fp3	 lspcivv	  tfloat
baseline  fp1			install  out		  tmp
root@(none):~# 
#1 lore raw

Hello Fuxin,

Looking at the lspci file I see the following addresses for the video card

Region 0: Memory at 08000000 (32-bit, prefetchable) [size=32M] Region 1: Memory at 077dc000 (32-bit, non-prefetchable) [size=16K] Region 2: Memory at 07800000 (32-bit, non-prefetchable) [size=8M] Expansion ROM at 077e0000 [size=128K]

but looking at the output from your log.txt file I see

ctrl=177dc000,video=18000000,memsize=2000000

which does not match. This means that Linux is not able to write to the frambuffer. You can try to adjust the addresses of the either the VGA adapter and PCI bridge or the Linux matroxfb drivers framebuffer pointer.

I hope this helps,

Dan Aizenstros
QuickLogic Canada

Quoted 73 lines · Fuxin Zhang

hello,

I have touble to make matroxfb work,could you be so kind to help me out?

My configuration:
Algorithmics P6032 evaluation board + idt64474 mipsel CPU
(with pci slot,no AGP)
Millennium G450 (PCI),16M DDR mem,Dual head. linux kernel 2.4.2 from hardhat (www.mvista.com) with some
code by me to port it to p6032
(BTW,I just can't find where the often-mentioned sgi cvs
tree is,the one listed in FAQ seems not work for me,so i have to use hardhat kernel,if possible,I am willing to contribute to linux-mips:)

symptom:
1. The card is detected as a G450 (AGP)
2. memory cannot be autodetected. getmemory exit with realSize=0
3. if i set video.len mannually to 0x1000000(16M),then all seems to work,but the screen shows only some regular vertical lines and a real BIG cursor(about 2cm x 2cm!). There is about 0.5cm between two vertical lines.
4. I can use fbset to change fb modes,and the screen do react to changes,but only with slightly different lines or blank sc.
5. I can input with a keyboard,the big cursor moves as expected just no text is output.

tweaks I have tried:
1. Update matroxfb to the one in 2.4.9-ac2,it doesn't help
2. try all kind of options: novga,nobios,noaccel,nohwcursor etc but nothing seems to really help(with nohwcursor,the big cursor disappears)(of course,I may have left out the correct combination:,it is impossible to try all)

One thing that may be useful is that pci initialization may have
problems because my firmware (pmon from algor) has some bugs which prevent it from recognize and initialize the matrox card correctly. ( e.g. There is a type error in type1 configuration access code so
it can't initialize devices behind pci-pci bridge)
I fixed part of it but not sure enough is done.So i attached an output of "lspci -vv" for your reference.

The other attachment is boot time messages.I switch on most of
the matroxfb debug option so it contains many related info.

Thank you in advance.

Regards
Fuxin Zhang
[email protected]

lspci

Content-Type:

application/octet-stream
Content-Encoding:

base64

------------------------------------------------------------------------
log.txt

Content-Type:

application/octet-stream
Content-Encoding:

base64