From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EC71FA373E for ; Tue, 1 Oct 2019 08:04:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEA352133F for ; Tue, 1 Oct 2019 08:04:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HcyctvsI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEA352133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=W8ONvUKroNBFuDsYY22vSc2PzfiSKjKcwvZFeIKVksA=; b=HcyctvsIcU4JN+ ZfEuODsE8iR6sAvD+PfQ6Jm1HTs2TZJ9g0jMANJX45oo4TFdSFUm5eKelboWWiEjj8U4HUKoIGsup otqZx9Aou/3dIusTqCfmAJ8uPYCvk8T/jSfwG78mZWWQtGgB7Wjvl1MbxePfXicSRjbXVpR8tlf7d 7gpl9bvEqruFo7eLaDQn689yLMmwS7Xx3aAMWGItTUGy9UyxjbY+O38BT/NacmnO01bwOqOq1klct cXOZFvU60UThOSVJatv3eQ/xwTkJhaguNXRZT7izRQJ6UQf8frS4czW2wo81kFKtUu0N4Bf0VKwc6 blfSu9jJ+jQqGuOmCLYQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFD9D-0004NA-PE; Tue, 01 Oct 2019 08:04:39 +0000 Received: from balrog.mythic-beasts.com ([2a00:1098:0:82:1000:0:2:1]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFD8p-0003pG-D3 for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2019 08:04:16 +0000 Received: from [199.195.250.187] (port=41686 helo=hermes.aosc.io) by balrog.mythic-beasts.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1iFD8k-0004bN-51; Tue, 01 Oct 2019 09:04:10 +0100 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 7F4E782AFC; Tue, 1 Oct 2019 08:03:58 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter Subject: [PATCH 2/3] drm/sun4i: dsi: fix DRQ calculation Date: Tue, 1 Oct 2019 16:02:52 +0800 Message-Id: <20191001080253.6135-3-icenowy@aosc.io> In-Reply-To: <20191001080253.6135-1-icenowy@aosc.io> References: <20191001080253.6135-1-icenowy@aosc.io> MIME-Version: 1.0 X-BlackCat-Spam-Score: 50 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191001_010415_451215_0FBD2FE8 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-sunxi@googlegroups.com, Icenowy Zheng , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org According to the BSP source code, when calculating the magic DRQ value outside burst mode, a formula of "lcd_ht - lcd_x - lcd_hbp", which is interpreted as right margin (HFP value). However, currently the sun6i_mipi_dsi driver code calculates it wrongly as HFP + sync length, which lead to timing error. Fix the DRQ calculation by change it to use HFP. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index c86e11631ebc..2d3e822a7739 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -436,9 +436,9 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, SUN6I_DSI_BURST_LINE_SYNC_POINT(SUN6I_DSI_SYNC_POINT)); val = SUN6I_DSI_TCON_DRQ_ENABLE_MODE; - } else if ((mode->hsync_end - mode->hdisplay) > 20) { + } else if ((mode->hsync_start - mode->hdisplay) > 20) { /* Maaaaaagic */ - u16 drq = (mode->hsync_end - mode->hdisplay) - 20; + u16 drq = (mode->hsync_start - mode->hdisplay) - 20; drq *= mipi_dsi_pixel_format_to_bpp(device->format); drq /= 32; -- 2.21.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel