Skip to contentSkip to conversation

matroxfb, anybody? (More details...)

DISCUSSION Petr Vandrovec Ing. VTEI 4 participants 7 messages Feb 1, 1999 – Feb 2, 1999

lore
Share & tools
lore
#1 lore raw
In reply to Petr Vandrovec Ing. VTEI
Quoted 5 lines · Petr Vandrovec Ing. VTEI
Quoted 4 lines · Owen Waller
Quoted 4 lines

(my PReP does not have OF and I never saw it...) If you uncommented #define above, be sure that you commented out complement part from drivers/video/offb.c - otherwise matroxfb can be initialized twice, thus you'll get two fb's per one hardware :-(

Quoted 7 lines
Quoted 6 lines

Is there any way that this could be changed? I don't need my internal video (control) to work, but I'd rather have it and the matrox compiled into the one kernel without a hack. Unless Geert you know some way of "fudging" an non-OF card into the OF device tree? OR Petr could you possibly work in a #define construct so that Daniel's "hack" became official? (mind you neither of these are very general solutions).

There is a problem. What if you HAVE matrox in OF ? Of course,

Yes, Mac Matrox boards appear in the OF tree.

Quoted 4 lines

I remove this #ifdef from driver and add some variable to ensure, that driver will be initialized only once... And if matroxfb is not your primary head, you can, as temporary solution, compile it as module. It should work without problems then.

This is indeed a problem. We should use something like request_region() to claim the space used by the board. That way we can make sure each board is initialized only once. Boards that are left uninitialized and that appear in the OF tree should be handled by offb as a last resort.

Quoted 4 lines
Quoted 2 lines

Also does anybody know how this situation changes if you use BootX to boot (I don't so I can't comment on this). Would BootX map the mystique from

As I do not have anything with OF around here, tell me what you want and I'll do it...

Since BootX creates a fake OF device tree, I suspect it to appear in the tree. Can you use your Mystique under MacOS? This is of course a prerequisite for BootX seeing your board.

Quoted 2 lines

P.P.S.: Should not I remove whole #ifdef CONFIG_FB_OF from driver? Is there anybody who uses this additional feature?

If you remove it, Matrox boards will be initialized by both matroxfb and offb (unless you disable offb completely, but then other boards like control are no longer found), which is not what we want.

Greetings,

Geert

--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#0 lore raw
Quoted 10 lines · Owen Waller
Quoted 4 lines

(my PReP does not have OF and I never saw it...) If you uncommented #define above, be sure that you commented out complement part from drivers/video/offb.c - otherwise matroxfb can be initialized twice, thus you'll get two fb's per one hardware :-(

Is there any way that this could be changed? I don't need my internal video (control) to work, but I'd rather have it and the matrox compiled into the one kernel without a hack. Unless Geert you know some way of "fudging" an non-OF card into the OF device tree? OR Petr could you possibly work in a #define construct so that Daniel's "hack" became official? (mind you neither of these are very general solutions).

There is a problem. What if you HAVE matrox in OF ? Of course, I remove this #ifdef from driver and add some variable to ensure, that driver will be initialized only once... And if matroxfb is not your primary head, you can, as temporary solution, compile it as module. It should work without problems then.

Quoted 2 lines

Also does anybody know how this situation changes if you use BootX to boot (I don't so I can't comment on this). Would BootX map the mystique from

As I do not have anything with OF around here, tell me what you want and I'll do it...
Petr Vandrovec [email protected]

P.S.: I'm not on the list, so please CC me...
P.P.S.: Should not I remove whole #ifdef CONFIG_FB_OF from driver? Is there anybody who uses this additional feature?

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#3 lore raw
In reply to Owen Waller
Quoted 9 lines · Owen Waller
Quoted 2 lines
Quoted 1 line

There is a problem. What if you HAVE matrox in OF ? Of course,

Yes, Mac Matrox boards appear in the OF tree.

o.k. well the x86 board definelty doesn't... So we now have a more general problem:

If I have two idential video boards in my Mac one "mac" specific which shows up in the OF tree, and one that is x86 sourced and doesn't show up under OF how can we initialise both boards correctly.

That's indeed a case the problem will show up.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

