Skip to contentSkip to conversation

NeoMagic Framebuffer Driver

PATCH In review Denis Oliver Kropp 3 participants 5 messages Jan 10, 2002 – Jan 23, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NeoMagic Framebuffer Driver

Hi,

attached is a new version of neofb for Linux 2.4 that supports all PCI based NeoMagic chipsets. It has been ported from the XFree Driver. Features include console acceleration and LCD panel size detection. Basic features like mode switching, virtual resolutions, mtrr and mmio are also implemented.

I've seen this driver working on many notebooks now and would like the driver to be included into the kernel distribution.

Thanks.

Signature · 9 lines
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

           convergence integrated media GmbH
#1 lore raw
Quoted 9 lines · Denis Oliver Kropp

Hi,

attached is a new version of neofb for Linux 2.4 that supports all PCI based NeoMagic chipsets. It has been ported from the XFree Driver. Features include console acceleration and LCD panel size detection. Basic features like mode switching, virtual resolutions, mtrr and mmio are also implemented.

Quoted 5 lines

I've seen this driver working on many notebooks now and would like the driver to be included into the kernel distribution.

Thanks.

Hi,

this version has a MODULE_LICENSE, applies fine to linux-2.4.18-pre6.

Signature · 9 lines
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

           convergence integrated media GmbH
Documentation/Configure.help +10 -0
diff -Naur linux-2.4.18-pre6/Documentation/Configure.help linux/Documentation/Configure.help
@@ -4145,6 +4145,16 @@
   This driver supports the L7200 Color LCD.
   Say Y if you want graphics support.
 
+NeoMagic display support (EXPERIMENTAL)
+CONFIG_FB_NEOMAGIC
+  This driver supports notebooks with NeoMagic PCI chips.
+  Say Y if you have such a graphics card. 
+
+  The driver is also available as a module ( = code which can be
+  inserted and removed from the running kernel whenever you want). The
+  module will be called neofb.o. If you want to compile it as a
+  module, say M here and read Documentation/modules.txt.
+
 PowerMac "control" frame buffer device support
 CONFIG_FB_CONTROL
   This driver supports a frame buffer for the graphics adapter in the
drivers/video/Config.in +9 -6
diff -Naur linux-2.4.18-pre6/drivers/video/Config.in linux/drivers/video/Config.in
@@ -143,6 +143,7 @@
 	    bool '    SIS 630/540/730 support' CONFIG_FB_SIS_300
 	    bool '    SIS 315H/315 support' CONFIG_FB_SIS_315
 	 fi
+	 tristate '  NeoMagic display support (EXPERIMENTAL)' CONFIG_FB_NEOMAGIC
 	 tristate '  3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)' CONFIG_FB_3DFX
 	 tristate '  3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)' CONFIG_FB_VOODOO1
       fi
@@ -268,7 +269,7 @@
 	   "$CONFIG_FB_SA1100" = "y" -o "$CONFIG_FB_3DFX" = "y" -o \
 	   "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
 	   "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
-	   "$CONFIG_FB_SIS" = "y" ]; then
+	   "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_NEOMAGIC" = "y" ]; then
 	 define_tristate CONFIG_FBCON_CFB8 y
       else
 	 if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
@@ -288,7 +289,7 @@
 	      "$CONFIG_FB_PMAG_BA" = "m" -o "$CONFIG_FB_PMAGB_B" = "m" -o \
 	      "$CONFIG_FB_MAXINE" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
 	      "$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
-	      "$CONFIG_FB_TX3912" = "m" ]; then
+	      "$CONFIG_FB_TX3912" = "m" -o "$CONFIG_FB_NEOMAGIC" = "m" ]; then
 	    define_tristate CONFIG_FBCON_CFB8 m
 	 fi
       fi
@@ -304,7 +305,8 @@
 	   "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
 	   "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_3DFX" = "y"  -o \
 	   "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SA1100" = "y" -o \
-	   "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_VOODOO1" = "y" ]; then
+	   "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_VOODOO1" = "y" -o \
+	   "$CONFIG_FB_NEOMAGIC" = "y" ]; then
 	 define_tristate CONFIG_FBCON_CFB16 y
       else
 	 if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
@@ -319,7 +321,8 @@
 	      "$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
 	      "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_SIS" = "m" -o \
 	      "$CONFIG_FB_SA1100" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
-	      "$CONFIG_FB_PVR2" = "m" -o "$CONFIG_FB_VOODOO1" = "m" ]; then
+	      "$CONFIG_FB_PVR2" = "m" -o "$CONFIG_FB_VOODOO1" = "m" -o \
+	      "$CONFIG_FB_NEOMAGIC" = "m" ]; then
 	    define_tristate CONFIG_FBCON_CFB16 m
 	 fi
       fi
@@ -328,7 +331,7 @@
 	   "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
            "$CONFIG_FB_ATY128" = "y" -o "$CONFIG_FB_RADEON" = "y" -o \
 	   "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
-	   "$CONFIG_FB_VOODOO1" = "y" ]; then
+	   "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_NEOMAGIC" = "y" ]; then
 	 define_tristate CONFIG_FBCON_CFB24 y
       else
 	 if [ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
@@ -336,7 +339,7 @@
 	      "$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
 	      "$CONFIG_FB_ATY128" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
 	      "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_PVR2" = "m" -o \
-	      "$CONFIG_FB_VOODOO1" = "m" ]; then
+	      "$CONFIG_FB_VOODOO1" = "m" -o "$CONFIG_FB_NEOMAGIC" = "y" ]; then
 	    define_tristate CONFIG_FBCON_CFB24 m
 	 fi
       fi
