All of lore.kernel.org
 help / color / mirror / Atom feed
* matroxfb on 2.4.0 / PCI: Failed to allocate...
@ 2001-01-16  0:22 Chad Miller
  0 siblings, 0 replies; 4+ messages in thread
From: Chad Miller @ 2001-01-16  0:22 UTC (permalink / raw)
  To: linux-kernel

Hi, all.  I'm trying to get matroxfb running on a G400Max (dualhead).

Of course, I have i2c bit-banging on and the relevant Matrox options
turned on (as modules or compiled-in), and I don't see the expected
`framebuffer: blah' after the `matroxfb: Matrox Millennium G400 MAX (AGP)
detected'.

I worry about some PCI initialization output (from dmesg):

# PCI: Probing PCI hardware
# Unknown bridge resource 0: assuming transparent
# PCI: Using IRQ router VIA [1106/0686] at 00:07.0
# PCI: Cannot allocate resource region 0 of device 01:00.0
# PCI: Failed to allocate resource 0 for Matrox Graphics, Inc. MGA G400 AGP
[...]

That `device 01:00.0' is obviously the AGP MGA.  'dmesg' continues later
with...

# matroxfb: Matrox Millennium G400 MAX (AGP) detected
# i2c-core.o: i2c core module
# i2c-algo-bit.o: i2c bit algorithm module
# i2c-core.o: driver maven registered.  [...]

...and the loaded modules include...

Module                  Size  Used by
matroxfb_crtc2          6928   0 (unused)
matroxfb_maven          9552   0 (unused)
i2c-matroxfb            3632   0 (unused)
i2c-algo-bit            7392   0 [i2c-matroxfb]
i2c-core               13072   0 [matroxfb_maven i2c-algo-bit]
matroxfb_base          16848   0 [matroxfb_crtc2 i2c-matroxfb]
matroxfb_DAC1064        5824   0 [matroxfb_crtc2 matroxfb_base]
matroxfb_accel          8192   0 [matroxfb_crtc2 matroxfb_maven \
i2c-matroxfb matroxfb_base matroxfb_DAC1064]
matroxfb_misc          13088   0 [matroxfb_crtc2 matroxfb_maven \
i2c-matroxfb matroxfb_base matroxfb_DAC1064 matroxfb_accel]
agpgart                13536   0 (unused)

...but...

cmiller@canard:~$ cat /proc/fb
cmiller@canard:~$

Ideas?  Pointers?  I'm available for questions and flames.

						- chad

--
Chad Miller <cmiller@surfsouth.com>   URL: http://web.chad.org/   (GPG)
"Any technology distinguishable from magic is insufficiently advanced".
First corollary to Clarke's Third Law (Jargon File, v4.2.0, 'magic')
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matroxfb on 2.4.0 / PCI: Failed to allocate...
@ 2001-01-16 17:56 Petr Vandrovec
  2001-01-16 18:22 ` Chad Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vandrovec @ 2001-01-16 17:56 UTC (permalink / raw)
  To: Chad Miller; +Cc: linux-kernel

On 15 Jan 01 at 19:22, Chad Miller wrote:

> I worry about some PCI initialization output (from dmesg):
> 
> # PCI: Probing PCI hardware
> # Unknown bridge resource 0: assuming transparent
> # PCI: Using IRQ router VIA [1106/0686] at 00:07.0
> # PCI: Cannot allocate resource region 0 of device 01:00.0
> # PCI: Failed to allocate resource 0 for Matrox Graphics, Inc. MGA G400 AGP
> [...]
> 
> That `device 01:00.0' is obviously the AGP MGA.  'dmesg' continues later
> with...
> 
> # matroxfb: Matrox Millennium G400 MAX (AGP) detected
> # i2c-core.o: i2c core module
> # i2c-algo-bit.o: i2c bit algorithm module
> # i2c-core.o: driver maven registered.  [...]

What does 'lspci -v' say?

Are you sure that you do not have 'matroxfb: control registers are not
available, matroxfb disabled', or 'matroxfb: video RAM is not available
in PCI address space, matroxfb disabled' messages?

Also, when request_mem_region(ctrl, 16K, "matroxfb MMIO") or
request_mem_region(videoram, 32M, "matroxfb FB") fails (f.e. when
both regions are uninitialized they overlaps, so second request_mem_region
fails), there is a bug that no error message is printed
in such case, as matroxfb assumes that if request_mem_region failed,
it was because of some other driver already controls this hardware.

You should make sure that (1) you have only one VGA in machine and
(2) your BIOS is not buggy. Changing any of these two conditions should
enable matroxfb to run (G400 is not very well supported as second head;
you can experiment with 'memtype' matroxfb option, but...)
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matroxfb on 2.4.0 / PCI: Failed to allocate...
  2001-01-16 17:56 matroxfb on 2.4.0 / PCI: Failed to allocate Petr Vandrovec
@ 2001-01-16 18:22 ` Chad Miller
  0 siblings, 0 replies; 4+ messages in thread