I remove this #ifdef from driver and add some variable to ensure, that driver will be initialized only once... And if matroxfb is not your primary

im my case matroxfb will become my primary head, but I'd still like access to the internal (control) video in case soemthing in a new kernel dies before matroxfb is initialised.

So you need both offb+controlfb and matroxfb in your kernel.

Quoted 11 lines
Quoted 6 lines
Quoted 2 lines

head, you can, as temporary solution, compile it as module. It should work without problems then.

This is indeed a problem. We should use something like request_region() to claim the space used by the board. That way we can make sure each board is initialized only once. Boards that are left uninitialized and that appear in the OF tree should be handled by offb as a last resort.

Geert, I'm not sure what you are saying here. So you mean that an non-OF board whould "somehow" be initialised by another driver, and then the OF tree checked for uninitialised devices? Which in this case would presumably be the other "mac" specific video board.

Suppose you have three boards:

1. controlfb (in OF tree)
2. Mac Matrox (in OF tree)
3. normal Matrox (not in OF tree)

Offb will walk the OF tree and call the controlfb init routine for board 1 and the matroxfb init routine for board 2. Board 3 will not be initialized. Hence you have two frame buffer devices: fb0 and fb1.

Now suppose you modify matroxfb to not use OF probing, but PCI probing. You also have to remove the test for MTRX' in offb.c. Result: Offb will walk the OF tree and call the controlfb init routine for board 1. It will see board 2 in the OF tree and consider it as an unknown' OF-capable board. So you have 2 frame buffer devices fb0 and fb1. Furthermore the PCI probing in matroxfb will see both boards 2 and 3, and you end up with 2 more buffer devices fb2 and fb3. But fb1 and fb1 are the same board!

