Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7992401ybn; Tue, 1 Oct 2019 01:11:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRPiwW5p2KkxjhuNxwLtSdOQ/Muh7xvqQBMF5p/2wKmlOefRB9HrXsskzXwftIzAKanIaZ X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr24450470edu.70.1569917501556; Tue, 01 Oct 2019 01:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569917501; cv=none; d=google.com; s=arc-20160816; b=bWzGgyaPP2tbHYtMDC6IyHmGnJ6F32ZG6m59holOl1MTRUDw4eVS7uoVn8zZVhOiV3 8HIPDi6ZYF33gP1Ke42pRPHyR5EyFe94VA4aZFfWgygk8A5RWrCj5N4Fo1PODhLdULrM FUSDe7A8HQnrEOTZuLz1/4CnNYQkmIB0kUpipd6AadFJosGzrRAuZj9l6uhcUukpeWWk rsO9jAd1m8zq2ttattAZUaLlGFPhf2/dOhJ+mH7x9w/9omGX023NwXL77ZXAu8eDMDjT /dIskbEueRMqUOs0qwgmEzIYCkVnQWLpWlQTvEZGZfYgxZp66hRkpylZOgyMEqQkXUx2 +fDQ== 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=mEodf64tBZi7LeK3b//3TUhUTWH1ECICJj1EffRNlSg=; b=OH/GbdZNl1VINzPNGR4jrI/Hxkx+BYW8EAVXambMoSwdErHIzQNWfk55lv6tSC8kbG 0GTj2wIL6llYj9iRsw0tAKr017PbRWsqE47Tta1+JkllqDzO993T/or5jjuxBxfhhD1S g0/52RhzKWbkHFgg9Hi/oS82/eK3nCT64MGng+UVV1iVOPolSyqT/bOR3jwZtcCY7aBg IoLvQicWs5S1AOzO4lMx1N37pn7JtcU9Q4H3LuXcz/Z64ceLLOk53ukfAaurAhpN8ReM as0UAalgpS1Id72Am+wcR/24n+ByadW+pkC0dOh8qxFrnZ+f9nW1lXwYQPXAR64zISu4 RHeQ== 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 g21si8585734edq.289.2019.10.01.01.11.17; Tue, 01 Oct 2019 01:11:41 -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 S1732937AbfJAILH (ORCPT + 99 others); Tue, 1 Oct 2019 04:11:07 -0400 Received: from hermes.aosc.io ([199.195.250.187]:51106 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727361AbfJAILG (ORCPT ); Tue, 1 Oct 2019 04:11:06 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id B47AA82889; Tue, 1 Oct 2019 08:03:52 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai , 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 1/3] Revert "drm/sun4i: dsi: Change the start delay calculation" Date: Tue, 1 Oct 2019 16:02:51 +0800 Message-Id: <20191001080253.6135-2-icenowy@aosc.io> In-Reply-To: <20191001080253.6135-1-icenowy@aosc.io> References: <20191001080253.6135-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 This reverts commit da676c6aa6413d59ab0a80c97bbc273025e640b2. The original commit adds a start parameter to the calculation of the start delay according to some old BSP versions from Allwinner. However, there're two ways to add this delay -- add it in DSI controller or add it in the TCON. Add it in both controllers won't work. The code before this commit is picked from new versions of BSP kernel, which has a comment for the 1 that says "put start_delay to tcon". By checking the sun4i_tcon0_mode_set_cpu() in sun4i_tcon driver, it has already added this delay, so we shouldn't repeat to add the delay in DSI controller, otherwise the timing won't match. Signed-off-by: Icenowy Zheng --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 1636344ba9ec..c86e11631ebc 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -365,8 +365,7 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi, static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { - u16 start = clamp(mode->vtotal - mode->vdisplay - 10, 8, 100); - u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; + u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + 1; if (delay > mode->vtotal) delay = delay % mode->vtotal; -- 2.21.0