From patchwork Mon Aug 6 12:56:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pieterg@gmx.com X-Patchwork-Id: 1278871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 960C2DF288 for ; Mon, 6 Aug 2012 12:59:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SyMrG-0006sh-NU; Mon, 06 Aug 2012 12:56:30 +0000 Received: from smtp-1.concepts.nl ([2001:838:2:1::30:124]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SyMrD-0006sO-TC for linux-arm-kernel@lists.infradead.org; Mon, 06 Aug 2012 12:56:28 +0000 Received: from c3404277.ftth.concepts.nl ([195.64.66.119] helo=mx1.grimmerink.nl) by smtp-1.concepts.nl with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SyMrC-0000RA-NG; Mon, 06 Aug 2012 14:56:26 +0200 Received: from laptoppieter.wielewaal (laptoppieter.wielewaal [10.9.0.58]) by mx1.grimmerink.nl (Postfix) with ESMTP id 60BDA6A0C7; Mon, 6 Aug 2012 14:56:21 +0200 (CEST) From: pieterg@gmx.com To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] pxafb: allow zero for smart panel timings Date: Mon, 6 Aug 2012 14:56:18 +0200 Message-Id: <1344257778-25737-1-git-send-email-pieterg@gmx.com> X-Mailer: git-send-email 1.7.9.5 X-Concepts-MailScanner-Information: Please contact abuse@concepts.nl for more information X-Concepts-MailScanner-ID: 1SyMrC-0000RA-NG X-Concepts-MailScanner: Found to be clean X-Concepts-MailScanner-SpamCheck: X-Concepts-MailScanner-From: pieterg@gmx.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pieterg[at]gmx.com) 0.0 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=pieterg%40gmx.com; ip=2001%3A838%3A2%3A1%3A%3A30%3A124; r=merlin.infradead.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Pieter Grimmerink X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Pieter Grimmerink The LCCR1[BLW] description states: "For LCD panels with an internal frame buffer, BLW specifies the pulse width of the Write or Read signal (...) which is equal to (BLW+1)*LCD_CLK_PERIOD" And the LCD Smart Panel Timing Specifications states: "L_PCLK_WR pulse width duration: Min: 1 Typical: LCCR1[BLW] + 1 Max: 256 Units: LCLK" The BLW field has a value range of 0 to 255, resulting in a write or read pulse width range of 1*LCD_CLK_PERIOD..256*LCD_CLK_PERIOD So LCCR1[BLW] = 0 is a valid configuration. The same is the case for LCCR1[ELW] and LCCR3[PCD], the other two smart panel timing values. --- drivers/video/pxafb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 04c395a..7ea5e23 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c @@ -1223,8 +1223,7 @@ int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds) static unsigned int __smart_timing(unsigned time_ns, unsigned long lcd_clk) { - unsigned int t = (time_ns * (lcd_clk / 1000000) / 1000); - return (t == 0) ? 1 : t; + return time_ns * (lcd_clk / 1000000) / 1000; } static void setup_smart_timing(struct pxafb_info *fbi,