A possible solution would be to ignore OF-capable boards (`MTRX') if matroxfb is configured, and to always use PCI probing in matroxfb. The same is true for ATI boards (atyfb can do PCI probing as well).

However, the best fix (IMHO) would be:

1. Use a request_region() alike function to claim the frame buffer address region. This would make sure no more than one driver can claim the frame buffer of each board.
2. Always use PCI probing in the chip specific drivers.
3. Initialize offb only after all chip specific drivers, so offb is used as a fallback in case no other driver has claimed the board before.

Whether e.g. controlfb and the other Mac specific chipsets should use PCI probing or be called by offb (as is currently done) is left out of the discussion.

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

P.P.S.: Should not I remove whole #ifdef CONFIG_FB_OF from driver? Is there anybody who uses this additional feature?

If you remove it, Matrox boards will be initialized by both matroxfb and offb

If my board isn't seen by OF, then by taking Daniel's hack I only initialise once by matroxfb correct? So this is only a probelm if the card is seen by OF and another driver (in the case of a Mac/OF specific Matrox card)

What's Daniel's hack?

Greetings,

Geert

--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#2 lore raw
In reply to Geert Uytterhoeven

Hi,

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

(my PReP does not have OF and I never saw it...) If you uncommented #define above, be sure that you commented out complement part from drivers/video/offb.c - otherwise matroxfb can be initialized twice, thus you'll get two fb's per one hardware :-(

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines

Is there any way that this could be changed? I don't need my internal video (control) to work, but I'd rather have it and the matrox compiled into the one kernel without a hack. Unless Geert you know some way of "fudging" an non-OF card into the OF device tree? OR Petr could you possibly work in a #define construct so that Daniel's "hack" became official? (mind you neither of these are very general solutions).

There is a problem. What if you HAVE matrox in OF ? Of course,

Yes, Mac Matrox boards appear in the OF tree.

o.k. well the x86 board definelty doesn't... So we now have a more general problem:

If I have two idential video boards in my Mac one "mac" specific which shows up in the OF tree, and one that is x86 sourced and doesn't show up under OF how can we initialise both boards correctly.

Quoted 2 lines
Quoted 2 lines

I remove this #ifdef from driver and add some variable to ensure, that driver will be initialized only once... And if matroxfb is not your primary

im my case matroxfb will become my primary head, but I'd still like access to the internal (control) video in case soemthing in a new kernel dies before matroxfb is initialised.

Quoted 6 lines
Quoted 2 lines

head, you can, as temporary solution, compile it as module. It should work without problems then.

This is indeed a problem. We should use something like request_region() to claim the space used by the board. That way we can make sure each board is initialized only once. Boards that are left uninitialized and that appear in the OF tree should be handled by offb as a last resort.

Geert, I'm not sure what you are saying here. So you mean that an non-OF board whould "somehow" be initialised by another driver, and then the OF tree checked for uninitialised devices? Which in this case would presumably be the other "mac" specific video board.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Also does anybody know how this situation changes if you use BootX to boot (I don't so I can't comment on this). Would BootX map the mystique from

As I do not have anything with OF around here, tell me what you want and I'll do it...

Since BootX creates a fake OF device tree, I suspect it to appear in the tree. Can you use your Mystique under MacOS? This is of course a prerequisite for BootX seeing your board.

Nope, the card isn't seen (AFAIK) by MacOS. The card was designed for x86 systems so there never was an MacOS driver for it. So unless BootX does something very fancy when it builds an OF device tree, I guess it would miss it too.

Quoted 3 lines
Quoted 2 lines

P.P.S.: Should not I remove whole #ifdef CONFIG_FB_OF from driver? Is there anybody who uses this additional feature?

If you remove it, Matrox boards will be initialized by both matroxfb and offb

If my board isn't seen by OF, then by taking Daniel's hack I only initialise once by matroxfb correct? So this is only a probelm if the card is seen by OF and another driver (in the case of a Mac/OF specific Matrox card)

Quoted 2 lines

(unless you disable offb completely, but then other boards like control are no longer found), which is not what we want.

Exactly.

-------------------------------------------------------------------------

Owen Waller                     |   "...sometimes I think I'm a little
PhD. Student in Control Eng.    |    more English than I am French..."
Queens University               |              - Alain Prost 
Belfast                         |
Tele: +44 (0)1232 274085        |    Fax: +44 (0)1232 667023

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#4 lore raw
Quoted 3 lines · Owen Waller

If I have two idential video boards in my Mac one "mac" specific which shows up in the OF tree, and one that is x86 sourced and doesn't show up under OF how can we initialise both boards correctly.

It will not appear in OF as a display device and may not appear with a name, but are you sure it doesn't appear at all under it's generic pciXXXX,YYYY name ? (where XXXX is the vendorID and YYYY the deviceID).

Signature · 11 lines
           E-Mail: <mailto:[email protected]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email protected] ]]
#5 lore raw

hi,

Quoted 6 lines
Quoted 3 lines

If I have two idential video boards in my Mac one "mac" specific which shows up in the OF tree, and one that is x86 sourced and doesn't show up under OF how can we initialise both boards correctly.

It will not appear in OF as a display device and may not appear with a name, but are you sure it doesn't appear at all under it's generic pciXXXX,YYYY name ? (where XXXX is the vendorID and YYYY the deviceID).

I don't think so but I'll double check tonight.

Thanks

-------------------------------------------------------------------------

Owen Waller                     |   "...sometimes I think I'm a little
PhD. Student in Control Eng.    |    more English than I am French..."
Queens University               |              - Alain Prost 
Belfast                         |
Tele: +44 (0)1232 274085        |    Fax: +44 (0)1232 667023

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]

#6 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · Owen Waller

If I have two idential video boards in my Mac one "mac" specific which shows up in the OF tree, and one that is x86 sourced and doesn't show up under OF how can we initialise both boards correctly.

It will not appear in OF as a display device and may not appear with a name, but are you sure it doesn't appear at all under it's generic pciXXXX,YYYY name ? (where XXXX is the vendorID and YYYY the deviceID).

well having checked this last night an x86 matrox board definatly doesn't show up any where under /proc/device-tree. Theres no pciXXXX,YYYY type listing. But the board is there /proc/pci.

So it looks like I have a similar situation to Geert, who also has a pci board that doesn't show up under OF.

Cheers

-------------------------------------------------------------------------

Owen Waller                     |   "...sometimes I think I'm a little
PhD. Student in Control Eng.    |    more English than I am French..."
Queens University               |              - Alain Prost 
Belfast                         |
Tele: +44 (0)1232 274085        |    Fax: +44 (0)1232 667023

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]] [[ the message 'unsubscribe' to [email protected] ]]