Skip to contentSkip to conversation

matroxfb, anybody? (More details...)

DISCUSSION Petr Vandrovec Ing. VTEI 4 participants 5 messages Feb 1, 1999 – Feb 2, 1999 Framebuffer layer

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Owen Waller

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.

If you have at least one matrox in your OF tree, driver will initialize all matroxes from offb. If you have no matrox in OF tree, driver will initialize them from matrox_init.

Quoted 3 lines

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.

Without offb you can set order by
video=control: video=matrox:
to get control first (or vice versa to get matrox first). With offb I do not know.

So, attached patch adds back that matrox_init is called unless you specify video=matrox:off' on command line. In this case, matrox can be still initialized through offb. If you specify video=matrox:disabled', driver will be unavailable for offb too.
Also, driver still does not use device_node passed to driver by offb because of no-one told me what I can expect in that variable... Driver uses nvram_read_byte(NV_VMODE & NV_CMODE) to set initial resolution if offb is enabled.
Best regards,
Petr Vandrovec [email protected]

P.S.: I hope that your list survive this 890 bytes long attachment. P.P.S.: As usual, cc-me if you have comments/question/... P.P.P.S.: If patch will not apply cleanly, apply Geert's scr_readw() patches first.

drivers/video/matroxfb.c +13 -7
@@ -4,7 +4,7 @@
  *
  * (c) 1998,1999 Petr Vandrovec <[email protected]>
  *
- * Version: 1.9 1999/01/04
+ * Version: 1.13 1999/02/01
  *
  * MTRR stuff: 1998 Tom Rini <[email protected]>
  *
@@ -5743,20 +5748,26 @@
 }
 
 #ifndef MODULE
+static int __init initialized = 0;
+
 __initfunc(void matroxfb_init(void))
 {
 	DBG("matroxfb_init")
-#if defined(CONFIG_FB_OF)
-/* Nothing to do, must be called from offb */
-#else	
-	matrox_init();
-#endif
+	
+	if (!initialized) {
+		initialized = 1;
+		matrox_init();
+	}
 }
 
 #if defined(CONFIG_FB_OF)
 __initfunc(int matrox_of_init(struct device_node *dp)) {
 	DBG("matrox_of_init");
-	matrox_init();
+	
+	if (!initialized) {
+		initialized = 1;
+		matrox_init();
+	}
 	if (!fb_list) return -ENXIO;
 	return 0;
 }
#1 lore raw
Quoted 17 lines · Petr Vandrovec Ing. VTEI
Quoted 5 lines · Owen Waller

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.

If you have at least one matrox in your OF tree, driver will initialize all matroxes from offb. If you have no matrox in OF tree, driver will initialize them from matrox_init.

Quoted 3 lines

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.

Without offb you can set order by
video=control: video=matrox:
to get control first (or vice versa to get matrox first). With offb I do not know.

Quoted 4 lines

So, attached patch adds back that matrox_init is called unless you specify video=matrox:off' on command line. In this case, matrox can be still initialized through offb. If you specify video=matrox:disabled', driver will be unavailable for offb too.

Which does not help if you have 2 Matrox boards, due to the single static `initialized' variable.

Quoted 2 lines

Also, driver still does not use device_node passed to driver by offb because of no-one told me what I can expect in that variable... Driver

You can find the PCI base addresses in there (look at atyfb_of_init() for an example).

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
Quoted 21 lines · Geert Uytterhoeven
Quoted 12 lines · Petr Vandrovec Ing. VTEI
Quoted 5 lines · Owen Waller

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.

If you have at least one matrox in your OF tree, driver will initialize all matroxes from offb. If you have no matrox in OF tree, driver will initialize them from matrox_init.

Quoted 3 lines

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 8 lines

Without offb you can set order by
video=control: video=matrox:
to get control first (or vice versa to get matrox first). With offb I do not know.
So, attached patch adds back that matrox_init is called unless you specify video=matrox:off' on command line. In this case, matrox can be still initialized through offb. If you specify video=matrox:disabled', driver will be unavailable for offb too.

Quoted 2 lines

Which does not help if you have 2 Matrox boards, due to the single static `initialized' variable.

True. In this case is it worth applying your patch Petr?

Quoted 4 lines
Quoted 2 lines

Also, driver still does not use device_node passed to driver by offb because of no-one told me what I can expect in that variable... Driver

You can find the PCI base addresses in there (look at atyfb_of_init() for an example).

if you know the base address in PCI could this be used to move the card into OF?

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

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] ]]

#3 lore raw

2.2.1 & serial ports

In reply to Geert Uytterhoeven

Folks,

I've compiled a stock v2.2.1 kernel _without_ UNIX98 support so I don't have a /proc/tty filesystem but I can't seem to access the serial ports since the upgrade. In particular ppp won't dial out - it pickes up and senses the carrier but thats it. It's almost as if the modem doesn't have a dial tone (although it certainly does). Also minicom takes an age to initialise and then pretty much refuses to talk to the modem.

But if I drop back to my last good kernel (v2.1.127) things work perfectly.

I know you need glib v2+ to be able to use the UNIX98 support but as I'm on a stock R4 system I explicity turned this off in the kernel config.

Has anybody got ppp to work with a v2.2 kernel?

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

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

Re: 2.2.1 & serial ports

Quoted 9 lines · Owen Waller

Folks,

I've compiled a stock v2.2.1 kernel _without_ UNIX98 support so I don't have a /proc/tty filesystem but I can't seem to access the serial ports since the upgrade. In particular ppp won't dial out - it pickes up and senses the carrier but thats it. It's almost as if the modem doesn't have a dial tone (although it certainly does). Also minicom takes an age to initialise and then pretty much refuses to talk to the modem.

Is it set to use /dev/cuaX or /dev/ttySX? /dev/cuaX is outdated and might not be usable with v2.2.

What kernel messages do you get (dmesg)? What about syslog (/var/log/messages)?

Quoted 7 lines

But if I drop back to my last good kernel (v2.1.127) things work perfectly.

I know you need glib v2+ to be able to use the UNIX98 support but as I'm on a stock R4 system I explicity turned this off in the kernel config.

Has anybody got ppp to work with a v2.2 kernel?

ME!

m.

[[ 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] ]]