From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ondrej Zajicek Subject: [PATCH] driver for S3 Trio Date: Fri, 24 Nov 2006 00:41:52 +0100 Message-ID: <20061123234152.GA11933@localhost.localdomain> Reply-To: linux-fbdev-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1GnOCC-0004ej-RW for linux-fbdev-devel@lists.sourceforge.net; Thu, 23 Nov 2006 15:41:33 -0800 Received: from smtp1.kolej.mff.cuni.cz ([195.113.24.4]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1GnOCB-0006LW-Rv for linux-fbdev-devel@lists.sourceforge.net; Thu, 23 Nov 2006 15:41:32 -0800 Received: from localhost.localdomain (feanorr.kolej.mff.cuni.cz [195.113.26.209]) by smtp1.kolej.mff.cuni.cz (8.13.6/8.13.6) with ESMTP id kANNfQHY043330 for ; Fri, 24 Nov 2006 00:41:27 +0100 (CET) (envelope-from zajio1am@artax.karlin.mff.cuni.cz) Received: from santiago by localhost.localdomain with local (Exim 4.50) id 1GnOCW-0003S5-C6 for linux-fbdev-devel@lists.sourceforge.net; Fri, 24 Nov 2006 00:41:52 +0100 Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: linux-fbdev-devel@lists.sourceforge.net Hello This is first draft of (PCI) S3 Trio fbdev driver. There are already two drivers for S3 Trio chips (cyberfb.c and S3trio.c) in kernel. Both are broken and targetted to uncommon variants. Features: * 8, 16 and 32 bpp modes * interlaced and doublescan modes * text mode (activated by bpp = 0), used by tileblit fbcon functions * panning in both direction * no support for accelerated bitblit functions I tested it only on S3 Trio32 and S3 Trio64 cards with 1 MB RAM. I suppose there will be problems on S3 Trio64 cards with more memory. If there is anybody willing to test this driver on such card, i will modified driver ASAP. Driver is separated to s3fb.c and svgalib.c . In svgalib.c there are generic functions which can be useful to other drivers for VGA-based cards. Signed-off-by: Ondrej Zajicek --- diff -uprN -X linux-2.6.18/Documentation/dontdiff linux-2.6.18/drivers/video/Kconfig linux-2.6.18-feanor/drivers/video/Kconfig --- linux-2.6.18/drivers/video/Kconfig 2006-09-20 05:42:06.000000000 +0200 +++ linux-2.6.18-feanor/drivers/video/Kconfig 2006-11-11 23:15:44.000000000 +0100 @@ -80,6 +80,14 @@ config FB_CFB_IMAGEBLIT blitting. This is used by drivers that don't provide their own (accelerated) version. +config FB_SVGALIB + tristate + depends on FB + default n + ---help--- + Common utility functions useful to fbdev drivers of VGA-based + cards. + config FB_MACMODES tristate depends on FB @@ -1303,6 +1311,27 @@ config FB_TRIDENT_ACCEL This will compile the Trident frame buffer device with acceleration functions. +config FB_S3 + tristate "S3 Trio support" + depends on FB && PCI + select FB_SVGALIB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Driver for graphics boards with S3 Trio32/Trio64 chip. + config FB_PM3 tristate "Permedia3 support" depends on FB && PCI && BROKEN diff -uprN -X linux-2.6.18/Documentation/dontdiff linux-2.6.18/drivers/video/Makefile linux-2.6.18-feanor/drivers/video/Makefile --- linux-2.6.18/drivers/video/Makefile 2006-09-20 05:42:06.000000000 +0200 +++ linux-2.6.18-feanor/drivers/video/Makefile 2006-11-11 23:07:05.000000000 +0100 @@ -18,6 +18,7 @@ obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfil obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o obj-$(CONFIG_FB_MACMODES) += macmodes.o +obj-$(CONFIG_FB_SVGALIB) += svgalib.o # Hardware specific drivers go first obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o @@ -53,6 +54,8 @@ obj-$(CONFIG_FB_S3TRIO) += S3t obj-$(CONFIG_FB_FM2) += fm2fb.o obj-$(CONFIG_FB_CYBLA) += cyblafb.o obj-$(CONFIG_FB_TRIDENT) += tridentfb.o +obj-$(CONFIG_FB_S3) += s3fb.o obj-$(CONFIG_FB_STI) += stifb.o obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o obj-$(CONFIG_FB_CG6) += cg6.o sbuslib.o diff -uprN -X linux-2.6.18/Documentation/dontdiff linux-2.6.18/drivers/video/s3fb.c linux-2.6.18-feanor/drivers/video/s3fb.c --- linux-2.6.18/drivers/video/s3fb.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.18-feanor/drivers/video/s3fb.c 2006-11-23 23:24:07.000000000 +0100 @@ -0,0 +1,1001 @@ +/* +* linux/drivers/video/s3fb.c -- Frame buffer device driver for S3 Trio32/64 +* +* Copyright (c) 2006 Ondrej Zajicek +* +* 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. +* +* Code is based on David Boucher's viafb (http://davesdomain.org.uk/viafb/) +* which is based on the code of neofb. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Why should fb driver call console functions? strange ...*/ +#include