Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 23 Jan 2002 08:31:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 23 Jan 2002 08:31:04 -0500 Received: from skunk.directfb.org ([212.84.236.169]:63179 "EHLO skunk.convergence.de") by vger.kernel.org with ESMTP id ; Wed, 23 Jan 2002 08:30:44 -0500 Date: Wed, 23 Jan 2002 14:29:40 +0100 From: Denis Oliver Kropp To: Marcelo Tosatti Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] NeoMagic Framebuffer Driver Message-ID: <20020123132940.GA30417@skunk.convergence.de> Reply-To: Denis Oliver Kropp In-Reply-To: <20020110161922.GA27357@skunk.convergence.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <20020110161922.GA27357@skunk.convergence.de> User-Agent: Mutt/1.3.26i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Quoting Denis Oliver Kropp (dok@directfb.org): > 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. Hi, this version has a MODULE_LICENSE, applies fine to linux-2.4.18-pre6. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" convergence integrated media GmbH --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="neofb-0.3.1-linux-2.4.18-pre6.patch" diff -Naur linux-2.4.18-pre6/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.4.18-pre6/Documentation/Configure.help Wed Jan 23 13:38:48 2002 +++ linux/Documentation/Configure.help Wed Jan 23 13:42:09 2002 @@ -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 diff -Naur linux-2.4.18-pre6/drivers/video/Config.in linux/drivers/video/Config.in --- linux-2.4.18-pre6/drivers/video/Config.in Wed Jan 23 13:38:53 2002 +++ linux/drivers/video/Config.in Wed Jan 23 13:42:09 2002 @@ -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 diff -Naur linux-2.4.18-pre6/drivers/video/Makefile linux/drivers/video/Makefile --- linux-2.4.18-pre6/drivers/video/Makefile Thu Oct 25 22:53:52 2001 +++ linux/drivers/video/Makefile Wed Jan 23 13:42:09 2002 @@ -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 diff -Naur linux-2.4.18-pre6/drivers/video/fbmem.c linux/drivers/video/fbmem.c --- linux-2.4.18-pre6/drivers/video/fbmem.c Fri Dec 21 18:41:55 2001 +++ linux/drivers/video/fbmem.c Wed Jan 23 13:42:09 2002 @@ -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 }, diff -Naur linux-2.4.18-pre6/drivers/video/neofb.c linux/drivers/video/neofb.c --- linux-2.4.18-pre6/drivers/video/neofb.c Thu Jan 1 01:00:00 1970 +++ linux/drivers/video/neofb.c Wed Jan 23 13:50:08 2002 @@ -0,0 +1,2421 @@ +/* + * linux/drivers/video/neofb.c -- NeoMagic Framebuffer Driver + * + * Copyright (c) 2001 Denis Oliver Kropp + * + * + * Card specific code is based on XFree86's neomagic driver. + * Framebuffer framework code is based on code of cyber2000fb. + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + * + * + * 0.3.1 + * - added module license (dok) + * + * 0.3 + * - hardware accelerated clear and move for 2200 and above (dok) + * - maximum allowed dotclock is handled now (dok) + * + * 0.2.1 + * - correct panning after X usage (dok) + * - added module and kernel parameters (dok) + * - no stretching if external display is enabled (dok) + * + * 0.2 + * - initial version (dok) + * + * + * TODO + * - ioctl for internal/external switching + * - blanking + * - 32bit depth support, maybe impossible + * - disable pan-on-sync, need specs + * + * BUGS + * - white margin on bootup like with tdfxfb (colormap problem?) + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#ifdef CONFIG_MTRR +#include +#endif + +#include