From patchwork Tue Sep 20 12:50:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12982095 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3D3EEC54EE9 for ; Tue, 20 Sep 2022 12:54:31 +0000 (UTC) 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:Cc:To:Message-Id:Date:From:MIME-Version :Subject: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=CKFaCHARsRLb6XZB3iLJoT0N3VC7jO1Ak1YQSDzd4VM=; b=U3SdWIJBzlwdrr 82CZudvvu4MNPHTyC6v4r5XZmrHkwEzNXT1HPyCGs3MArMGJgBPIoZUDQkXibwvk9vlXoxi9qLBHT v2O7OsbIBh++RC3Kb63gQP0AWqFi0rIWCc+pL8BTAPymCjKeeKX3eWNtY6OP0bLeYvHbF1GucG0Yi BXoUS51MsEni6YI6h95YyRZIbNbrIiuTbHB6nKjNjseXj6auNBBfXyLiJfQOeiynmaxt34x0zzwy1 g3m5SuV9FTQM4W3+j26ezmM/BNKfIcYSJgnn4/ylB47ZM2TQ9jCE/eCS8MHNbrChIhhu6L8+KCK5m qmV3qJ04PdpFTkyWkqyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oackZ-003pyQ-Vf; Tue, 20 Sep 2022 12:53:20 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oackJ-003pns-5f; Tue, 20 Sep 2022 12:53:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D0D723200A08; Tue, 20 Sep 2022 08:52:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 20 Sep 2022 08:52:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1663678374; x=1663764774; bh=yTlflAyOUF EqTJEaTdC+96VGs2mVc7ugO0+0lZWQg2U=; b=H6M/gJpSlbKCZd/GdDoOoo1Qjc XyEKmSV3x9jatUq1YyLH0TQTkc17SPVxw2NQ6G4b3Z1gZ+4AsmpaAJ+Bn3L1aXFn 2pLPC/Ff+hr8esFrYWvOXC9MbkoAYhjGQmNjXKkVPtI+NPJ1HGQxwLs5fytRlUF5 vkIlUth54gv7IWn4X9a0GEjX5V2607FoEkFrvAXAXpLcmJzmVSPzb5GHZwCsoNYG YKfsO6ZoQU7JSKb0EGu06eq23TTQrNYQg+zjbQ3MSGOIBNROvimJo5lhF69PQ506 oF66VGiur5Y9QhnLZdoVyomIr7BdhAW9zXE7ANg2XCohuUVJI67Wht+rmBVw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1663678374; x=1663764774; bh=yTlflAyOUFEqT JEaTdC+96VGs2mVc7ugO0+0lZWQg2U=; b=toIdzmZ0aH158pNAkNigqiSNmS4tN x1kN7uA9KnLhEaEiI20Nmw30730yC+5Kq3SfgsGhcF8PbvXdQ1yuMaoj8SbRf43t HnT0621dgVsK8ZhcIr1bZkwTKLTd5LALjdfgRYxvroem9xwZw/3y3aSikXK6cH17 P9NDm9E6rESOO+y4iJ8mFqZb0QeZ80wvGixFw5SX7UCIBLdm0HL5xFcoXRnYnMAM QJQZ8J2g8m376WWvuWfpphKQ9ts/WvMMLmeu9JkPfdkIN5JUFYlycj2BJnyRFApq XGqse/9JXNDZbHviz/baVvOBUOeTv7+fP9tGvR/ojkF+gcldpgIF7q4DQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvledgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepufggtgfghfffkffvvefosehtkeertdertdejnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleeuveetteffvdevlefgffelgeduueefleevfedvudegheekfeekheejieek gedunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Sep 2022 08:52:53 -0400 (EDT) Subject: [PATCH v2 0/7] drm/vc4: Fix the core clock behaviour MIME-Version: 1.0 X-b4-tracking: H4sIAAu3KWMC/xXLQQ5FQAwA0KtI1ypVDP5txigayZBOIj8RdzeWb/FuSGIqCX7FDSaXJj1iBpcFhM 3HVVDnbGBipqHu0E7FRf/Y7ugI6577xnXU8jhDPpNPgpP5GLZvXa4itODgeV6uj6ouagAAAA== From: Maxime Ripard Date: Tue, 20 Sep 2022 14:50:19 +0200 Message-Id: <20220815-rpi-fix-4k-60-v2-0-983276b83f62@cerno.tech> To: Daniel Vetter , Florian Fainelli , David Airlie , Broadcom internal kernel review list , Michael Turquette , Scott Branden , Stephen Boyd , Emma Anholt , Ray Jui , Maxime Ripard Cc: linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Dom Cobley , dri-devel@lists.freedesktop.org, Maxime Ripard , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2654; i=maxime@cerno.tech; h=from:subject:message-id; bh=Usxpco6HT+dQTlqIqrK9EZazz1b2NzHvAwZ5ALguFI8=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMma2/lKci8obSraqdT4JPT8aaZrb0WW/Tjan3kw3uaXbN3+ /gMhHaUsDGJcDLJiiiwxwuZL4k7Net3JxjcPZg4rE8gQBi5OAZjIN2WG/+HiPR+jXzcu0ZlmGbpzcU Xc3JSSX91d3Q9eV2a5Bi71k2RkONl/605SfMe/TyIzA+R3X/A913Eigi9ySsEzxxsLLjAd5wMA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_055303_585119_B84E9325 X-CRM114-Status: GOOD ( 11.37 ) 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, Those patches used to be part of a larger clock fixes series: https://lore.kernel.org/linux-clk/20220715160014.2623107-1-maxime@cerno.tech/ However, that series doesn't seem to be getting anywhere, so I've split out these patches that fix a regression that has been there since 5.18 and that prevents the 4k output from working on the RaspberryPi4. Hopefully, we will be able to merge those patches through the DRM tree to avoid any further disruption. Let me know what you think, Maxime To: Florian Fainelli To: Broadcom internal kernel review list To: Ray Jui To: Scott Branden To: Michael Turquette To: Stephen Boyd To: Emma Anholt To: Maxime Ripard To: David Airlie To: Daniel Vetter Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Dom Cobley Signed-off-by: Maxime Ripard --- Changes in v2: - Dropped the clock patches, made an ad-hoc function in the firmware driver - Link to v1: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v1-0-c52bd642f7c6@cerno.tech --- Dom Cobley (1): drm/vc4: hdmi: Add more checks for 4k resolutions Maxime Ripard (6): firmware: raspberrypi: Introduce rpi_firmware_find_node() firmware: raspberrypi: Move the clock IDs to the firmware header firmware: raspberrypi: Provide a helper to query a clock max rate drm/vc4: hdmi: Fix hdmi_enable_4kp60 detection drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code drm/vc4: Make sure we don't end up with a core clock too high drivers/clk/bcm/clk-raspberrypi.c | 18 ----------- drivers/firmware/raspberrypi.c | 22 +++++++++++++ drivers/gpu/drm/vc4/vc4_drv.h | 16 ++++++++++ drivers/gpu/drm/vc4/vc4_hdmi.c | 25 ++++++++------- drivers/gpu/drm/vc4/vc4_hdmi.h | 8 ----- drivers/gpu/drm/vc4/vc4_hvs.c | 26 +++++++++++++++ drivers/gpu/drm/vc4/vc4_kms.c | 13 +++++--- include/soc/bcm2835/raspberrypi-firmware.h | 51 ++++++++++++++++++++++++++++++ 8 files changed, 136 insertions(+), 43 deletions(-) --- base-commit: 521a547ced6477c54b4b0cc206000406c221b4d6 change-id: 20220815-rpi-fix-4k-60-17273650429d Best regards,