Message ID | 20181210161729.29720-10-jagan@amarulasolutions.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show
Return-Path: <linux-clk-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 333BD1759 for <patchwork-linux-clk@patchwork.kernel.org>; Mon, 10 Dec 2018 16:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22EE229DC8 for <patchwork-linux-clk@patchwork.kernel.org>; Mon, 10 Dec 2018 16:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 146542A058; Mon, 10 Dec 2018 16:18:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B14D429DC8 for <patchwork-linux-clk@patchwork.kernel.org>; Mon, 10 Dec 2018 16:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728603AbeLJQSC (ORCPT <rfc822;patchwork-linux-clk@patchwork.kernel.org>); Mon, 10 Dec 2018 11:18:02 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34931 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728593AbeLJQSB (ORCPT <rfc822;linux-clk@vger.kernel.org>); Mon, 10 Dec 2018 11:18:01 -0500 Received: by mail-wm1-f68.google.com with SMTP id c126so11858577wmh.0 for <linux-clk@vger.kernel.org>; Mon, 10 Dec 2018 08:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=Fby41GOV+1hziXy0cQmlduCVcOA7fyZ3cELSFpSyPAoOMg4bvRyz4+y4SEGMpt/ahS P6pZciUC8YqcGoUEFQ5MtL/+lmadFyOH56ST2kSp+/v2WQVdtgtFaYeUgoK2+LAS+rZI 6NAxz1mjg5GSwnzbWzWJq2TwJEuQq7P67LSbE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oiAA/cUEr092LynkAnVQtsmpFwj1u/ZrP8Y7/2WzfF0=; b=MVaCOAuRObKIj/Tjna72outQEmZKEQQoSvwNVhiaXqU8PC72BEP96GmwvTUWE1QXjr FefRamQzwY5tQ2zimh1mmVk0CJVHFNZJpGrltI9WPLDjWasj5daEVw7pPmlCPDM1i34e X/oQZ9k9iwYkDx6IGst0BdhcJrWpFBPkqi7/oqLUvKELIKdVplMo+qfSF2AcxxqVg887 dqqWzR+mZRzMKZ5BxSt7IngxeU3for92IF8BAcMeUfiXI1O2A0kGaoun0hQeI9G3lqdf y23psnmi6PeequZzhMsTwZ4eLiRvRQV0QyGbImR7uaa+olSLrT62ZSXnTB5CYPCiwQ3e F1kw== X-Gm-Message-State: AA+aEWaF8F17xe+9VhdvkfplWOyerj/mOwdjJKBoQTkvQGL0nUFgRRjy FHzwoaCtxJAoZ6NIK4JaFEJd0A== X-Google-Smtp-Source: AFSGD/XfvcRdGmj8WQOq1Wc7vWq4fKFJIXF0ufvWTlz2ZYxpONPT8VIJ6rZZCNnXhKal0kD3+aipNw== X-Received: by 2002:a1c:de57:: with SMTP id v84mr10923097wmg.55.1544458679797; Mon, 10 Dec 2018 08:17:59 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:58 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi <michael@amarulasolutions.com>, linux-sunxi <linux-sunxi@googlegroups.com>, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v5 09/17] drm/sun4i: sun6i_mipi_dsi: Fix DSI hblk timing calculation Date: Mon, 10 Dec 2018 21:47:21 +0530 Message-Id: <20181210161729.29720-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: <linux-clk.vger.kernel.org> X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/sun4i: Allwinner A64 MIPI-DSI support
|
expand
|
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 81151d7633f9..4c95b3384ed9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -495,7 +495,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* * hblk seems to be the line + porches length. */ - hblk = mode->htotal * Bpp - hsa; + hblk = (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp; /* * And I'm not entirely sure what vblk is about. The driver in
hblk is adding line with all porch timing values, or timings values from htotal without sync time. Current driver is subtracting htotal with hsa, but the hsa is bounded with packet overhead. For real hblk calculation needed by subtracting htotal with back and front porch values and BSP code BPI-M64-bsp is eventually following the same. BPI-M64-bsp is computing hbp as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hblk = (ht-hspw)*dsi_pixel_bits[format]/8-(4+4+2); => (timmings->hor_total_time - timmings->hor_sync_time) => (mode->htotal - (mode->hsync_end - mode->hsync_start)) So, update the DSI hblk timing accordingly. Tested on 2-lane, 4-lane MIPI-DSI LCD panels. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)