From patchwork Mon Aug 15 17:34:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 1068592 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7FHYIds019405 for ; Mon, 15 Aug 2011 17:34:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751404Ab1HOReS (ORCPT ); Mon, 15 Aug 2011 13:34:18 -0400 Received: from mail1-out1.atlantis.sk ([80.94.52.55]:35734 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751351Ab1HOReQ (ORCPT ); Mon, 15 Aug 2011 13:34:16 -0400 Received: (qmail 17966 invoked from network); 15 Aug 2011 17:34:15 -0000 Received: from unknown (HELO pentium) (rainbow@rainbow-software.org@89.173.145.150) by mail.atlantis.sk with AES256-SHA encrypted SMTP; 15 Aug 2011 17:34:15 -0000 From: Ondrej Zary Subject: [RFC PATCH] Resurrect Intel740 driver: i740fb Date: Mon, 15 Aug 2011 19:34:01 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Disposition: inline X-Length: 562 X-UID: 105 To: linux-fbdev@vger.kernel.org Cc: Kernel development list , Paul Mundt Message-Id: <201108151934.05710.linux@rainbow-software.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 15 Aug 2011 17:34:19 +0000 (UTC) Hello, this is an attempt to resurrect 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/ It was easier to create 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 works great for console (it's pretty fast, although only ypan is implemented, no blits). There are some bugs still left (colors are wrong in fbtest with 16bpp 555 and 24bpp modes, 1280x1024-32 does not work). The i740_calc_fifo() function formatting is nice but does not pass checkpatch. Making it checkpatch-compliant makes the code look ugly. How to make it both nice and compatible with Linux coding style? (the remaining // comments mark things that need attention - missing xpan and suspend/resume) no signed-off-by yet --- linux-2.6.39-rc2-orig/drivers/video/Kconfig 2011-04-06 03:30:43.000000000 +0200 +++ linux-2.6.39-rc2/drivers/video/Kconfig 2011-07-30 11:34:10.000000000 +0200 @@ -1117,6 +1117,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 && X86_32 && AGP_INTEL + 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 --- /dev/null 2011-08-15 18:11:24.797068032 +0200 +++ linux-2.6.39-rc2/drivers/video/i740fb.c 2011-08-14 22:51:31.000000000 +0200 @@ -0,0 +1,1262 @@ +/* + * 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