Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp769233ybl; Wed, 11 Dec 2019 07:15:14 -0800 (PST) X-Google-Smtp-Source: APXvYqylvOW+QI657ftoO+GYb5uTcrm0kxaJMHN8H573FnASsl4xZYDCkAbtXoWbaW3kxd+J40L6 X-Received: by 2002:a9d:6f07:: with SMTP id n7mr2586434otq.112.1576077314476; Wed, 11 Dec 2019 07:15:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077314; cv=none; d=google.com; s=arc-20160816; b=LwapR1dDXQeK3R46u+X1DO/NpbPV6TQ5B8gBg10do2s95y44GbmikDHJ4qYUQH/cn8 r8Zl9HkOXhHQBcQWrvzwOpNOwV0EXCSkf1fvqPvtfO0KpfU+EOTnvZkPMoi96zZX8FwD wMdXiidsBAf4059bHfj8j1cD/Mcjkc7MuDV9QTIZ1iC506Rwano5AuKJ0UT6tzqGIOsq hKWbwvZUlNNy3lr6MXPbzjQ0G8QoKNkPt66JwcczK2moeL8Ww8T0lywbgE6Sc0FTWVe7 7K5AnbtovrIUj6DzZN0aAoFN7bPbiFxIhSbpsELFcWghcw6R4dtIxLKqniWDr2N9/1Eb sW8A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g3hSSu5Aw1oMuSwG3kGHuOL5g43t5yP3I4/YBSb6FNE=; b=RxH1XVGIARLUEqFuu5zNSCQAJ2PELt0Kz6I+wA5hrkkvuH/BVqAIuayYJ1S0PvD3i0 FaCpm5a2bWFGmaLoZhpvHFQ0gNLb7ofPAZ72Ek/KCS7B/ayy8BgaHljcb55k2Bm8bt9R vCov3MnaUOPMVHcHsSi8R7Gio0Z6SH4I0B0oK1nrs3f/hN6nl0lLzfDIpzC3Kt3sxWuu wX6BF6PcTJ/cuc4y28g+qiVjV33BqMMRLoWQWK2jfxVgqH9VDtFBUquOO9CSf1o0nzg1 TyKBQVFAma6RThEK6TFnDg03AQ1SdRfWlOCx6ed7PnMApPWXwKgQvWbc1ebGl7/fnrTI FCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OdN+BNCL; 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 i11si1280675oto.77.2019.12.11.07.15.02; Wed, 11 Dec 2019 07:15:14 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=OdN+BNCL; 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 S1731237AbfLKPMs (ORCPT + 99 others); Wed, 11 Dec 2019 10:12:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:34176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731135AbfLKPM2 (ORCPT ); Wed, 11 Dec 2019 10:12:28 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C56724658; Wed, 11 Dec 2019 15:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077147; bh=VmuX1lOtvKx4c98j8nGNUePXEwDho/3SgR+Q4NrJQbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OdN+BNCLqmztKSIGQb6d8imiOqubgDXVxpcHELbpkp7s1AIVAGok7OBuKkaMzUEls 3JuwJUfN26/GfFg+GlKhTrLxqjg3vN5pOOlJdMCUkQNs2RLbg6K2Lz3p+eGdCodMVi 716ZoxaAx0zvbF30ji5Sedj41nMhBvJhQjotlAX0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunhao Tian , Maxime Ripard , Sasha Levin Subject: [PATCH 5.3 034/105] drm/sun4i: tcon: Set min division of TCON0_DCLK to 1. Date: Wed, 11 Dec 2019 16:05:23 +0100 Message-Id: <20191211150232.911464559@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150221.153659747@linuxfoundation.org> References: <20191211150221.153659747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yunhao Tian [ Upstream commit 0b8e7bbde5e7e2c419567e1ee29587dae3b78ee3 ] The datasheet of V3s (and various other chips) wrote that TCON0_DCLK_DIV can be >= 1 if only dclk is used, and must >= 6 if dclk1 or dclk2 is used. As currently neither dclk1 nor dclk2 is used (no writes to these bits), let's set minimal division to 1. If this minimal division is 6, some common dot clock frequencies can't be produced (e.g. 30MHz will not be possible and will fallback to 25MHz), which is obviously not an expected behaviour. Signed-off-by: Yunhao Tian Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/linux-arm-kernel/MN2PR08MB57905AD8A00C08DA219377C989760@MN2PR08MB5790.namprd08.prod.outlook.com/ Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index df0cc8f46d7bd..3491c4c7659e4 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -486,7 +486,7 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, WARN_ON(!tcon->quirks->has_channel_0); - tcon->dclk_min_div = 6; + tcon->dclk_min_div = 1; tcon->dclk_max_div = 127; sun4i_tcon0_mode_set_common(tcon, mode); -- 2.20.1