From patchwork Fri Apr 16 10:25:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raffaele Recalcati X-Patchwork-Id: 93097 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3GART8Q010233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Apr 2010 10:28:05 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3GAPrFL005130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Apr 2010 05:25:54 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o3GAPqWq019889; Fri, 16 Apr 2010 05:25:53 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DAE0C80627; Fri, 16 Apr 2010 05:25:51 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id CA85180626 for ; Fri, 16 Apr 2010 05:25:50 -0500 (CDT) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id o3GAPonq021192 for ; Fri, 16 Apr 2010 05:25:50 -0500 (CDT) Received: from psmtp.com (na3sys009amx172.postini.com [74.125.149.98]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id o3GAPnvv000572 for ; Fri, 16 Apr 2010 05:25:49 -0500 Received: from source ([209.85.218.217]) by na3sys009amx172.postini.com ([74.125.148.10]) with SMTP; Fri, 16 Apr 2010 05:25:49 CDT Received: by bwz9 with SMTP id 9so2402728bwz.29 for ; Fri, 16 Apr 2010 03:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=Sjy8jHzu/0Bd106FLHqHlKZUpThKHsMT73WywSILE/A=; b=b9eAsFC4D8yJWEqsSugnZghOSHsS/g+PloCescr0Nv0sqFChIq+QWTmgLXKlHGAt9F f2yqpEIF4jPu6lm0HzjKbS93E5LhRZiZf8AZMtWKziZf41YhngPAkLGJ1q5GYGl0gGPu DopjqNFrDMaMpLLdl+zuUAAxMBFgIkzztxZ7w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bWmdZz4AEgy7kDR5/Sr6AeybwjYopKLBepmqXaTFiqIj8szUw/7cNdhV5iwtp8eLSs ZTFaIWm9n/KgnMh1FP2bsLzE5TWhPhGVlzPbLz4LnmwAaHr6+nPcMgAqqLgDUNaJISpt orN9GKE1twqvxAY1qySLYKVuMWLWOLmzFk6EY= MIME-Version: 1.0 Received: by 10.204.126.34 with HTTP; Fri, 16 Apr 2010 03:25:47 -0700 (PDT) Date: Fri, 16 Apr 2010 12:25:47 +0200 Received: by 10.204.131.80 with SMTP id w16mr1625963bks.35.1271413547546; Fri, 16 Apr 2010 03:25:47 -0700 (PDT) Message-ID: Subject: dm365 - davincifb with rgb lcd From: Raffaele Recalcati To: davinci-linux-open-source X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S: 0.73673/99.85284 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 16 Apr 2010 10:28:06 +0000 (UTC) diff --git a/include/video/davincifb.h b/include/video/davincifb.h index 96b5c20..33a2b70 100644 --- a/include/video/davincifb.h +++ b/include/video/davincifb.h @@ -16,10 +16,16 @@ #include /* Base registers */ +#if 0 #define VPBE_REG_BASE 0x01c72780 #define VENC_REG_BASE 0x01c72400 #define OSD_REG_BASE 0x01c72600 #define OSD_REG_SIZE 0x00000180 +#endif + +#define VENC_REG_BASE 0x01C71E00 +#define OSD_REG_BASE 0x01C71C00 +#define OSD_REG_SIZE 0x00000100 /* VPBE Global Registers */ #define VPBE_PID (VPBE_BASE + 0x0) Then we have tried to add rgb support to davincifb.c. The kernel starts if you use video=davincifb:output=lcd:format=rgb:vid0=240x320@0,0:vid1=320x240@0 ,0:osd0=240x320@0,0 osd0_default_var contains the setting for our lcd, but we should pass these parameters from board file, but we don't know how to do it. diff --git a/drivers/video/davincifb.c b/drivers/video/davincifb.c index 1344be7..31dc147 100644 --- a/drivers/video/davincifb.c +++ b/drivers/video/davincifb.c @@ -171,14 +171,15 @@ static struct fb_var_screeninfo osd0_default_var = { .width = -1, .accel_flags = 0, .pixclock = LCD_PANEL_CLOCK, /* picoseconds */ - .left_margin = 40, /* pixclocks */ - .right_margin = 4, /* pixclocks */ - .upper_margin = 8, /* line clocks */ - .lower_margin = 2, /* line clocks */ - .hsync_len = 4, /* pixclocks */ - .vsync_len = 2, /* line clocks */ + .left_margin = 18, /* pixclocks */ + .right_margin = 12, /* pixclocks */ + .upper_margin = 20, /* line clocks */ + .lower_margin = 8, /* line clocks */ + .hsync_len = 1, /* pixclocks */ + .vsync_len = 1, /* line clocks */ .sync = 0, - .vmode = FB_VMODE_INTERLACED, +/* .vmode = FB_VMODE_INTERLACED,*/ + .vmode = FB_VMODE_NONINTERLACED, }; /* Using the full screen for OSD1 by default */ @@ -1394,6 +1395,52 @@ static void davincifb_pal_component_config(int on) } } +static void davincifb_lcd_rgb_config(int on) +{ + printk("%s %d\n", __func__, __LINE__); + if (on) { + /* Reset video encoder module */ + printk("%s %d\n", __func__, __LINE__); + printk("writing %X to register having address:%X\n", 0x25D3, VENC_VMOD); + dispc_reg_out(VENC_VMOD, 0x25D3); + + /* set hsync pulse width */ + dispc_reg_out(VENC_HSPLS, dm->osd1->info.var.hsync_len); + + /* set vsync pulse width */ + dispc_reg_out(VENC_VSPLS, dm->osd1->info.var.vsync_len); + + /* set horizontal interval */ + dispc_reg_out(VENC_HINT, dm->osd1->info.var.left_margin + dm->osd1->info.var.right_margin + dm->osd1- + + /* set horizontal data valid start position */ + dispc_reg_out(VENC_HSTART, dm->osd1->info.var.left_margin); + + /* set Horizontal data valid range */ + dispc_reg_out(VENC_HVALID, dm->osd1->info.var.width); + + /* set Vertical interval */ + dispc_reg_out(VENC_VINT, dm->osd1->info.var.upper_margin + dm->osd1->info.var.lower_margin + dm->osd1 + + /* set Vertical data valid start position */ + dispc_reg_out(VENC_HVALID, dm->osd1->info.var.upper_margin); + + /* set Horizontal data valid range */ + dispc_reg_out(VENC_VVALID, dm->osd1->info.var.height); +#if 0 + /* set Horizontal sync delay */ + dispc_reg_out(VENC_HVALID, dm->osd1->info.??); + + /* set vertical sync delay */ + dispc_reg_out(VENC_HVALID, dm->osd1->info.var.??); +#endif + } else { + /* Reset video encoder module */ + dispc_reg_out(VENC_VMOD, 0); + } +} +