Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9124480pxu; Mon, 28 Dec 2020 07:13:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwN7bI62a4mzSMNzyy9Zq+ZQvPalJ7xJSOwuL4y++17EM4ztozBsTKNfA7++4BZKO4/Cex8 X-Received: by 2002:a17:906:1b46:: with SMTP id p6mr43290146ejg.68.1609168404256; Mon, 28 Dec 2020 07:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168404; cv=none; d=google.com; s=arc-20160816; b=CcKMQUyfgxO54/i7zcai7+RYQ5K6r/S5Ie7zycEQRVFLAdro3Y42ir7YqbCGepiuH9 MM9FgKHQxieWLLQJaUNR3WgQZ4BjOHwNvaCyn1NM9oKQ2mlr/cQIq8pVtq0dvt+xU1lY nCkDyzTj8ava9PJMF85Q7VG4YbgqQIkX/OPSlliPng3BsBgUKNDbiUO0hsyQYCZe8g6B WolvOe1PHOFCqTKXJG8/6arPZDQQLvdo+fSZPDiBxSALfqndj1AW8wSZeeD/WWDIr/U2 rfAm6ZZCBhAhCNgzRuHUau9pxBSqVVt/Zfr9iAMsSZDig7TvKVGmAELcrTqK3/Punz6p 0Apg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LPp6v62UwGc96PLs/0WU9fi3RCf8vkwoPfDHvng4pLU=; b=PeLokzFh12d6ozCE8m+gVRhCemwa+0Llszb0B8Dd19NNTxrP4uLp1PjYkX2ZuKj5X5 YXM8SamoYZykl+jV9ShSaHoAV2s0Ln3DP/BXR6MVzpwNO4HnoSvoJ7EQyKoI6sjJs3cP sqK1T6p2yPI9OA4dJqM+Qs3jCwkUNYjroLWHbfDvECfEWYTxeSApWiDYQmOQJt5OY++S vUWC+15nihgt4AlaJmbSIQsHH1m1IexrQ6hMY6KFSSpDCo39Z4K4TnEk0b/mwJbgelir RyEdH/cZYhqFFT1d7xeFvFqygrBnk0W9f2W2vaPBQLNHR4biCruGBCZGOgPqmFPvFIUO bvbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vvqqy1Y2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq8si18398782ejc.314.2020.12.28.07.12.59; Mon, 28 Dec 2020 07:13:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vvqqy1Y2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391696AbgL1OHY (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:41468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438133AbgL1OHE (ORCPT ); Mon, 28 Dec 2020 09:07:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65B17206D4; Mon, 28 Dec 2020 14:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164384; bh=9RvLSejUFGb1DnP4EcE3NpQQHY4tAHzLTQcLQGwqT/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vvqqy1Y2UnPMMCPaOKzjWHatvq1DDRivMeW5+9ZouIxKNcT5RksnEfe+wN3pinHAi Vcvra3k6bpYW+Q+Q+CzcK2HpxKLVd0tS9pfxdzRqa2/X3Bg3mUeidfhVklxD98zk2L SV14oGYK/sZIKIjlT1U6YUJSYzYyktxN/2pYgN80= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Zyngier , Neil Armstrong , Sasha Levin Subject: [PATCH 5.10 144/717] drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers Date: Mon, 28 Dec 2020 13:42:22 +0100 Message-Id: <20201228125027.861595356@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier [ Upstream commit b33340e33acdfe5ca6a5aa1244709575ae1e0432 ] Removing the meson-dw-hdmi module and re-inserting it results in a hang as the driver writes to HDMITX_TOP_SW_RESET. Similar effects can be seen when booting with mainline u-boot and using the u-boot provided DT (which is highly desirable). The reason for the hang seem to be that the clocks are not always enabled by the time we enter meson_dw_hdmi_init(). Moving this call *after* dw_hdmi_probe() ensures that the clocks are enabled. Fixes: 1374b8375c2e ("drm/meson: dw_hdmi: add resume/suspend hooks") Signed-off-by: Marc Zyngier Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-5-maz@kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 68826cf9993fc..7f8eea4941472 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -1073,8 +1073,6 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, DRM_DEBUG_DRIVER("encoder initialized\n"); - meson_dw_hdmi_init(meson_dw_hdmi); - /* Bridge / Connector */ dw_plat_data->priv_data = meson_dw_hdmi; @@ -1097,6 +1095,8 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, if (IS_ERR(meson_dw_hdmi->hdmi)) return PTR_ERR(meson_dw_hdmi->hdmi); + meson_dw_hdmi_init(meson_dw_hdmi); + next_bridge = of_drm_find_bridge(pdev->dev.of_node); if (next_bridge) drm_bridge_attach(encoder, next_bridge, -- 2.27.0