Message ID | 20181113111633.20189-14-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB5HFVLPQKGQEXAA2MNY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id E0CE62E5422 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 13 Nov 2018 12:18:13 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id o28-v6sf6890341pfk.10 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 13 Nov 2018 03:18:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1542107892; cv=pass; d=google.com; s=arc-20160816; b=HcdEdame5yB0reVAvrtWxKI/3nDaA6pJqXH0xsAXdgGTJAj8EA+2OD3iQIl0FmFeSj ToB0po4yf+LtVIxA7T6WQmvgv5BFV/phSHS/BYyMwKwazePLhfTW82XRYBmvJ/gFZyPa E0x1bDgH65tuz+76i2Y72uc4Xms9AstDjPnBG+a0sZx3xUCIQ7wri8ct9iXxS6PyUmMw 8TRFETtSylbm873KBcr3645GscI14zZIEmylr0AN8NGAmDVuLrXXVlXO/PIjnYMeCyaG aJq3ZThfOxNO8r7Et6i+yX9+zsXTyq8EFyMnlfaw5wWmsZn6ymDfmvsVRl/LymmpPES7 VH+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=rOSCsq4LZGuwYvTDwK9y8IGURP/G9r2FFyCRxNlUxy4jvoFhGYtbo3K3IxKt4h1lb3 kzgSYjTQ0xsR7z1pXD4bITl0KEbVOmf2JHDAdtwndu+W1EhRPv2calYE2HOwOkhQkxxS l04PP+n1ioFIoEGpG5Ln7ZGn9/sWnmfqU9qhWEeu5TVS34Z0uMoV0Ip1VU5j2Jwmt2E5 JswWSmhYLyd/4GBMwiVqWTBq5EzYyZONI9CF53LeTC3NqKtlll0PQJsS4bmgz0/uUw8f yZ09KhwyNXv0uLeFULRMGMNfWIO6EpTnGDrQW3stHapQR/6eKaAyMqn0R1/fALOY/lI+ hwcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXQiTYVf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=UgAAvcORtxYw8TQmzr6klojeSK+Xx4zC1pe30yLs9ujcsiMgwVeYJ9srG6UCtjlVSZ LgcqsaRlyfdJl7mNHfXcg5/bTnt9TxRRRgvEITPoobB+A6daS236gCiet8Nm+Ru07YHK EF6fn4r39KM8KvTNaevP5NGQXVPs8s2kCAKEs= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=ArM7QsQdeqACxi6Hj2bXqP5PpqR3vda2EfWEHs161XaqpcNCegSbCJUNnv03eYRPVU NmWhyAGqSE2NVtga/xDOPuAxVRCLdbf3/t2LKhfeIlMFAjry6hhuC6LjqcRachT00Nde dgSedDictDN5lFU4E9b8aW4rbvRrv/BI7/1o9Y4jk7BxClpi/6uhqRqMOVkzWbqew3ZH xpXy11M0iuoSi6MKnjIUW2uJ/I6Wg5+dA5V3x/naIHrfI1FxH06aHV1KcM0ORGAPnv7O uxF716xE75efR9R4RSGbwBpRv9auI0oRvL3RJMnwo5cwaV+28XQYBhMvwSjL5WdVOA33 KlTA== X-Gm-Message-State: AGRZ1gJAy6c6JygSujYAOc1oGVs/pr6N7p55WE2UNtCi8Ygl1j1mi1Z9 kok/GVv889UDcvgUaepEy1tedvG4 X-Google-Smtp-Source: AJdET5cg/5Pm9OrM1/Zslx/5Gcs48WFFUSq4Te74ND2LdbKDoZjunkd2tguG+Fp05KF8pKMmaglRVA== X-Received: by 2002:a65:43c8:: with SMTP id n8-v6mr880189pgp.63.1542107892598; Tue, 13 Nov 2018 03:18:12 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:60c9:: with SMTP id r9-v6ls2781444pgv.12.gmail; Tue, 13 Nov 2018 03:18:12 -0800 (PST) X-Received: by 2002:a63:81c7:: with SMTP id t190mr4403963pgd.393.1542107892216; Tue, 13 Nov 2018 03:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542107892; cv=none; d=google.com; s=arc-20160816; b=RiUy6qo/W2+OQxm9i3hKJLFS4xafsWsL7O28aka2tXzJCEdlQvb53A/41zDOW9ffW0 GCLbyfPhQpaVD0w+lyu9tTYCHNxgzJjTT5wPJPrUfmI4hsbZRz1my9rdX/8n29Pu9jEb 7aP9TbrxY54vKluVYZzxq5oMs43BNN+SwQxSOE26Yf+pbFTr1gXA2ZFgqytFVq9JM6ny ZYpkLU9011jyD56AG8cSkArHbl4ILLn9pEpVcQgr87Yv7wzDIzA9EP7bsZEmAHS/Gm97 mc9E0CwrQssQ0C+s7lwzHhou8ZjHUuUvdLu9QB58J1gEHzvExzA85QnY/kFsi2ugS6bM RPWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jROG6UOjt8ak5A6N/TCD5RGHneXG5PcbkfCte5OCDJE=; b=zmKVdzhGVIet56zh4/ssA/4Fv6oKqitodsF1jQkf4qeAClbtaz3SuQL3JWDMSSwvLd Qv19b4stILHY84BKhs4sXZWCGWyU7THni5k7vJJk5RYHm9JBxh+plg0B/mAJHy4XSbrb dL6Hq3m2ZGybv8ZgQ7lLhqnENmnAWV90bTMfKfh9OIgjpQUGUcO2H7Ba71zavopl2YQD 72lg8cdKWnD2N2H1TgkM2G2IREXk7+TDUJR3t46VDKRbORDzooFLE7DN3E0OtYi1uVvv ye07IXiVFQIMA2lZfulP+1weEMuhEHU6Aj2OdHMEm27y00A2VxcX6dPCHDsKif0OByDg kXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXQiTYVf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i128sor17956319pgc.75.2018.11.13.03.18.12 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 13 Nov 2018 03:18:12 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: Jagan Teki <jagan@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 Content-Transfer-Encoding: 8bit X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXQiTYVf; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
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(-)