From patchwork Mon Jan 11 14:22:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 360734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 103D1C433DB for ; Mon, 11 Jan 2021 14:24:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9CA422515 for ; Mon, 11 Jan 2021 14:24:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387520AbhAKOYB (ORCPT ); Mon, 11 Jan 2021 09:24:01 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:50505 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729850AbhAKOYA (ORCPT ); Mon, 11 Jan 2021 09:24:00 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 518E2580661; Mon, 11 Jan 2021 09:23:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 11 Jan 2021 09:23:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=HbYxmffJ5MTu/ ilOrHKCEGTMSMCF1Ah2LxtkepDiePQ=; b=GnnoDI03HQiKgx3Du031mc35qS64h Bwo8zOaygK8JUEtqLsokWRxT8YqPrjUphEz4zToujN0Yus1rtU1RZhlJRAVm98cM RCf7Ao+Ovn41FhVbCsHlDwbSpByOQcoMoUSj9PADPnwLEkaITSROHRl46smxus0v BYg/kywJehuCotEk8xDpE/6Dae1venyEkIfO4RVrsZBrT2fxQsBFmrzsPKXh/n7B BpC5WErVhbypXj3eHHoViJ2lNOMKvKVaczlVGCuppu28944rx0n43j6jwrqJKlMI GGvBVpi6q+bce7x18Xhx6/OpscoLIMczNk97hYxtVItmXlGSyBPZlvqQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=HbYxmffJ5MTu/ilOrHKCEGTMSMCF1Ah2LxtkepDiePQ=; b=fpqCF0js cCD4QzgYr7ORKsPoR/tgsahcxK2fG5wpXczNhQjHlyFqiEtBWQMWCWhdh6iOO1aH 4VB3GbH91vfFaE10jplfExIvaqfhe9xmPPnTGJOErRbT4OCx5qF/+zES/+XY/+hI aODx7gOgvD63EfTY5jQPXZDwr86RgdZmFJxT1Z/KR5aKjhcl9UGQOssB+W/LrMxJ h1fbIAR5ckmDBLKSkTdqkBpLYPkze3g+PNX7LoZ1voK8nt0B1A4GnWoEvc9MliYr GuwW59nt6Xd1rCGXyr04hTa28miVK6qJ1KYLwTRwizrRvIpUiIIpIxsQWDOpYBL+ 4YI/kUv/Lfc/JQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdehuddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id CF874240067; Mon, 11 Jan 2021 09:23:13 -0500 (EST) From: Maxime Ripard To: Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Hans Verkuil , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com, Mauro Carvalho Chehab , Dave Stevenson , linux-media@vger.kernel.org, Dom Cobley Subject: [PATCH v2 02/15] drm/vc4: hdmi: Move hdmi reset to bind Date: Mon, 11 Jan 2021 15:22:56 +0100 Message-Id: <20210111142309.193441-3-maxime@cerno.tech> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210111142309.193441-1-maxime@cerno.tech> References: <20210111142309.193441-1-maxime@cerno.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Dom Cobley The hdmi reset got moved to a later point in the commit 9045e91a476b ("drm/vc4: hdmi: Add reset callback"). However, the reset now occurs after vc4_hdmi_cec_init and so tramples the setup of registers like HDMI_CEC_CNTRL_1 This only affects pi0-3 as on pi4 the cec registers are in a separate block Fixes: 9045e91a476b ("drm/vc4: hdmi: Add reset callback") Reviewed-by: Dave Stevenson Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 2e5449b25ce4..cb4594e7df6f 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -779,9 +779,6 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder, return; } - if (vc4_hdmi->variant->reset) - vc4_hdmi->variant->reset(vc4_hdmi); - if (vc4_hdmi->variant->phy_init) vc4_hdmi->variant->phy_init(vc4_hdmi, vc4_conn_state); @@ -1874,6 +1871,9 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi->disable_wifi_frequencies = of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence"); + if (vc4_hdmi->variant->reset) + vc4_hdmi->variant->reset(vc4_hdmi); + pm_runtime_enable(dev); drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);