Message ID | 20181113111633.20189-14-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 18F16139B for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:34:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 045A829C09 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:34:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA03929C1A; Tue, 13 Nov 2018 11:34:28 +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 0FEA529C09 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 13 Nov 2018 11:34:28 +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=aNB/RjUkWQuMnp9T8Mqhnilip+c8pOKzsgqw/m+5Olg=; b=ORopAyB82mJGF3 CyRfXQUlY8n4bgUBcQkfaQiwQrszapjKAsaPUTCZr+yrBmlkypnbb75FLMV6yXkQ9F2aAau3+vG9r Q7kFmTshIocx/JlWUQdGGF/9/rZ77fSXcWorVhzqNU9g8JyWRv0nU2p4JD0hgfjwYn9raBA5OdD2H ZOZRAi1twytg+N2l/kCxOYMgog2aPsd2jAV+7rjHjkSAx8qjyGf6pk9Y6MMS9erUqqA0HXsjPmejP JHBrKBGU11KHhUTYj2rCdRkvF54xbPFHTDFUJec84cUJLikluKOsOKuFfEUstUO545uy/ZuUXBGyB rRk/sMgDGa15UfuZ43fQ==; 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 1gMWxO-0002C0-Ou; Tue, 13 Nov 2018 11:34:10 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWxN-0001A1-BA for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 11:34:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=MMx0FTwYpW9tEA/AOtmxVmLfZq QM1yApcizb6KddM8Mpzx+d+AfHZF2GMzOr0qb+iNCI1UK0Kz68dJ6LNvXuUQzXD+dYHq+YBUHMYBr ewIObs2NiCMVoPtA9nkBw6cVdVt/sqFFAROvJZNNCeCBPV3H10ZmL9QSYpRWPYvqhp0fvQKlhJrmU xNZv9GTol7d8i8dk+0Nyep8tK7iD0fRqxDNIbXGmNLVeZW5diVg/VcCKj+cCPa509eyhu8sZd99+X P+yxbGHC++cBNy49cMK8ammgRdgEzUlkF755OqL0aYWy0a6aPriA+sx52QOrMVLeyALcvZWaaV9YB AhLTHFBg==; Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWi7-00086z-Iv for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 11:18:25 +0000 Received: by mail-pg1-x542.google.com with SMTP id n10-v6so5532762pgv.10 for <linux-arm-kernel@lists.infradead.org>; Tue, 13 Nov 2018 03:18:13 -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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=LXQiTYVflyPz68NqHSTd3wz5D2x5gI+3PhqcDra3MGw0DkT17UbvZrk66pViGfiC9B GOMWxPd5ePBUmoH7U/lUANgAJS8we+wBGRDq24WwRJ6Tb9T1mrh8CYvuKwLqKYv4Zu+3 1S6P61wATkhCiHeoM5CrBF9FLYmmGkAz1azN4= 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=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=d2wNl2HBc4/iI+iRl9WViftAhJRASqFT7DvksI3YED49Ms82OGrYvdzNIcde+n7S9r xWosuTFpcPGOLQg8ZQkqS5hVFSGTKehltCmNX9YA4lNDQUjPGsXX1pS6W8iMg6g+sTxv DmfAFS7xJencu1BwGsDeAgetaJj5AP6RvF7OiH9NrOsD8ldW7EGFWcfchyCsH5tQKCoq lZQSQZd1hwU1wWbeXNVU0VuxGYJkwMwd+UCuYo64/ExbNrG51zPK/1s5f72oNZsdvW4w s5UDo91KFi9sxaiZsgXFIVCymjmxo0966m26Taq8/PaMCI4Di0/9XFXTEIBvOKJOrINj Ul1g== X-Gm-Message-State: AGRZ1gLluGz04+f13EZSlik7jUCqHPfZWWZam59/A8apMEXMs6Wbi13Y Z78LuscN5yf5muE+yKnL89/0Fg== X-Google-Smtp-Source: AJdET5cb91fcvQbuJw5ySdoTmKHQBJBviUFXEGQXSzMxixvPh+JbeJWx95n0XPVVqY9oH1endkKtgg== X-Received: by 2002:a62:9f42:: with SMTP id g63-v6mr4693848pfe.144.1542107891914; Tue, 13 Nov 2018 03:18:11 -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.18.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:18:11 -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 13/26] drm/sun4i: sun6i_mipi_dsi: Add DSI hblk packet overhead Date: Tue, 13 Nov 2018 16:46:20 +0530 Message-Id: <20181113111633.20189-14-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_111823_611363_AC56ADAC X-CRM114-Status: GOOD ( 18.48 ) 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 cd657ac4bdae..1a3cdd5b72a0 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -494,8 +494,13 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* * hblk seems to be the line + porches length. + * The blank is set using a blanking packet (4 bytes + 4 bytes + + * payload + 2 bytes). So minimal size is 10 bytes */ - hblk = (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp; +#define HBLK_PACKET_OVERHEAD 10 + hblk = max((unsigned int)HBLK_PACKET_OVERHEAD, + (mode->htotal - (mode->hsync_end - mode->hsync_start)) * + Bpp - HBLK_PACKET_OVERHEAD); /* * And I'm not entirely sure what vblk is about. The driver in
Add 10 bytes packet overhead for hblk where blank is set using a blanking packet like (4 bytes + 4 bytes + payload + 2 bytes) This is according to BSP code from BPI-M64-bsp (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); So, add 10 bytes packet overhead for DSI hblk. 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)