From patchwork Wed Sep 22 12:54:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12510601 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=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 477D7C433F5 for ; Wed, 22 Sep 2021 12:59:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 156AC611CA for ; Wed, 22 Sep 2021 12:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 156AC611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SnVt+yGaJqjNvTfYNsFdlLsVbnKtQf9Jyzs8FsvK7cA=; b=YtWnl2z3MquxzV QvtmUh8k3tadua3fejQrR0C3EtroTdlCqGVzjjv83kHfNoRLtrIqOlVWCzGC5vSJIgJqjKHNJ17bw kNc+eEkJJSAEqaLAFrD0raohCDpoKcioiZuUo54u/9a2DskJCWN2TkFQOEk08qpN2hWw+wAtYcTZC /WWeHMA2of/Q3AUiCCRHhVEFj/m+UB97SfsFmhLplfk9ClU814Nescx48XNpkET42Grn3EfdU0SWS AnUrCWExS61K02ed359VcsdwmN3v6/tgghZjWBE7UWsRu4/FD5DEF7nBIpqSE4ruyLZNPQLOZeSxb OOSP+2p0xq1ACwRbUPig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT1nn-008Sxv-30; Wed, 22 Sep 2021 12:56:44 +0000 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT1ld-008S6Y-O8; Wed, 22 Sep 2021 12:54:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 90A972B015E3; Wed, 22 Sep 2021 08:54:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 22 Sep 2021 08:54:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:content-type:mime-version :content-transfer-encoding; s=fm3; bh=Go/ab6NNxUHpJNd2Et/T8u6oyB eZr/MiliwDKQ9MUa0=; b=kNLrMtlHMcaidc7ReuMEuLJ/fW7mtC9SLXN65MatiM 26mcZjEN6rz4tJxGpx8JwXrlxV/2xeVs8/XzI5oUQpmpCXt+5CMMr4g0b3jGj8zz Cy8WuGb9ArHB9kuzYir1+jf3Q96cGBY/7XXaYGfAXEkw6i8oy9xv0lzURKRZaZIm TSy+TsT8xEj96h1mk+tQnKM0zMaGCPyz+5R1lXQMkln61kyC5Gl5oAtRMtcSk89x xL8zTVrtJGH2fuoeNrdLsskQYmCKOPIl3gjqbrlsvtGCsG4rD21J65GxzlOcDxra +5FtkbpEddeCaYwGxx6O3YZ8HeFwyf249jeTwxsBmEpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Go/ab6 NNxUHpJNd2Et/T8u6oyBeZr/MiliwDKQ9MUa0=; b=mShRxK6zxj/N3jttlhY/5M c9/KZLpibE+Oiahb5L3AW23XnYWindChrGlAvKtUmakN5peX77GUkz7+TIMr3JM1 xjiKM28QPGgnTYt6/LrTRIpCJXs6kvEdI/HLVqfeVjN7O7A8ZDO0bwiJfY6LeuVB SZTayqoUMMzvrMA63F6mPICl3xrQl0As7ywYK9ZgAO8dNf3jSFAryyqTRvX89TFc tkIfnFGbpKi+98hTk1rM7yc9RzNmEgi1TEgE1JbY9Y+TFFIHEAZEcQLMhM0tKXJ8 O37vrjBbQ+rItq8wXwikw5MH0dg/lFOxWUKx1m54uu2dMeQDlR5kBEyaJ4mshXLw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeijedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffotggggfesthhqredtredtjeenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeetieekgfffkeegkeeltdehudetteejgfekueevhffhteegudfgkedtueegfffg feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Sep 2021 08:54:22 -0400 (EDT) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Mike Turquette , Stephen Boyd , Nicolas Saenz Julienne , Florian Fainelli , Michael Stapelberg , Linus Torvalds Subject: [PATCH 0/5] drm/vc4: hdmi: Remove CPU hangs, take 2 Date: Wed, 22 Sep 2021 14:54:14 +0200 Message-Id: <20210922125419.4125779-1-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_055430_086626_D5D6CC91 X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Here's another attempt at fixing the complete CPU stall while retrieving the HDMI connector status when the connector is disabled. This was fixed already, but eventually got reverted by Linus due to the same symptom happening in another situation. This was likely (but not confirmed by the reporter) due to the kernel being booted without an HDMI display connected, in which case the firmware won't initialise the HDMI State Machine clock. This is fixed by patch 3. However, further changes in the clock drivers were needed for clk_set_min_rate to be used, which are patches 1 and 2. Finally, patches 4 and 5 are the original patches that were reverted. Patch 4 got a small modification to move the clk_set_min_rate() call before the HSM clock is enabled. Let me know what you think, Maxime Maxime Ripard (5): clk: bcm-2835: Pick the closest clock rate clk: bcm-2835: Remove rounding up the dividers drm/vc4: hdmi: Set a default HSM rate drm/vc4: hdmi: Move the HSM clock enable to runtime_pm drm/vc4: hdmi: Make sure the controller is powered in detect drivers/clk/bcm/clk-bcm2835.c | 13 ++--- drivers/gpu/drm/vc4/vc4_hdmi.c | 90 ++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 35 deletions(-)