Message ID | 20220815-rpi-fix-4k-60-v5-0-fe9e7ac8b111@cerno.tech |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp212001wru; Thu, 27 Oct 2022 05:53:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67w7xFSkSUlsXkBETVGh/Uzh1XnFq2s20EbFFXuiiaU/nU+/4G5W0qonv3zaz/2LXKU6gT X-Received: by 2002:a63:4949:0:b0:442:b733:2fae with SMTP id y9-20020a634949000000b00442b7332faemr40774226pgk.424.1666875209652; Thu, 27 Oct 2022 05:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666875209; cv=none; d=google.com; s=arc-20160816; b=Mbw7y8D0ffie+V9XZhm+h0+4kebDqObZrsXjt+5zK7q4Pf5D3Jo1o0TajSk1WXQj2+ cTCvXLWqHCIb2/VA/sSyn3FwVjuMJ7rUnBnxWzP6mto2c8Y17fqsNFp3UapA32yJTI3p u7snck/AGklx9D0N0qYndFiSsd8pSGiYL005Uk+A7wtW46cPjNSE5TYHTABeARt17IUc ei6ixkfxmk9M3kQX6zRog2YULVGCW020r9CHBv05hNxE3wafE4CSvJooctA2v3Ee6wIG wkNtOz4cT5DVYjNb6rFL0VEqa4NrxtbBbUnNkd5HxZTWzLirrozFhqHoZDRN+BeJGeNn TF6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:date:from :content-transfer-encoding:mime-version:subject:feedback-id :dkim-signature:dkim-signature; bh=w4o6iJ7JBauRcECwk6ayW6TZMn6N9eDIwjNyi4S//jM=; b=pf/Uh1+QmWRnTXxpDD/azBHWK6IemytOFbaR9moTq9OBoDlOrWhqP/Siq/W4SsYRjs JolELcb//wjVz3O2WbN/eSSHz2oT482OqgwQwKK3XCE7lgs8IIZES97LBEpZ4jMzn+08 AFy+xao3r7XLIheJFMTPs4AxZEWXnljA9q7lFYx+grZ6rmVhaKU8N+nYBjOpJHOONk2J wiKysLDq+9Rp0pK+IReIJekV74esYJEu2gkgHBG4ydXKrRvtVlrc1KbB1JuxOyk1bLeT 3WiNm5AHaQQ18i1heIvgtGSbkiVOORBY+No5F1RS39bYO61IrVIOk72Lo3ZiLdwt5f+F iiBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=MXPNuijo; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NBiLE0bo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020a656846000000b0044af67001a9si1521959pgt.551.2022.10.27.05.53.15; Thu, 27 Oct 2022 05:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=MXPNuijo; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NBiLE0bo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235876AbiJ0Mw6 (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 27 Oct 2022 08:52:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235827AbiJ0Mwy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Oct 2022 08:52:54 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F6AE16EA19; Thu, 27 Oct 2022 05:52:52 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 450EA3200319; Thu, 27 Oct 2022 08:52:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 27 Oct 2022 08:52:49 -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=fm3; t=1666875167; x=1666961567; bh=w4o6iJ7JBa uRcECwk6ayW6TZMn6N9eDIwjNyi4S//jM=; b=MXPNuijom34tZHHhczZJN9FsX+ RY1Gc9b5msDYB4o8xUH0ZNiceXpFJTPUu4cz38SibgDuKsA3hJLUILYbqHymnSo9 glxrM5VwDx6uxa8Us4i6D9Og7CyBNvhoEpKtfD2hiTj5DwgXTcGOWemi++/CuRm7 XCaCbb5iOS36GGMHfEY9UCcRRMOHDj+JSxJ3ukNMjtr19+4dxq3mF82b5T3ZYg0C 8+gjr8XZP5cT3R/hw7ldzfaE2aqXX9k7t5VkAIbdzgNNP25RmeYLd1lUJkzCD3XD /luzTcUhRKji/Wh6Tz3Hldl3RHCrC7GbkR7tssm36K21m2j67mGLHpqiEvsw== 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=fm3; t=1666875167; x=1666961567; bh=w4o6iJ7JBauRc ECwk6ayW6TZMn6N9eDIwjNyi4S//jM=; b=NBiLE0bo4USWxeGoE3J2bg69LK0WX Sp8PxzJZC52gfbRiulzbehfoivLxB5mrLAKWTm1RbEs3o6F6B059pC5yKzytPvpQ SOmXWUqyA709nKlxQ85BgSmrkduzUyYva+FLwoQjdtbaTKRNgWfg3QtCpTMcZKxW Q1QCne6KBKoEGDoDn8eFsQhPPyHz1MkPyltqtW27X9aB8SdXeHxzl3RAuyjaoznO CVuaV6xzR1iSFU8OXVnKl2Aqo301GZuo1XCinthCBkY9go8tIjAd4bAuGNIqYOIV 1BnbKye+iTWD1kJPXxObpQLo2Sl2ohi8q9ELv4R7QajcaXaJT3vZBIvog== X-ME-Sender: <xms:Hn9aY1q7ckPZo00GWOvUiSBRkSUHeKf5-ltYRm8-hkslcmkOQD1Rqw> <xme:Hn9aY3q9GtcxX43EAEct-PuzbMoxm6Ck6-ic9QlWlEfTGY8LMr3B_jYpgUfAA_faC aQjhgmGk8kihALEf0I> X-ME-Received: <xmr:Hn9aYyOhdgyRs5rmilu5Fx4xYPGiovNxRPCQqUvNXPwcxsqvHMPTNtg9u5oQAzHYtxMem4TbQ9_NMjKKy__KY0vuQNF2yyosJtNadQdtyDbQcA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefugggtgffhfffkvfevofesthekredtredtjeenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeelueevteetffdvveelgfffleegudeufeelveefvddugeehkeefkeehjeeikeeg udenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: <xmx:Hn9aYw56bw4fn04EJ5p8B5I_xXLFq_lmO4rH6k-yVh6g1lSD2CqjaQ> <xmx:Hn9aY05QSzJ2RGm9VGucSw0sefEPaApgyUTtjiuq4yZaAVIZHgVvJg> <xmx:Hn9aY4jhBUFPxDHE7oqLLr7e-XXPLzD5df97VYTD5hZLtnxEjFP9TQ> <xmx:H39aYxMvlnj5pUpwtB8Ii_uNNmC8g6CsZDIdETayLTWiES-Qe_ornw> Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Oct 2022 08:52:46 -0400 (EDT) Subject: [PATCH v5 0/7] drm/vc4: Fix the core clock behaviour MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-b4-tracking: H4sIABh/WmMC/33OTQrCMBAF4KtI1k5JJj9tXXkPcdGkiQ1CK0kJSundnboTsavhDXxvZmHZp+gzOx 0WlnyJOU4jBX08MDd0481D7Ckz5Ii8ERrSI0KIT1B3MBxEjbU0mitse0bGdtmDTd3ohk0VU/FtPcQ8 T+n1uVKQxuVfYUHg0DYSa2MbGQyenU/jVM2eGq9UVeQul8SD06amh4QI/oerXa6Id8IqrtH0QX7zdV 3fMcTxOTABAAA= From: Maxime Ripard <maxime@cerno.tech> Date: Thu, 27 Oct 2022 14:52:40 +0200 Message-Id: <20220815-rpi-fix-4k-60-v5-0-fe9e7ac8b111@cerno.tech> To: Stephen Boyd <sboyd@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, Maxime Ripard <mripard@kernel.org>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Michael Turquette <mturquette@baylibre.com>, Daniel Vetter <daniel@ffwll.ch>, Emma Anholt <emma@anholt.net>, David Airlie <airlied@linux.ie>, Ray Jui <rjui@broadcom.com> Cc: linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson <dave.stevenson@raspberrypi.com>, Maxime Ripard <maxime@cerno.tech>, dri-devel@lists.freedesktop.org, Dom Cobley <popcornmix@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Stefan Wahren <stefan.wahren@i2se.com> X-Mailer: b4 0.11.0-dev-99e3a X-Developer-Signature: v=1; a=openpgp-sha256; l=3256; i=maxime@cerno.tech; h=from:subject:message-id; bh=D7FuhEopp2x9ehqwCkLl3TXHQsSl1JIzkh6YWIJGp30=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMlR9TL/V8u61orwucrJzQ2+6yl7bo66mRHjGfNvgj+8Oudw fL/aUcrCIMbFICumyBIjbL4k7tSs151sfPNg5rAygQxh4OIUgIk8KWL4K/wnfP8hedcH8vHTK8+H7s 1YLfHKPNbzJP9aI47QA+W+dgz/jBrX2G3JvcBx4V/35V//C5Q2Xe2JP/tjxizNp80ZvpGPuQA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747845339789615827?= X-GMAIL-MSGID: =?utf-8?q?1747845339789615827?= |
Series |
drm/vc4: Fix the core clock behaviour
|
|
Message
Maxime Ripard
Oct. 27, 2022, 12:52 p.m. UTC
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 <f.fainelli@gmail.com>
To: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
To: Ray Jui <rjui@broadcom.com>
To: Scott Branden <sbranden@broadcom.com>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Emma Anholt <emma@anholt.net>
To: Maxime Ripard <mripard@kernel.org>
To: David Airlie <airlied@linux.ie>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Stefan Wahren <stefan.wahren@i2se.com>
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 <popcornmix@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Changes in v5:
- Changed the bool name
- Change type of variable storing the max rate to unsigned int
- Link to v4: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v4-0-a1b40526df3e@cerno.tech
Changes in v4:
- Move the rpi_firmware_of_match to avoid confusion
- Link to v3: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v3-0-fc56729d11fe@cerno.tech
Changes in v3:
- Return UINT_MAX when the firmware call fails in the _get_max_rate function
- Link to v2: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v2-0-983276b83f62@cerno.tech
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 | 19 -----------
drivers/firmware/raspberrypi.c | 38 ++++++++++++++++++----
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 | 52 ++++++++++++++++++++++++++++++
8 files changed, 147 insertions(+), 50 deletions(-)
---
base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
change-id: 20220815-rpi-fix-4k-60-17273650429d
Best regards,
Comments
Hi Florian, On Thu, Oct 27, 2022 at 02:52:40PM +0200, Maxime Ripard wrote: > 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. I intend to get this through drm-misc, but you just gave your Reviewed-by on all the firmware patches but the first. Are you ok with this? If so, can I add your Acked-by? Thanks! Maxime
On 10/27/2022 7:59 AM, Maxime Ripard wrote: > Hi Florian, > > On Thu, Oct 27, 2022 at 02:52:40PM +0200, Maxime Ripard wrote: >> 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. > > I intend to get this through drm-misc, but you just gave your > Reviewed-by on all the firmware patches but the first. Are you ok with > this? If so, can I add your Acked-by? I don't feel legitimate on any of those patches, but the firmware part is something that I can understand, gave you an Acked-by for patch #3, hopefully this allows you to merge through drm-misc now.
On Thu, 27 Oct 2022 14:52:40 +0200, Maxime Ripard wrote: > 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. > > [...] Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime