Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2774724imj; Mon, 11 Feb 2019 08:16:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IZFl8BPCVh74b9NtJ0FEElP/4BgANf2fGd85aMv+n+Yz3OWiStte63Vo8R2OvgPm63xtOSB X-Received: by 2002:a63:f91c:: with SMTP id h28mr9689314pgi.14.1549901772198; Mon, 11 Feb 2019 08:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901772; cv=none; d=google.com; s=arc-20160816; b=AhlwCS3G3+WiWtCWvf84C8XGxmRqCWhgxIPC4H9ceOX0qMQHb3FIksuxRZ+jSeD/4m HJ2KvSxAIFe+qeRLRfcs0edoRq9PTSyn7RUPlyJi+T6+1+YfvGoz8UGQDsKU7bXM7CVy uP4SmzmzGduiFg+2sp41iFQOltXhLed9uWjXzFz2uMwLdm8bG/lX0BpDFCNOeep0bhem kPsBN1h7HfAXIelwhw0yzj+5/JqWTvbZaJpMmrewwGOa+8Bx/V7pSFNZK3k9eN05ifNV ctDay60Gls0APactoDGmFBkd/ERbWLMFMUk9w+B57IHB4ZO4BZejjuXodJ7+nYgDRUF5 7kxg== 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=Ft3FsidinM9TCgeKsm5TEAEvUUjrjdZlA34lw0qkkZM=; b=J5VDLmGMalvbvrQCF7MIGvzl+UP+go1QMRZdrntI19vlZIuaO68plopYyxgTIMwPZs igRZCdKLx0AEvRUkklyzDYb0+x0kjgoDzBe0LuluAOCcj4Dejn/xKYJg8hlVPV9KpGsL mxvyMg1gY9lVVMgXcxZjqI7hlE6a0xrfxmQXu2eNwKRH/lUPmrNj9m03qNRYW6e+BKig z1mux5bFB0e+LPkg7BZOyLu11UNMy959Yr8Q0P/s+Z67DfBPtXH7PsLK04t4XrLmIe4X YTH8JrFidIOGVykHPlS6QiKJel0kC18JpQCNscJW/fggND7L332MgzHYAXOH8ZEPElbz NlJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w274ZrSb; 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 i16si9574206pgk.445.2019.02.11.08.15.49; Mon, 11 Feb 2019 08:16:12 -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=w274ZrSb; 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 S1729402AbfBKQOp (ORCPT + 99 others); Mon, 11 Feb 2019 11:14:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:54108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727867AbfBKOVQ (ORCPT ); Mon, 11 Feb 2019 09:21:16 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 4423120838; Mon, 11 Feb 2019 14:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894875; bh=AHyChqXgiXUbOOjNNajclOtf7nME23hLO8oVW2NRXXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w274ZrSbXp4yc0gtdKc/dB30tscAhc/axDXwlK2rk4HCR31bBP7iY44gUBvrDZqTe M1K1+wdjlKNMT3NrFBhlX1sv4VsU/T6J+T7RrXwU6CHjyDR9GTQaRoZ+jawwwjq/6o ziXYX54lCc42jS6+tb4DRGUwpqLpZ1jneEIzPd68= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Maxime Ripard , Sasha Levin Subject: [PATCH 4.20 009/352] drm/sun4i: Initialize registers in tcon-top driver Date: Mon, 11 Feb 2019 15:13:56 +0100 Message-Id: <20190211141847.037880151@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit c96d62215fb540e2ae61de44cb7caf4db50958e3 ] It turns out that TCON TOP registers in H6 SoC have non-zero reset value. This may cause issues if bits are not changed during configuration. To prevent that, initialize registers to 0. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-24-jernej.skrabec@siol.net Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c index 3040a79f298f..37158548b447 100644 --- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c +++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c @@ -167,6 +167,13 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, goto err_assert_reset; } + /* + * At least on H6, some registers have some bits set by default + * which may cause issues. Clear them here. + */ + writel(0, regs + TCON_TOP_PORT_SEL_REG); + writel(0, regs + TCON_TOP_GATE_SRC_REG); + /* * TCON TOP has two muxes, which select parent clock for each TCON TV * channel clock. Parent could be either TCON TV or TVE clock. For now -- 2.19.1