Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3715307imu; Mon, 28 Jan 2019 09:31:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4iZxZlXfEyvqislm8jLzjJmup4ohy+GPT5tOQ6N6V6lASHTXPPYOsKNGSNZriTbGWcqnnV X-Received: by 2002:a17:902:50e:: with SMTP id 14mr22397882plf.141.1548696666765; Mon, 28 Jan 2019 09:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696666; cv=none; d=google.com; s=arc-20160816; b=oMV+qbATTXDvVj2zbSqi+F2eeTAoG6tFYDwvG52tonJ1MiLS5gGjF2oyPa5Q18619/ IRY/bWF6VlSCDjynpcEOE3wO8u0tP+Gmf1OGsY6MahIVUJ9CJU7tihM6vaMtA2FXJJc6 PWwDbZJlr3QChs2unTqAyoAXIVC8G5XqwjdE+VG90YYEqPwycsjz+vjVXAUcbzplWK36 cTaNAvinu3+8XKgckgG0FlpsMsQsx37K4j4oqfKAVNlXGlzQ/nAPPI1ADs7gKt3r+4kr fn34wzlZgOJu9xhNJCbBxfwJiZRK2QWSlSGsGgQ0OSiGQl+vhzOF+tKPGEW3q4GA8Oh4 h9nQ== 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 :dkim-signature; bh=b/b/BVMDIavxsgvsct9YLJbke1SDlns8hDkud3Mni40=; b=IbIU7eVJdnLmrd6m0yPKYgqJ4A+SeWxx+5/NBCZmk2B0uFdCGUaj9onNLBgEaoHADw 9IKQfyrwAWz2gEzOG5Otvo5lTgkFwmpmPfWRdWx6196gEcnMuF5UOxKEGx+ttwppiYMS Ct69ixGfi9IxnBBwDcqWKmj5eugu3asZE4OC8QEvwgrzjQOgDYppxd5Dc+Qrzd9CUlP6 legfAjfPjDaPQY46/yRx2S3jxhbU8rlWKcFLqL7YWVSeWbEB3jBbkMIQx/6AWkTzJEoL M66mb8fRA1T8P6Hz5sTN5lRC7mMyaOEUA4B2O7wU5U095Rg1SEIOFqxOnImvgEfEdtyQ uNHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OQMAknXc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj2si32786670plb.27.2019.01.28.09.30.51; Mon, 28 Jan 2019 09:31:06 -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=OQMAknXc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730904AbfA1R3d (ORCPT + 99 others); Mon, 28 Jan 2019 12:29:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:45054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730622AbfA1P7r (ORCPT ); Mon, 28 Jan 2019 10:59:47 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68E702082E; Mon, 28 Jan 2019 15:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691186; bh=Ru2iY6QwaG4AzxIx3U2e7jA9yB0+C7uyLouWhzd/ilw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQMAknXcfeYIGj0suu0xQPZIPY5ctcNAFMMOSbmlESrRRgHggtwDqQMP40nYce1sa 7EgOf42XIt7foRpxGNKn86LDMPORQuFQB6526m63o7t7tY6vlm0Z3YJZxn9EvlK9dV ZYHgKKNGT1nx/eokvJmLUv7wQY4Dk7Aya8o0GyqY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jernej Skrabec , Maxime Ripard , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.19 007/258] drm/sun4i: Initialize registers in tcon-top driver Date: Mon, 28 Jan 2019 10:55:13 -0500 Message-Id: <20190128155924.51521-7-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec [ 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 d5240b777a8f..adcdf946c365 100644 --- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c +++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c @@ -168,6 +168,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