From: Chad Miller @ 2001-01-16 18:22 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel

On Tue, Jan 16, 2001 at 05:56:34PM +0000, Petr Vandrovec wrote:
> What does 'lspci -v' say?

Hi, Petr.

I'm sorry for the verbosity, all.  Here it is:

#00:00.0 Host bridge: VIA Technologies, Inc. VT8371 [KX133] (rev 02)
#        Flags: bus master, medium devsel, latency 0
#        Memory at d0000000 (32-bit, prefetchable) [size=64M]
#        Capabilities: <available only to root>
#
#00:01.0 PCI bridge: VIA Technologies, Inc. VT8371 [KX133 AGP]  (prog-if 00 \
#[Normal decode])
#        Flags: bus master, 66Mhz, medium devsel, latency 0
#        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
#        Memory behind bridge: d4000000-d6ffffff
#        Prefetchable memory behind bridge: d7000000-d8ffffff
#        Capabilities: <available only to root>
#
#00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] \
#(rev 22)
#        Subsystem: VIA Technologies, Inc. VT82C686/A PCI to ISA Bridge
#        Flags: bus master, stepping, medium devsel, latency 0
#
#00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 10) \
#(prog-if 8a [Master SecP PriP])
#        Flags: bus master, medium devsel, latency 32
#        I/O ports at e000 [size=16]
#        Capabilities: <available only to root>
#
#00:07.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] \
#(rev 30)
#        Flags: medium devsel
#        Capabilities: <available only to root>
#
#00:09.0 Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] \
#(rev 08)
#        Subsystem: Intel Corporation EtherExpress PRO/100+ Management Adapter
#        Flags: bus master, medium devsel, latency 32, IRQ 11
#        Memory at da100000 (32-bit, non-prefetchable) [size=4K]
#        I/O ports at ec00 [size=64]
#        Memory at da000000 (32-bit, non-prefetchable) [size=1M]
#        Expansion ROM at <unassigned> [disabled] [size=1M]
#        Capabilities: <available only to root>
#
#01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP \
#(rev 05) (prog-if 00 [VGA])
#        Subsystem: Matrox Graphics, Inc. Millennium G400 MAX/Dual Head 32Mb
#        Flags: bus master, VGA palette snoop, medium devsel, latency 64, IRQ 10
#        Memory at d8000000 (32-bit, prefetchable) [size=16M]
#        Memory at d4000000 (32-bit, non-prefetchable) [size=16K]
#        Memory at d5000000 (32-bit, non-prefetchable) [size=8M]
#        Expansion ROM at <unassigned> [disabled] [size=64K]
#        Capabilities: <available only to root>
#


> Are you sure that you do not have 'matroxfb: control registers are not
> available, matroxfb disabled', or 'matroxfb: video RAM is not available
> in PCI address space, matroxfb disabled' messages?

$ dmesg |egrep -i '(pci|matrox|mga|fb|registers|video)' | \
 egrep -v '(IDE|passed|Serial)'
Kernel command line: mem=262080K  root=/dev/hda3 video=matrox
PCI: PCI BIOS revision 2.10 entry at 0xfb4d0, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router VIA [1106/0686] at 00:07.0
PCI: Cannot allocate resource region 0 of device 01:00.0
PCI: Failed to allocate resource 0 for Matrox Graphics, Inc. MGA G400 AGP
matroxfb: Matrox Millennium G400 MAX (AGP) detected
PCI: Found IRQ 11 for device 00:09.0
$ 

