From mboxrd@z Thu Jan 1 00:00:00 1970 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 D16EBECAAA1 for ; Thu, 15 Sep 2022 11:31:29 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fK4uM4nuBYedbi3RGCjFhs/sf0MbjWwJ1Oi8Yr0trLg=; b=SvkXsodsGkbGnO 9vEpAhu/F8eYvL7th1Vw3TXPLOHkyL+B/nAq63VnHirUrd2D+NZPzSADQ38nGCgCK59fgN8qVX1Ga 6Z7cl3IbJUcfinXiilUpP5w7xo7MYwxkpY8vLLE3uXRAB8AtcwrmmcHcfunOaWFZCH6Av1S7O4Qdu mAo4StWhUue1O1vvFkDFK63QXA0t9aGCjq6rsp4OIJrVDh6k69Wp+3ZwDCHD2uXMWDfsYFEw5TDyH 119StB5jiPMvm5ONJuLxddndTiL3VmySn/uRbtigffxckQtY05MVlR2ygBV0dj20nfFOTgRm4GEpU 3ljSTBiBgz+1rTN26l5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYn4d-007iD9-IZ; Thu, 15 Sep 2022 11:30:27 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYn4U-007hzZ-Kx; Thu, 15 Sep 2022 11:30:20 +0000 Received: from [192.168.1.138] ([37.4.248.23]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MybbH-1pXDsH1aov-00z1Yd; Thu, 15 Sep 2022 13:30:04 +0200 Message-ID: Date: Thu, 15 Sep 2022 13:30:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum Content-Language: en-US To: Maxime Ripard Cc: Stephen Boyd , Broadcom internal kernel review list , Daniel Vetter , David Airlie , Emma Anholt , Florian Fainelli , Michael Turquette , Ray Jui , Scott Branden , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Dom Cobley , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220815-rpi-fix-4k-60-v1-0-c52bd642f7c6@cerno.tech> <20220815-rpi-fix-4k-60-v1-2-c52bd642f7c6@cerno.tech> <20220914155035.88E45C433C1@smtp.kernel.org> <50e8f1e8-806a-3599-7cbe-0c7d4bec1c51@i2se.com> <20220914180508.0EDD9C433D6@smtp.kernel.org> <20220914181458.C6FCCC433C1@smtp.kernel.org> <20220915075459.d2snlbwkingwnbh3@penduick> From: Stefan Wahren In-Reply-To: <20220915075459.d2snlbwkingwnbh3@penduick> X-Provags-ID: V03:K1:zlHowfxGiySVfzpiYYs6x9gC/xpTLorrvFqCMJk6TXlgJZcBk8J 7X1L4o/wo/VMgbEbInTkJmCCsmnUpqEJwk4Ecy4NxSg0eK5NU3MowOJoRsbrZxGz1fUAT41 Xkqw628RsEcm2U5ZszgTQbuThgoiB2gH3Csf+VQ/VpCFCVZ94QcjO2rb7rBSqemwEXQycRI xVuzYLoQSPVBC+DJP7fiA== X-UI-Out-Filterresults: notjunk:1;V03:K0:PW7kU/WbNdk=:Kvmxj0vUvx4PxV/Qub80P7 Y3lR0erxRPjRx06o7bucHjVHgIs+ymWq1+FvpQ9Y30c8bRgZEZ4CEtBbT0waj94uQfkltKRYW snFd0eH7iELC5KmHX+5H2CGxvMk796Suy7Ak7ckKwlOHYPSmnvdNH+X3DKiHVrBU52MiIE8LA CdF+EXErwXObmuHRrLwX6kd43Frr9AisXs2KWNlr+jotDfd68C/lzKKMZJhsrq0zPFfdGy3Qj WvNJndDahfxgcrSy3rjh0T2Oq8WkO8vS3U5XLIVGf9GbTOgiDmWwHXflwBS17lT0DP8HMduWV Tw+OzBEkvsG0wH+UthdHq6WiRa9Rbq1UP/JJNmiYIdCgme0Ihxq8FxunsjNzlPkO/j9coxvlj G+5LwODKCDX9uWamDXmA4bYWcejPxrIW2mUXJAFZHB23pGzb7NizUocz2WzFM5mERCgUwFaW6 17O1ba8HmEByQwdm8QKbmZ/pTD4DOKdfD2kFEEsR+0wNd0M5yVogNmtZbf0wfJi50zMAULLhY KZw9wffA7c8mnwjfQ4el9bk2VbfPowORZFepZ2HtbKHrOCpxx8A8i7FQ2iZMuGmBpf/fL6vUY Z9T4zZAzV+CIaHlPrQIJmECm2FZ9jMfXF9FRtjCdmmhatyqSHaLQkEE05ZuHW0g9wXg+FZj9N +6jmt+lWLe2ZjRvqxxEup2N9gEWJawRw50jivqVixtxLR9YFs3XzIIXQZDssKtpYV/Xg/2maa AD/k7HoxmBg/mrgSph9E49+elHwxQ+jgzNlWsFZbPEevmaydBxSGkPr9K5x78zikcTYdlSZa2 tguDrG0GkmOIrbGOK6F5P4czQHsUw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220915_043019_008789_DEE2E342 X-CRM114-Status: GOOD ( 29.35 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Maxime, Am 15.09.22 um 09:54 schrieb Maxime Ripard: > On Wed, Sep 14, 2022 at 08:26:55PM +0200, Stefan Wahren wrote: >> Am 14.09.22 um 20:14 schrieb Stephen Boyd: >>> Quoting Stefan Wahren (2022-09-14 11:09:04) >>>> Am 14.09.22 um 20:05 schrieb Stephen Boyd: >>>>> Quoting Stefan Wahren (2022-09-14 10:45:48) >>>>>> Am 14.09.22 um 17:50 schrieb Stephen Boyd: >>>>>>> Furthermore, I wonder if even that part needs to be implemented. Why >>>>>>> not make a direct call to rpi_firmware_property() and get the max rate? >>>>>>> All of that can live in the drm driver. Making it a generic API that >>>>>>> takes a 'struct clk' means that it looks like any clk can be passed, >>>>>>> when that isn't true. It would be better to restrict it to the one use >>>>>>> case so that the scope of the problem doesn't grow. I understand that it >>>>>>> duplicates a few lines of code, but that looks like a fair tradeoff vs. >>>>>>> exposing an API that can be used for other clks in the future. >>>>>> it would be nice to keep all the Rpi specific stuff out of the DRM >>>>>> driver, since there more users of it. >>>>> Instead of 'all' did you mean 'any'? >>>> yes >>> Why? >> This firmware is written specific for the Raspberry Pi and not stable from >> interface point of view. So i'm afraid that the DRM driver is only usable >> for the Raspberry Pi at the end with all these board specific dependencies. > I'm open for suggestions there, but is there any other bcm2711 device > that we support upstream? I meant the driver as a whole. According to the vc4 binding there are three compatibles bcm2835-vc4, cygnus-vc4 and bcm2711-vc5. Unfortunately i don't have access to any of these Cygnus boards, so i cannot do any regression tests or provide more information to your question. > If not, I'm not sure what the big deal is at this point. Chances are the > DRM driver won't work as is on a different board. > > Plus, such a board wouldn't be using config.txt at all, so this whole > dance to find what was enabled or not wouldn't be used at all. My concern is that we reach some point that we need to say this kernel version requires this firmware version. In the Raspberry Pi OS world this is not a problem, but not all distributions has this specific knowledge. > >> Emma invested a lot of time to make this open source and now it looks that >> like that more and more functionality moves back to firmware. > What functionality has been moved back to firmware? This wasn't a offense against your great work. Just a slight warning that some functions of clock or power management moved back into firmware. We should watch out, but maybe i emote here. > > Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel