embedded linux board, problems with Matrox G450 - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: December 18, 2017, 09:03:20 pm
content: Code:matroxfb: Matrox G450 detectedmatroxfb: cannot determine memory sizematroxfb: probe of 0000:01:00.0 failed with error -1Kernel 4.11So, I need to use an embedded PowerPC machine with a PCI bus loaded with a Matrox G450 video card. It's a dual head video card, 2xVGA with 32MByte of video ram.I got the above error, and I wonder ... do you remember any special flag to make it working?In the same board, matrox millenniumI and II are perfectly workingTips? Advice? Let me know! Thanks

author: legacy
author_rank: Super Contributor
timestamp: December 18, 2017, 10:00:05 pm
content: Code:err = -ENXIO;matroxfb_read_pins(minfo);if (minfo->hw_switch->preinit(minfo)){goto failVideoIO;}err = -ENOMEM;if (!matroxfb_getmemory(minfo, memsize, &minfo->video.len) || !minfo->video.len){printk(KERN_ERR "matroxfb: cannot determine memory size\n");goto failVideoIO;}minfo->devflags.ydstorg = 0;

author: legacy
author_rank: Super Contributor
timestamp: December 18, 2017, 10:26:15 pm
content: Code://myhackerr = -ENOMEM;if (!matroxfb_getmemory(minfo, memsize, &minfo->video.len) || !minfo->video.len){printk(KERN_ERR "matroxfb: minfo->video.len_max=%lu\n",minfo->video.len_maximum);printk(KERN_ERR "matroxfb: minfo->video.len=%lu\n",minfo->video.len);printk(KERN_ERR "matroxfb: matroxfb_getmemory=%d\n",matroxfb_getmemory(minfo, memsize, &minfo->video.len)$printk(KERN_ERR "matroxfb: cannot determine memory size\n");//goto failVideoIO;minfo->video.len=minfo->video.len_maximum; //myhack force it}drivers/video/fbdev/matrox/matroxfb_base.cCode:matroxfb: Matrox G450 detectedPInS data found at offset 31936PInS memtype = 4matroxfb: minfo->video.len_max=33554432matroxfb: minfo->video.len=0matroxfb: matroxfb_getmemory=1matroxfb: cannot determine memory sizematroxfb: 640x480x8bpp (virtual: 640x26214)matroxfb: framebuffer at 0x80000000, mapped to 0xc4080000, size 33554432Console: switching to colour frame buffer device 80x30fb0: Matrox frame buffer devicematroxfb_crtc2: secondary head of fb0 was registered as fb1ugly hack, but it seems a good workaround; X11 is loaded and working, but ... still have to understand why minfo->video.len returns 0

author: legacy
author_rank: Super Contributor
timestamp: December 18, 2017, 10:27:58 pm
content: Code:0008:01:00.0 Class 0300: Device 102b:0525 (rev 85)Subsystem: Device 102b:0d41Flags: bus master, medium devsel, latency 128, IRQ 30Memory at 80000000 (32-bit, prefetchable) [size=32M]Memory at 82820000 (32-bit, non-prefetchable) [size=16K]Memory at 82000000 (32-bit, non-prefetchable) [size=8M]Expansion ROM at 82800000  [size=128K]Capabilities:  Power Management version 2Capabilities:  AGP version 2.0Kernel driver in use: matroxfbvideoram @ 0x80000000,32Mbyte

author: legacy
author_rank: Super Contributor
timestamp: December 19, 2017, 02:36:58 pm
content: QuoteSo,the articlewas written in 2001, but ... it is what I am observing in a modern linux kernel v4.1 running on the top of an embedded PowerPC machine ....In short: forget Matrox G2xx, G4xx, you can only use MilleniumI/II as MGA framebuffer.

author: legacy
author_rank: Super Contributor
timestamp: December 19, 2017, 02:46:53 pm
content: plus thisQuoteJezz, how a crazy world

author: rsjsouza
author_rank: Super Contributor
timestamp: December 19, 2017, 07:02:37 pm
content: legacy, I had a Matrox Millenium G400 back when it was new, and as I remember its support was very flaky. To me it seemed they were about to give up on the video graphics cards for consumer - it was a pain to configure it with Solaris and Linux, while Windows had ok drivers for 2D but were never quite good for 3D.

author: legacy
author_rank: Super Contributor
timestamp: December 19, 2017, 07:15:12 pm
content: Quote from: rsjsouza on December 19, 2017, 07:02:37 pmYes, it's a mess! I need two heads for a project I am working on; it's an X11 terminal made with an embedded powerpc board, the login is by a SMART CARD (embedded with people's badge), and it requires two screens. The board has only two PCI slots, no built-in USB, so one slot is used by a PCI-PS/2 adapter (for both mouse and keyboard), while the second slot is used by the video card.And here we have the problem. G450-pci comes with two vga connectors, it allows two framebuffer (fb0, fb1), it has enough video ram for both (32MB), but .. the kernel-driver is a mess, the documentation is poor (tons of features unknown, tons of details of the init process is unknown), and the BIOS is written in x86 code

author: Rasz
author_rank: Super Contributor
timestamp: December 20, 2017, 01:37:12 am
content: Quote from: legacy on December 18, 2017, 10:27:58 pmQuote from: legacy on December 18, 2017, 09:03:20 pmminfo->video.vbase is wrong, but judging by those old messages it shouldnt work at all without x86 vga bios being somehow executed in emulator on powerpc

author: legacy
author_rank: Super Contributor
timestamp: December 21, 2017, 12:29:14 pm
content: Quote from: Rasz on December 20, 2017, 01:37:12 amthe solution was- adding the x86 emulator on powerpc- adding "matroxfb:init,bios" to cmdlinethe MGA chip was not initialized at allnot it's working!