> Also, when request_mem_region(ctrl, 16K, "matroxfb MMIO") or
> request_mem_region(videoram, 32M, "matroxfb FB") fails (f.e. when
> both regions are uninitialized they overlaps, so second request_mem_region
> fails), there is a bug that no error message is printed
> in such case, as matroxfb assumes that if request_mem_region failed,
> it was because of some other driver already controls this hardware.

Is there a patch available, or should I go looking for it?

 
> You should make sure that (1) you have only one VGA in machine and
> (2) your BIOS is not buggy. Changing any of these two conditions should
> enable matroxfb to run (G400 is not very well supported as second head;
> you can experiment with 'memtype' matroxfb option, but...)

(1) is true.  (2) is true, AFAICT, but I'm no BIOS expert.  I once success-
fully used matroxfb on this machine under 2.2.~17, but haven't tried it
again before 2.4 . 

						- chad

--
Chad Miller <cmiller@surfsouth.com>   URL: http://web.chad.org/   (GPG)
"Any technology distinguishable from magic is insufficiently advanced".
First corollary to Clarke's Third Law (Jargon File, v4.2.0, 'magic')
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: matroxfb on 2.4.0 / PCI: Failed to allocate...
@ 2001-01-16 19:31 Petr Vandrovec
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vandrovec @ 2001-01-16 19:31 UTC (permalink / raw)
  To: Chad Miller; +Cc: linux-kernel

On 16 Jan 01 at 13:22, Chad Miller wrote:
> On Tue, Jan 16, 2001 at 05:56:34PM +0000, Petr Vandrovec wrote:
> > What does 'lspci -v' say?
> 
> #00:01.0 PCI bridge: VIA Technologies, Inc. VT8371 [KX133 AGP]  (prog-if 00 \
> #[Normal decode])
> #        Flags: bus master, 66Mhz, medium devsel, latency 0
> #        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
> #        Memory behind bridge: d4000000-d6ffffff
> #        Prefetchable memory behind bridge: d7000000-d8ffffff
                                                       ^^^^^^^^
> #        Capabilities: <available only to root>
> #
> #01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP \
> #(rev 05) (prog-if 00 [VGA])
> #        Subsystem: Matrox Graphics, Inc. Millennium G400 MAX/Dual Head 32Mb
> #        Flags: bus master, VGA palette snoop, medium devsel, latency 64, IRQ 10
> #        Memory at d8000000 (32-bit, prefetchable) [size=16M]
> #        Memory at d4000000 (32-bit, non-prefetchable) [size=16K]
> #        Memory at d5000000 (32-bit, non-prefetchable) [size=8M]
> #        Expansion ROM at <unassigned> [disabled] [size=64K]
> #        Capabilities: <available only to root>

There is something wrong with your hardware. First region for G400 should
be 32MB, not 16MB (even if you have 16MB G400, which I doubt).

Prefetchable memory behind bridge on 0:01.0 should end at 0xd9ffffff.
This is probably what kernel wants to say - memory region is 32MB, but
there is only 16MB behind bridge, so region does not fit...

> > in such case, as matroxfb assumes that if request_mem_region failed,
> > it was because of some other driver already controls this hardware.
> 
> Is there a patch available, or should I go looking for it?

Search function initMatrox2() in drivers/video/matrox/matroxfb_base.c.
In this function, you'll find two calls to request_mem_region followed
by 'goto fail' (or 'goto failCtrlMR) without printk. You can try to add
printk() here. Second request_mem_region fails, because of PCI subsystem
reports only 16MB window, while matroxfb requests 32MB one.
You can workaround by changing first value in
'static struct video_board vbG400' from 0x2000000 to 0x1000000. But only
16MB are available then. I'd like to see what XFree does on your hardware...
                                        Best regards,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-01-16 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-16 17:56 matroxfb on 2.4.0 / PCI: Failed to allocate Petr Vandrovec
2001-01-16 18:22 ` Chad Miller
  -- strict thread matches above, loose matches on Subject: below --
2001-01-16 19:31 Petr Vandrovec
2001-01-16  0:22 Chad Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.