drivers/video/Makefile +1 -0
diff -Naur linux-2.4.18-pre6/drivers/video/Makefile linux/drivers/video/Makefile
@@ -49,6 +49,7 @@
 obj-$(CONFIG_FB_ATARI)            += atafb.o
 obj-$(CONFIG_FB_ATY128)           += aty128fb.o
 obj-$(CONFIG_FB_RADEON)		  += radeonfb.o
+obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o
 obj-$(CONFIG_FB_IGA)              += igafb.o
 obj-$(CONFIG_FB_CONTROL)          += controlfb.o
 obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
drivers/video/fbmem.c +5 -0
diff -Naur linux-2.4.18-pre6/drivers/video/fbmem.c linux/drivers/video/fbmem.c
@@ -72,6 +72,8 @@
 extern int atyfb_setup(char*);
 extern int aty128fb_init(void);
 extern int aty128fb_setup(char*);
+extern int neofb_init(void);
+extern int neofb_setup(char*);
 extern int igafb_init(void);
 extern int igafb_setup(char*);
 extern int imsttfb_init(void);
@@ -171,6 +173,9 @@
 #endif
 #ifdef CONFIG_FB_ATY128
 	{ "aty128fb", aty128fb_init, aty128fb_setup },
+#endif
+#ifdef CONFIG_FB_NEOMAGIC
+	{ "neo", neofb_init, neofb_setup },
 #endif
 #ifdef CONFIG_FB_VIRGE
 	{ "virge", virgefb_init, virgefb_setup },
drivers/video/neofb.c +2421 -0

2,421 lines not on this page · raw message

drivers/video/neofb.h +294 -0

294 lines not on this page · raw message

include/linux/fb.h +12 -0
diff -Naur linux-2.4.18-pre6/include/linux/fb.h linux/include/linux/fb.h
@@ -94,6 +94,18 @@
 #define FB_ACCEL_IGS_CYBER5000	35	/* CyberPro 5000		*/
 #define FB_ACCEL_SIS_GLAMOUR    36	/* SiS 300/630/540              */
 
+
+#define FB_ACCEL_NEOMAGIC_NM2070 90	/* NeoMagic NM2070              */
+#define FB_ACCEL_NEOMAGIC_NM2090 91	/* NeoMagic NM2090              */
+#define FB_ACCEL_NEOMAGIC_NM2093 92	/* NeoMagic NM2093              */
+#define FB_ACCEL_NEOMAGIC_NM2097 93	/* NeoMagic NM2097              */
+#define FB_ACCEL_NEOMAGIC_NM2160 94	/* NeoMagic NM2160              */
+#define FB_ACCEL_NEOMAGIC_NM2200 95	/* NeoMagic NM2200              */
+#define FB_ACCEL_NEOMAGIC_NM2230 96	/* NeoMagic NM2230              */
+#define FB_ACCEL_NEOMAGIC_NM2360 97	/* NeoMagic NM2360              */
+#define FB_ACCEL_NEOMAGIC_NM2380 98	/* NeoMagic NM2380              */
+
+
 struct fb_fix_screeninfo {
 	char id[16];			/* identification string eg "TT Builtin" */
 	unsigned long smem_start;	/* Start of frame buffer mem */
#2 lore raw
In reply to Denis Oliver Kropp
Quoted 1 line · Denis Oliver Kropp

this version has a MODULE_LICENSE, applies fine to linux-2.4.18-pre6.

This seems to react rather badly when loaded from within X; I managed to lock the machine trying to switch VCs after doing so (for example, when I tried with matroxfb, it only screwed up the display.)

Yes, I know this falls into the 'don't *DO* that' category. :)

Bill

#3 lore raw
In reply to Denis Oliver Kropp
Quoted 6 lines · Bill Nottingham
Quoted 1 line · Denis Oliver Kropp

this version has a MODULE_LICENSE, applies fine to linux-2.4.18-pre6.

This seems to react rather badly when loaded from within X; I managed to lock the machine trying to switch VCs after doing so (for example, when I tried with matroxfb, it only screwed up the display.)

The Matrox graphics cards are quite resistant when being programmed by two drivers simultaneously.

Quoted 1 line

Yes, I know this falls into the 'don't *DO* that' category. :)

Definitely ;)

Signature · 9 lines
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

           convergence integrated media GmbH
#4 lore raw
In reply to Denis Oliver Kropp
Quoted 10 lines · Denis Oliver Kropp
Quoted 6 lines · Bill Nottingham
Quoted 1 line · Denis Oliver Kropp

this version has a MODULE_LICENSE, applies fine to linux-2.4.18-pre6.

This seems to react rather badly when loaded from within X; I managed to lock the machine trying to switch VCs after doing so (for example, when I tried with matroxfb, it only screwed up the display.)

The Matrox graphics cards are quite resistant when being programmed by two drivers simultaneously.

I'm quite happy since the latest 2.4.1* and X 4.1.0, switching between console framebuffers and X with my MGA G450, it didn't result in a color screw anymore, although it worked somehow before...

Quoted 3 lines
Quoted 1 line

Yes, I know this falls into the 'don't *DO* that' category. :)

Definitely ;)

No, but if you did, your eyes bled category :)

A small glitch remains: 1 of 4 X(dm) (re)starts the screen is 3 cm discentered. Switching back and forth fixes it always.

Cheers,
Hans-Peter