From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ondrej Zajicek Subject: [PATCH 3/3] arkfb: New driver for ARK Logic cards Date: Sun, 29 Apr 2007 18:29:48 +0200 Message-ID: <20070429162948.GC12218@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-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HiCHY-0006fe-Re for linux-fbdev-devel@lists.sourceforge.net; Sun, 29 Apr 2007 09:29:53 -0700 Received: from gateway.crfreenet.org ([81.92.146.254] helo=mail.crfreenet.org ident=postfix) by mail.sourceforge.net with esmtp (Exim 4.44) id 1HiCHW-0002YO-F8 for linux-fbdev-devel@lists.sourceforge.net; Sun, 29 Apr 2007 09:29:52 -0700 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: "Antonino A. Daplas" Cc: Linux Fbdev development list This patch adds fbdev driver for graphics cards with ARK Logic 2000PV graphics chip with ICS 5342 ramdac. It is against 2.6.21-rc7-mm2 . Signed-off-by: Ondrej Zajicek --- diff -uprN -X linux-2.6.21-rc7-mm2/Documentation/dontdiff linux-2.6.21-rc7-mm2/Documentation/fb/arkfb.txt linux-2.6.21-rc7-mm2-dev/Documentation/fb/arkfb.txt --- linux-2.6.21-rc7-mm2/Documentation/fb/arkfb.txt 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.21-rc7-mm2-dev/Documentation/fb/arkfb.txt 2007-04-28 00:47:43.000000000 +0200 @@ -0,0 +1,68 @@ + + arkfb - fbdev driver for ARK Logic chips + ======================================== + + +Supported Hardware +================== + + ARK 2000PV chip + ICS 5342 ramdac + + - only BIOS initialized VGA devices supported + - probably not working on big endian + + +Supported Features +================== + + * 4 bpp pseudocolor modes (with 18bit palette, two variants) + * 8 bpp pseudocolor mode (with 18bit palette) + * 16 bpp truecolor modes (RGB 555 and RGB 565) + * 24 bpp truecolor mode (RGB 888) + * 32 bpp truecolor mode (RGB 888) + * text mode (activated by bpp = 0) + * doublescan mode variant (not available in text mode) + * panning in both directions + * suspend/resume support + +Text mode is supported even in higher resolutions, but there is limitation to +lower pixclocks (i got maximum about 70 MHz, it is dependent on specific +hardware). This limitation is not enforced by driver. Text mode supports 8bit +wide fonts only (hardware limitation) and 16bit tall fonts (driver +limitation). Unfortunately character attributes (like color) in text mode are +broken for unknown reason, so its usefulness is limited. + +There are two 4 bpp modes. First mode (selected if nonstd == 0) is mode with +packed pixels, high nibble first. Second mode (selected if nonstd == 1) is mode +with interleaved planes (1 byte interleave), MSB first. Both modes support +8bit wide fonts only (driver limitation). + +Suspend/resume works on systems that initialize video card during resume and +if device is active (for example used by fbcon). + + +Missing Features +================ +(alias TODO list) + + * secondary (not initialized by BIOS) device support + * big endian support + * DPMS support + * MMIO support + * interlaced mode variant + * support for fontwidths != 8 in 4 bpp modes + * support for fontheight != 16 in text mode + * hardware cursor + * vsync synchronization + * feature connector support + * acceleration support (8514-like 2D) + + +Known bugs +========== + + * character attributes (and cursor) in text mode are broken + +-- +Ondrej Zajicek diff -uprN -X linux-2.6.21-rc7-mm2/Documentation/dontdiff linux-2.6.21-rc7-mm2/drivers/video/Kconfig linux-2.6.21-rc7-mm2-dev/drivers/video/Kconfig --- linux-2.6.21-rc7-mm2/drivers/video/Kconfig 2007-04-28 00:41:31.000000000 +0200 +++ linux-2.6.21-rc7-mm2-dev/drivers/video/Kconfig 2007-04-28 00:49:10.000000000 +0200 @@ -1412,6 +1412,20 @@ config FB_TRIDENT_ACCEL This will compile the Trident frame buffer device with acceleration functions. +config FB_ARK + tristate "ARK 2000PV support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_TILEBLITTING + select FB_SVGALIB + select VGASTATE + select FONT_8x16 if FRAMEBUFFER_CONSOLE + ---help--- + Driver for PCI graphics boards with ARK 2000PV chip + and ICS 5342 RAMDAC. + config FB_PM3 tristate "Permedia3 support" depends on FB && PCI && BROKEN diff -uprN -X linux-2.6.21-rc7-mm2/Documentation/dontdiff linux-2.6.21-rc7-mm2/drivers/video/Makefile linux-2.6.21-rc7-mm2-dev/drivers/video/Makefile --- linux-2.6.21-rc7-mm2/drivers/video/Makefile 2007-04-28 00:41:31.000000000 +0200 +++ linux-2.6.21-rc7-mm2-dev/drivers/video/Makefile 2007-04-28 00:50:14.000000000 +0200 @@ -59,6 +59,7 @@ obj-$(CONFIG_FB_CYBLA) += cyb obj-$(CONFIG_FB_TRIDENT) += tridentfb.o obj-$(CONFIG_FB_LE80578) += vermilion/ obj-$(CONFIG_FB_S3) += s3fb.o +obj-$(CONFIG_FB_ARK) += arkfb.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.21-rc7-mm2/Documentation/dontdiff linux-2.6.21-rc7-mm2/drivers/video/arkfb.c linux-2.6.21-rc7-mm2-dev/drivers/video/arkfb.c --- linux-2.6.21-rc7-mm2/drivers/video/arkfb.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.21-rc7-mm2-dev/drivers/video/arkfb.c 2007-04-29 14:05:14.000000000 +0200 @@ -0,0 +1,1192 @@ +/* + * linux/drivers/video/arkfb.c -- Frame buffer device driver for ARK 2000PV + * with ICS 5342 dac (it is easy to add support for different dacs). + * + * Copyright (c) 2007 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 s3fb + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Why should fb driver call console functions? because acquire_console_sem() */ +#include