From patchwork Wed Mar 17 22:46:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ville.syrjala@nokia.com X-Patchwork-Id: 86567 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2HMkmeq022406 for ; Wed, 17 Mar 2010 22:46:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756241Ab0CQWqs (ORCPT ); Wed, 17 Mar 2010 18:46:48 -0400 Received: from smtp.nokia.com ([192.100.122.233]:28627 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756226Ab0CQWqq (ORCPT ); Wed, 17 Mar 2010 18:46:46 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2HMk6NV030520; Thu, 18 Mar 2010 00:46:43 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Mar 2010 00:46:42 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Mar 2010 00:46:41 +0200 Received: from stinkpad (esdhcp04093.research.nokia.com [172.21.40.93]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with SMTP id o2HMkYTG011230; Thu, 18 Mar 2010 00:46:35 +0200 Received: by stinkpad (sSMTP sendmail emulation); Thu, 18 Mar 2010 00:46:34 +0200 From: ville.syrjala@nokia.com To: "Tomi Valkeinen" Cc: "Imre Deak" , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Subject: [PATCH v4 2/8] DSS2: OMAPFB: Check var even if there isn't memory Date: Thu, 18 Mar 2010 00:46:17 +0200 Message-Id: <1268865983-16270-3-git-send-email-ville.syrjala@nokia.com> X-Mailer: git-send-email 1.6.4.4 In-Reply-To: <1268865983-16270-1-git-send-email-ville.syrjala@nokia.com> References: <1268865983-16270-1-git-send-email-ville.syrjala@nokia.com> MIME-Version: 1.0 X-OriginalArrivalTime: 17 Mar 2010 22:46:41.0493 (UTC) FILETIME=[B61C1850:01CAC623] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Mar 2010 22:46:49 +0000 (UTC) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index ea619a9..7351e96 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -667,9 +667,6 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var) DBG("check_fb_var %d\n", ofbi->id); - if (ofbi->region.size == 0) - return 0; - r = fb_mode_to_dss_mode(var, &mode); if (r) { DBG("cannot convert var to omap dss mode\n"); @@ -689,7 +686,8 @@ int check_fb_var(struct fb_info *fbi, struct fb_var_screeninfo *var) if (check_fb_res_bounds(var)) return -EINVAL; - if (check_fb_size(ofbi, var)) + /* When no memory is allocated ignore the size check */ + if (ofbi->region.size != 0 && check_fb_size(ofbi, var)) return -EINVAL; if (var->xres + var->xoffset > var->xres_virtual) @@ -893,8 +891,9 @@ static int omapfb_setup_overlay(struct fb_info *fbi, struct omap_overlay *ovl, yres = var->yres; } - omapfb_calc_addr(ofbi, var, fix, rotation, - &data_start_p, &data_start_v); + if (ofbi->region.size) + omapfb_calc_addr(ofbi, var, fix, rotation, + &data_start_p, &data_start_v); r = fb_mode_to_dss_mode(var, &mode); if (r) {