From patchwork Thu May 19 05:31:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Scheurer, Amber" X-Patchwork-Id: 796222 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4J5VhrF006309 for ; Thu, 19 May 2011 05:31:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754834Ab1ESFbm (ORCPT ); Thu, 19 May 2011 01:31:42 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44548 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754384Ab1ESFbl (ORCPT ); Thu, 19 May 2011 01:31:41 -0400 Received: from dlep26.itg.ti.com ([157.170.170.121]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4J5Vf1Z005014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 00:31:41 -0500 Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4J5VfQC001950; Thu, 19 May 2011 00:31:41 -0500 (CDT) Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Thu, 19 May 2011 00:31:40 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id p4J5Ve6e029252; Thu, 19 May 2011 00:31:41 -0500 Received: from localhost (a0393674u.apr.dhcp.ti.com [172.24.137.179]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p4J5Vdf27980; Thu, 19 May 2011 00:31:39 -0500 (CDT) From: Amber Jain To: CC: , , Amber Jain Subject: [PATCH 2/5] OMAP: DSS2: configuring non-zero values for fir_hinc/fir_vinc Date: Thu, 19 May 2011 11:01:27 +0530 Message-ID: <1305783090-21214-3-git-send-email-amber@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305783090-21214-1-git-send-email-amber@ti.com> References: <1305783090-21214-1-git-send-email-amber@ti.com> MIME-Version: 1.0 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.6 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 05:31:43 +0000 (UTC) fir_hinc and fir_vinc can only have a non-zero value as per TRM. Hence removed the if...else condition and also made the necesary changes caused as the result of the condition removal. Signed-off-by: Amber Jain --- drivers/video/omap2/dss/dispc.c | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index e680528..92169bb 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -1128,15 +1128,8 @@ static void _dispc_set_scaling(enum omap_plane plane, _dispc_set_scale_coef(plane, hscaleup, vscaleup, five_taps); - if (!orig_width || orig_width == out_width) - fir_hinc = 0; - else - fir_hinc = 1024 * orig_width / out_width; - - if (!orig_height || orig_height == out_height) - fir_vinc = 0; - else - fir_vinc = 1024 * orig_height / out_height; + fir_hinc = 1024 * orig_width / out_width; + fir_vinc = 1024 * orig_height / out_height; _dispc_set_fir(plane, fir_hinc, fir_vinc); @@ -1144,8 +1137,8 @@ static void _dispc_set_scaling(enum omap_plane plane, /* RESIZEENABLE and VERTICALTAPS */ l &= ~((0x3 << 5) | (0x1 << 21)); - l |= fir_hinc ? (1 << 5) : 0; - l |= fir_vinc ? (1 << 6) : 0; + l |= (orig_width != out_width) ? (1 << 5) : 0; + l |= (orig_height != out_height) ? (1 << 6) : 0; l |= five_taps ? (1 << 21) : 0; /* VRESIZECONF and HRESIZECONF */