From patchwork Tue May 18 12:56:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Chanteperdrix X-Patchwork-Id: 100479 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4ICwLGc009632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 May 2010 12:58:56 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4ICuad0032430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 May 2010 07:56:36 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o4ICuauc015936; Tue, 18 May 2010 07:56:36 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id EE7CC8062C; Tue, 18 May 2010 07:56:35 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id F40E480627 for ; Tue, 18 May 2010 07:56:30 -0500 (CDT) Received: from red.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id o4ICuUG5028323 for ; Tue, 18 May 2010 07:56:30 -0500 (CDT) Received: from psmtp.com (na3sys009amx255.postini.com [74.125.149.139]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id o4ICuTk6006181 for ; Tue, 18 May 2010 07:56:30 -0500 Received: from source ([91.121.30.210]) by na3sys009amx255.postini.com ([74.125.148.10]) with SMTP; Tue, 18 May 2010 12:56:30 GMT Received: (qmail 12479 invoked by uid 503); 18 May 2010 13:00:26 -0000 Received: from b6.ovh.net (HELO mail627.ha.ovh.net) (213.186.33.56) by 27.mail-out.ovh.net with SMTP; 18 May 2010 13:00:26 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 18 May 2010 12:56:28 -0000 Received: from lmontsouris-152-61-13-23.w80-13.abo.wanadoo.fr (HELO gaia) (80.13.140.23) by ns0.ovh.net with SMTP; 18 May 2010 12:56:26 -0000 Received: from gch by gaia with local (Exim 4.69) (envelope-from ) id 1OEMLS-0002rR-0q; Tue, 18 May 2010 14:56:26 +0200 From: Gilles Chanteperdrix To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 3/4] davinci: Allow the OSD framebuffers to be disabled on the kernel command line. Date: Tue, 18 May 2010 14:56:24 +0200 Message-Id: <1274187385-10969-3-git-send-email-gilles.chanteperdrix@nexvision.fr> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1274187385-10969-2-git-send-email-gilles.chanteperdrix@nexvision.fr> References: <4BF28E20.3070701@nexvision.fr> <1274187385-10969-1-git-send-email-gilles.chanteperdrix@nexvision.fr> <1274187385-10969-2-git-send-email-gilles.chanteperdrix@nexvision.fr> X-Ovh-Tracer-Id: 10266518302631787305 X-Ovh-Remote: 80.13.140.23 (lmontsouris-152-61-13-23.w80-13.abo.wanadoo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:68.89437/99.90000 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: , MIME-Version: 1.0 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]); Tue, 18 May 2010 12:58:57 +0000 (UTC) diff --git a/drivers/video/davincifb.c b/drivers/video/davincifb.c index ccb27d7..01e5220 100644 --- a/drivers/video/davincifb.c +++ b/drivers/video/davincifb.c @@ -1485,7 +1485,7 @@ davincifb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) struct fb_videomode *mode = &win->dm->mode; struct davinci_layer_config lconfig; struct fb_fix_screeninfo fix; - + /* * Get an updated copy of the video mode from the encoder manager, just * in case the display has been switched. @@ -1562,7 +1562,7 @@ davincifb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) return -EINVAL; if (lconfig.xpos != win->xpos || lconfig.ypos != win->ypos) return -EINVAL; - + /* * At this point we have accepted the var, so now we convert our layer * configuration struct back to the var in order to make all of the @@ -2192,8 +2192,8 @@ static void parse_win_params(struct vpbe_dm_win_info *win, * Pass boot-time options by adding the following string to the boot params: * video=davincifb:options * Valid options: - * osd0=[MxNxP,S@X,Y] - * osd1=[MxNxP,S@X,Y] + * osd0=[off|MxNxP,S@X,Y] + * osd1=[off|MxNxP,S@X,Y] * vid0=[off|MxNxP,S@X,Y] * vid1=[off|MxNxP,S@X,Y] * MxN are the horizontal and vertical window size @@ -2201,8 +2201,8 @@ static void parse_win_params(struct vpbe_dm_win_info *win, * S is the framebuffer size with a size suffix such as 'K' or 'M' * X,Y are the window position * - * Only video windows can be turned off. Turning off a video window means that - * no framebuffer device will be registered for it, + * Turning off a video window means that no framebuffer device will be + * registered for it, * * To cause a window to be supported by the framebuffer driver but not displayed * initially, pass a value of 0 for the window size. @@ -2310,13 +2310,14 @@ static int davincifb_probe(struct device *dev) dm->win[WIN_OSD0].layer = WIN_OSD0; dm->win[WIN_OSD0].dm = dm; dm->win[WIN_OSD0].sdram_address = 0; - davincifb_get_default_win_config(dev, &dm->win[WIN_OSD0], &lconfig, - &fb_size, options); - err = - davincifb_init_window(dev, &dm->win[WIN_OSD0], &lconfig, fb_size, - OSD0_FBNAME); - if (err) - goto osd0_out; + if (!davincifb_get_default_win_config + (dev, &dm->win[WIN_OSD0], &lconfig, &fb_size, options)) { + err = + davincifb_init_window(dev, &dm->win[WIN_OSD0], &lconfig, + fb_size, OSD0_FBNAME); + if (err) + goto osd0_out; + } /* initialize VID0 */ dm->win[WIN_VID0].layer = WIN_VID0; @@ -2335,13 +2336,14 @@ static int davincifb_probe(struct device *dev) dm->win[WIN_OSD1].layer = WIN_OSD1; dm->win[WIN_OSD1].dm = dm; dm->win[WIN_OSD1].sdram_address = 0; - davincifb_get_default_win_config(dev, &dm->win[WIN_OSD1], &lconfig, - &fb_size, options); - err = - davincifb_init_window(dev, &dm->win[WIN_OSD1], &lconfig, fb_size, - OSD1_FBNAME); - if (err) - goto osd1_out; + if (!davincifb_get_default_win_config + (dev, &dm->win[WIN_OSD1], &lconfig, &fb_size, options)) { + err = + davincifb_init_window(dev, &dm->win[WIN_OSD1], &lconfig, + fb_size, OSD1_FBNAME); + if (err) + goto osd1_out; + } /* initialize VID1 */ dm->win[WIN_VID1].layer = WIN_VID1;