Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3308975ybp; Sun, 6 Oct 2019 09:07:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzahBVRa948o57jKVa9/1bzPat+lUvG9Zbqz5k3Dy/SzPD2caD0Fy7xlEJ/zpkrC0OTNTDP X-Received: by 2002:a17:906:d185:: with SMTP id c5mr20022774ejz.139.1570378079065; Sun, 06 Oct 2019 09:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570378079; cv=none; d=google.com; s=arc-20160816; b=kmL7lstuvNE+gs5dwjzOPFujTGjKBg1yt1Z6AkwGwuHIBR5AzMPLIFINZlkELx0JPf bqD5QrUKrlrBtkewrDH5xvzlfFhDhUjZDDkSUcpKVSNgbHeFEDV09nDHNci6S3L/hHZ6 CGUzcUlW/UcpJTbZJiFy1g4y/Z454G4/7VkF3NVwsHhy3hNmR4xFg+kjagZnh1cvsNcw DeZtdXS9Ko96J+EgvIBsTCmISV7XaWO96HJzFvV3jfLE2lfp+X2VbWCiUuC5dApGBVeT I6tFn1KyCGjTFeu62O4XplRm/rMVDfBeUysN742saBjZKiR0mfajupO02hZQA+MLzNMV OipQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VDFpWlEp6gI/ICwrtLwlKT330wW3yWa9mS9wSQJGFDw=; b=afrLnX99vv3iICZ77fhzsCWtsyTUtuS9VdHFxS7xq+H4ua6izOEKUsopmpodgPMgTi D27xWgW2T+Hh/lXk69A14hPG/7GdLr5sWsmck/w/iN/6gaXt06BVtfG4pO/p7W+qRLlL U4iIxV039o1W3qrozTyrUpJ66/iKugj0YA/O9vF+TJUkbTqmR5myDEWTyYKfhAFGVL3N Gi/SiyLuZ8Z8BS/8Lmr8pnXcIK8kjrN2rc58MppuSQA6Gxezh4fIhSleQVJhv7ox2y1A z6uBV/VpgwEzhX4xqgktknxXW6130stgZ26JWAXrf1nU7k02xvdbvZxUhh0BQURER3Am S76Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y28si7335097edb.162.2019.10.06.09.07.35; Sun, 06 Oct 2019 09:07:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbfJFQEi (ORCPT + 99 others); Sun, 6 Oct 2019 12:04:38 -0400 Received: from hermes.aosc.io ([199.195.250.187]:47383 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbfJFQEi (ORCPT ); Sun, 6 Oct 2019 12:04:38 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 44C978289D; Sun, 6 Oct 2019 16:04:33 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , Jagan Teki , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH v2 2/3] drm/sun4i: dsi: fix the overhead of the horizontal front porch Date: Mon, 7 Oct 2019 00:03:01 +0800 Message-Id: <20191006160303.24413-3-icenowy@aosc.io> In-Reply-To: <20191006160303.24413-1-icenowy@aosc.io> References: <20191006160303.24413-1-icenowy@aosc.io> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The formula in the BSP kernel indicates that a 16-byte overhead is used when sending the HFP. However, this value is currently set to 6 in the sun6i_mipi_dsi driver, which makes some panels flashing. Fix this overhead value. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index b8a0d0501ca7..8fe8051c34e6 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -569,11 +569,12 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); /* - * The frontporch is set using a blanking packet (4 - * bytes + payload + 2 bytes). Its minimal size is - * therefore 6 bytes + * The frontporch is set using a sync event (4 bytes) + * and two blanking packets (each one is 4 bytes + + * payload + 2 bytes). Its minimal size is therefore + * 16 bytes */ -#define HFP_PACKET_OVERHEAD 6 +#define HFP_PACKET_OVERHEAD 16 hfp = max((unsigned int)HFP_PACKET_OVERHEAD, (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD); -- 2.21.0