From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ondrej Zary Date: Wed, 07 Dec 2011 23:24:18 +0000 Subject: [PATCH v4] Resurrect Intel740 driver: i740fb Message-Id: <201112080024.24383.linux@rainbow-software.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-fbdev@vger.kernel.org Cc: Florian Tobias Schandinat , Paul Mundt , Kernel development list This is a resurrection of an old (like 2.4.19) out-of-tree driver for Intel740 graphics cards and modify it for recent kernels. The old driver is located at: http://sourceforge.net/projects/i740fbdev/files/ This is a new driver based on skeletonfb, using most of the low level HW code from the old driver. The DDC code is completely new. The driver was tested on two 8MB cards: Protac AG240D and Diamond Stealth II G460. Signed-off-by: Ondrej Zary --- Changes in v4: - shortened many lines to fit 80-char limit - removed useless inb_p and outb_p functions - converted DDC (and some other) code to i740outreg_mask - removed useless wm initialization in i740_calc_fifo() - ALIGN macro is used instead of manual alignment - removed inactive code - simplified i740_setcolreg() - info->var used for panning - fixed out-of-video-memory checking --- linux-3.1-orig/drivers/video/Kconfig 2011-10-24 09:10:05.000000000 +0200 +++ linux-3.1/drivers/video/Kconfig 2011-10-28 20:42:33.000000000 +0200 @@ -1114,6 +1114,17 @@ config FB_RIVA_BACKLIGHT help Say Y here if you want to control the backlight of your display. +config FB_I740 + tristate "Intel740 support (EXPERIMENTAL)" + depends on EXPERIMENTAL && FB && PCI + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VGASTATE + help + This driver supports graphics cards based on Intel740 chip. + config FB_I810 tristate "Intel 810/815 support (EXPERIMENTAL)" depends on EXPERIMENTAL && FB && PCI && X86_32 && AGP_INTEL --- linux-3.1-orig/drivers/video/Makefile 2011-10-24 09:10:05.000000000 +0200 +++ linux-3.1/drivers/video/Makefile 2011-10-28 22:43:32.000000000 +0200 @@ -36,6 +36,7 @@ obj-$(CONFIG_FB_CYBER2000) += cyb obj-$(CONFIG_FB_PM2) += pm2fb.o obj-$(CONFIG_FB_PM3) += pm3fb.o +obj-$(CONFIG_FB_I740) += i740fb.o obj-$(CONFIG_FB_MATROX) += matrox/ obj-$(CONFIG_FB_RIVA) += riva/ obj-$(CONFIG_FB_NVIDIA) += nvidia/ --- /dev/null 2011-12-08 00:02:00.479903436 +0100 +++ linux-3.1/drivers/video/i740fb.c 2011-12-07 23:57:43.000000000 +0100 @@ -0,0 +1,1283 @@ +/* + * i740fb - framebuffer driver for Intel740 + * Copyright (c) 2011 Ondrej Zary + * + * Based on old i740fb driver (c) 2001-2002 Andrey Ulanov + * which was partially based on: + * VGA 16-color framebuffer driver (c) 1999 Ben Pfaff + * and Petr Vandrovec + * i740 driver from XFree86 (c) 1998-1999 Precision Insight, Inc., Cedar Park, + * Texas. + * i740fb by Patrick LERDA, v0.9 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include