From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Antonino A. Daplas" Subject: Re: [PATCH]: frame buffer driver for 2700G LCD controller Date: Tue, 11 Jul 2006 20:53:45 +0800 Message-ID: <44B39F59.9030605@gmail.com> References: <44AD2B75.6050302@compulab.co.il> <44ADC4AE.2040903@gmail.com> <44B11542.7010402@compulab.co.il> <44B18F68.2080802@gmail.com> <44B3954D.4040302@compulab.co.il> 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 1G0HkR-0000FA-5E for linux-fbdev-devel@lists.sourceforge.net; Tue, 11 Jul 2006 05:53:55 -0700 Received: from py-out-1112.google.com ([64.233.166.179]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1G0HkQ-0007dU-NK for linux-fbdev-devel@lists.sourceforge.net; Tue, 11 Jul 2006 05:53:55 -0700 Received: by py-out-1112.google.com with SMTP id c31so4299826pyd for ; Tue, 11 Jul 2006 05:53:50 -0700 (PDT) In-Reply-To: <44B3954D.4040302@compulab.co.il> 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: Mike Rapoport Cc: linux-fbdev-devel@lists.sourceforge.net Mike Rapoport wrote: > Antonino A. Daplas wrote: > >> Mike Rapoport wrote: >> >> >>> Antonino A. Daplas wrote: >>> >>> >>>> Mike Rapoport wrote: >>>> >>>> >>>> >>>>> This patch adds frame buffer driver for 2700G LCD controller >>>>> present on >>>>> CompuLab CM-X270 computer module. >>>>> This pacth is versus current Linus git tree. >>>>> >>>>> Signed-off-by: Mike Rapoport >> It's because you don't have an info->pseudo_palette. And if you >> accidentally >> load the framebuffer console, your kernel will just crash because the >> drawing functions (cfb_{fillrect,imageblit}) unconditionally refers to >> that >> array. >> >> So you have to do either one: >> >> 1. Create a properly filled up info->pseudo_palette; or >> >> > I think I've succeded to make it. At least I can see tux logo and getty > output at startup. > >> BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or >> __raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of >> changes. >> Otherwise, this driver won't get past Andrew Morton and Rusty. >> >> See include/asm/io.h. >> >> > Done. Definitely much, much better. I'm attaching a clean-up patch. If you approve, I'll send your patch + cleanup upstream. Tony mbxfb: Various fixes From: <> - Add more informative help text to Kconfig - Make DEBUG a Kconfig option as FB_MBX_DEBUG - Remove #include mbxdebug.c, this is frowned upon - Remove redundant casts - Arrange #include's alphabetically - Trivial whitespace changes Signed-off-by: Antonino Daplas --- drivers/video/Kconfig | 12 +++++++++++- drivers/video/mbx/Makefile | 3 ++- drivers/video/mbx/mbxfb.c | 24 +++++++++++------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0f4af08..153e23e 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1547,8 +1547,18 @@ config FB_MBX select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT ---help--- + Framebuffer driver for the Intel 2700G (Marathon) Graphics + Accelerator - If unsure, say N. +config FB_MBX_DEBUG + bool "Enable debugging info via debugfs" + depends on FB_MBX && DEBUG_FS + default n + ---help--- + Enable this if you want debugging information using the debug + filesystem (debugfs) + + If unsure, say N. config FB_W100 tristate "W100 frame buffer support" diff --git a/drivers/video/mbx/Makefile b/drivers/video/mbx/Makefile index ad042f5..16c1165 100644 --- a/drivers/video/mbx/Makefile +++ b/drivers/video/mbx/Makefile @@ -1,3 +1,4 @@ # Makefile for the 2700G controller driver. -obj-$(CONFIG_FB_MBX) += mbxfb.o +obj-$(CONFIG_FB_MBX) += mbxfb.o +obj-$(CONFIG_FB_MBX_DEBUG) += mbxfbdebugfs.o diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c index 7834586..a5836b5 100644 --- a/drivers/video/mbx/mbxfb.c +++ b/drivers/video/mbx/mbxfb.c @@ -14,22 +14,21 @@ * */ -#include -#include #include +#include #include +#include #include -#include