Message ID | 20181113111633.20189-13-jagan@amarulasolutions.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 0CA581747 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF83329A6E for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:20:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E33C62A3BA; Tue, 13 Nov 2018 11:20:45 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C16229BBB for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:20:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KL1NalZ7Zf49pXQlCXQMazBMFDjFz+yMFoKXbMqgX58=; b=EVSS5+eweXXwZL Z4zll5n3UGq9CTQL9GjOkznqMLZ3qMB6NMYptUXdJG7m+NCsauCkjZG6K30QzshNLSIlTMmvKQY9I p3eAYG/J46CvYkaaKdwL056kDAY6omdDdk/ZSDN5eWekpPNIAi6zVUY3MXpKEIrYMVpsvcWHrz3v/ NJSK6/2XN5zKtAU8PQGlXh6uiKlXeidiiD9sMtEbTT/L7k018xsuUkIJBtCeHk1nD88Yh1rttVcAm VXPeD27IARTixsIz6GeY2ZsoqBeUV5r/Cw0l8JOAtVq5b5WIyjTxN9z3ojbH0lGEfqRJ76JPg1mBW mAouc5d/Mk9ywNKCsBXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWkB-00037R-Tm; Tue, 13 Nov 2018 11:20:31 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWi0-0008KQ-IZ for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 11:18:22 +0000 Received: by mail-pg1-x542.google.com with SMTP id w7so5527948pgp.13 for <linux-arm-kernel@lists.infradead.org>; Tue, 13 Nov 2018 03:18:06 -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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=p3/0IBrO812eKj1R1+fv7pTnJ5BlZsDSp3Xty76yodWhSf0zNNIQV+aDpour9/S3v7 9Qh6ZwMkJik2siXMG4cUAylUmhjTkhqyLeY672rnkpg+oAW1yGakWzKkXNFgHothM/1x wqrFxa411CYZ3o9kpg8/G5QUQU66tWjK+kBHU= 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=WXeHiI0jTSc5wEU3J9SBtYcSgw6GuTxHUVUlo5pmyKk=; b=Evaxuylt6t1CxkhSqUSelunMxHG6zCoYAKo4f1sP0deCxtqUjPXfF9GvYCgMhc7617 WWhrNDrZTy5ztTP+wOMg+p83s/PhztqVUXBNEWdqEdgKcXsYqG3TksuHGdxExYcjgWvG MmfAjWAGNxpnEtwQ6f5pDzAmWmYv3OkY+oUFm//H59q5eVFYxr90mcAKkHpYptvBrHz8 fXfhcIPBQ7Abu7Ky8zNLvZ/wJagdumRljJJY5q26wLm8+/Z9uYNeT4uA+Y9Nl13yzVip F2uxtryo03MMpRiBFjC4DKJxcHkUHu6vQsKfh7kYxxIblX+My0CTA0wGlihXYLLFgAta hUpA== X-Gm-Message-State: AGRZ1gIhg1y/zAGuadXTMTP0AU0DWK8RLVsJVzy5nwscFBEdMLJWfnMk z9i2sOJOkNK0mYzYwbhCLFesHQ== X-Google-Smtp-Source: AJdET5c5J5NcWM8pvY3YVB3gvLvx89Fw9LaZuo1pOtIkrkPRqUrf2SwgVQFH5WMzc/bki2dUopOW+w== X-Received: by 2002:a63:a16:: with SMTP id 22mr4382852pgk.318.1542107885602; Tue, 13 Nov 2018 03:18:05 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:05 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>, Icenowy Zheng <icenowy@aosc.io>, Jernej Skrabec <jernej.skrabec@siol.net>, Vasily Khoruzhick <anarsoul@gmail.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, linux-clk@vger.kernel.org, Michael Trimarchi <michael@amarulasolutions.com>, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Subject: [PATCH v4 12/26] drm/sun4i: sun6i_mipi_dsi: Fix DSI hblk timing calculation Date: Tue, 13 Nov 2018 16:46:19 +0530 Message-Id: <20181113111633.20189-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_031816_626249_AB416CB3 X-CRM114-Status: GOOD ( 17.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jagan Teki <jagan@amarulasolutions.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 de0992052a90..cd657ac4bdae 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(-)