From: Paul Mundt This patch adds support for the Kyro graphics boards (STG4000/PowerVR 3/etc= .) to 2.6. This is a direct port and substantial cleanup / rewrite of the 2.4 driver that's available in the sh64 tree at linux-sh.bkbits.net. Some of the overlay code and the STG4000 bits are still a bit ugly, so be forewarned. --- drivers/video/Kconfig | 10 drivers/video/Makefile | 1 drivers/video/fbmem.c | 6 drivers/video/kyro/Makefile | 13 drivers/video/kyro/STG4000InitDevice.c | 326 ++++++++++++ drivers/video/kyro/STG4000Interface.h | 60 ++ drivers/video/kyro/STG4000OverlayDevice.c | 600 ++++++++++++++++++++++ drivers/video/kyro/STG4000Ramdac.c | 164 ++++++ drivers/video/kyro/STG4000Reg.h | 283 ++++++++++ drivers/video/kyro/STG4000VTG.c | 170 ++++++ drivers/video/kyro/fbdev.c | 808 ++++++++++++++++++++++++++++++ include/video/kyro.h | 94 +++ 12 files changed, 2535 insertions(+) diff -puN drivers/video/fbmem.c~sh-kyrofb-support drivers/video/fbmem.c --- 25/drivers/video/fbmem.c~sh-kyrofb-support 2004-01-13 19:16:16.000000000 -0800 +++ 25-akpm/drivers/video/fbmem.c 2004-01-13 19:16:16.000000000 -0800 @@ -159,6 +159,8 @@ extern int tcx_init(void); extern int tcx_setup(char*); extern int leo_init(void); extern int leo_setup(char*); +extern int kyrofb_init(void); +extern int kyrofb_setup(char*); static struct { const char *name; @@ -360,6 +362,10 @@ static struct { #ifdef CONFIG_FB_VOODOO1 { "sstfb", sstfb_init, sstfb_setup }, #endif +#ifdef CONFIG_FB_KYRO + { "kyrofb", kyrofb_init, kyrofb_setup }, +#endif + /* * Generic drivers that don't use resource management (yet) */ diff -puN drivers/video/Kconfig~sh-kyrofb-support drivers/video/Kconfig --- 25/drivers/video/Kconfig~sh-kyrofb-support 2004-01-13 19:16:16.000000000 -0800 +++ 25-akpm/drivers/video/Kconfig 2004-01-13 19:16:16.000000000 -0800 @@ -726,6 +726,16 @@ config FB_NEOMAGIC To compile this driver as a module, choose M here: the module will be called neofb. +config FB_KYRO + tristate "IMG Kyro support" + depends on FB && PCI + help + Say Y here if you have a STG4000 / Kyro / PowerVR 3 based + graphics board. + + To compile this driver as a module, choose M here: the + module will be called kyrofb. + config FB_3DFX tristate "3Dfx Banshee/Voodoo3 display support" depends on FB && PCI diff -puN /dev/null drivers/video/kyro/fbdev.c --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25-akpm/drivers/video/kyro/fbdev.c 2004-01-13 19:16:16.000000000 -0800 @@ -0,0 +1,808 @@ +/* + * linux/drivers/video/kyro/kyrofb.c + * + * Copyright (C) 2002 STMicroelectronics + * Copyright (C) 2003, 2004 Paul Mundt + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_MTRR +#include +#endif + +#include