Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp397249rwn; Wed, 14 Sep 2022 23:44:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5F3z/7DcvkBDnnIMx2HtYAVjOA/0DEKH5fcnBKuKrHdnXBmNdgb5HGGvMNY84CK5e/OphE X-Received: by 2002:a17:902:82c8:b0:177:e4c7:e8a6 with SMTP id u8-20020a17090282c800b00177e4c7e8a6mr2871297plz.130.1663224281823; Wed, 14 Sep 2022 23:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663224281; cv=none; d=google.com; s=arc-20160816; b=Pb323jYkBX93/Bmii7Qa0ZuUcUiJW7X9Mswrn/ENCuKut63NzQulMrp8DlefNEiHzH TLJGTfnDanQxT/VOyXebCrJmDH7RM0LYHDjgLyMgj1SV/mZ+Qn2EG1q/51aR1qZ6ufIk 5b3riNWetl3czsd1iYGn+Wji7mn8nvhlMjJxdog5rJb/JtuidJ5yklsWknDgt40aT2Ne F1kwUXcqeL9nLsRMv9vDu+9XxY5iSWIxdpjau5cfG6XvTC5mSXNgaSochU5ecOJZ1WMw 08l0rQozxuIr9joqalYVYbDRGIg4JmVw75ahtrwYJu01u/Tyh8+EVQMAHl7wv6QF9MhQ Qo3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=BEwI39Dne0jgJFIAQ9YvqsWBdmz6p/P8UtoVh+S5qtY=; b=t38EaiGHQJMcYe7vSGOJYk2fUuXh9Sdf3gxj1o4JopJtiw3hygsVn2c6iWcliAJhSD +cY0e4Q15P5SRTybXUJlOCpvdwy8mYBAQ6R9Z2er6dxwDbKvUstJs9a/BdqrHPVIEF28 UGzxQNR7bZQIkjakU+zG74u6FGSTLUrwsX4lHeERODtLosRdGi4HqAKqSa2m9gqudyW8 W2sL8rw1mpg20HrI6/BnownA4VLt2hRTLRfzrSZ1IlLE4qbb+bZXpc+d/dSgjX40hkp9 xG3TPb0klYg8tqgb5iFmAMeECTYvQGOjLHES/yNx/ioeE65k/B5zpu5BNVx9SqU/VdpU J9rQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020a1709028ec300b00172dd2494cfsi16482876plo.103.2022.09.14.23.44.30; Wed, 14 Sep 2022 23:44:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbiIOGQU (ORCPT + 99 others); Thu, 15 Sep 2022 02:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbiIOGQR (ORCPT ); Thu, 15 Sep 2022 02:16:17 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E5C923D1; Wed, 14 Sep 2022 23:16:16 -0700 (PDT) Received: from [192.168.1.138] ([37.4.248.23]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MKc0o-1otYR01EL6-00Kxco; Thu, 15 Sep 2022 08:15:50 +0200 Message-ID: <5b64f4ef-a62e-80df-80a6-3ab52589588b@i2se.com> Date: Thu, 15 Sep 2022 08:15:48 +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: Stephen Boyd , Broadcom internal kernel review list , Daniel Vetter , David Airlie , Emma Anholt , Florian Fainelli , Maxime Ripard , Maxime Ripard , Michael Turquette , Ray Jui , Scott Branden Cc: 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> <20220914182101.92286C433D6@smtp.kernel.org> From: Stefan Wahren In-Reply-To: <20220914182101.92286C433D6@smtp.kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:73zk18NJSgeRmQb2Le65uElTFxV3rTYUitHoBJvve+UbuXV4Lq/ 85iX824f09JsP5yFcmk4/RIlNWFowhB/BncseVNTc6qrcF8txSpdtPq8u5IZ7sCxMfBxpN6 z0dLdnnRVvhA/8kB41r59RcxfVXw6/fGOAbNnGJw/IZ/o+uELNlnhR6DZZgaOu/RLBvfDUW 8AOLcw+RuwLR7iUjhmH9g== X-UI-Out-Filterresults: notjunk:1;V03:K0:WMDYiwxPIpk=:xpy+5yMq1PfEjq9b17sO70 q7hFz/LlwEwfONudWfiLk/MW8KhokFIf+78te2ULq+n3phlE6U5SHyACBF2ABwWNd8ZAQ2Yx+ cK8QxpBeYM65D0bSJvAtibGdbWB1vQMEsbDcOo/YRRMOLibpdUaWJOv4FoZ3DuEag1C2TnJtQ d8bVQRCor/lCyISpxl/+GKDdVUeGdSOig6YKkZ5QDq+5pbqP1c5uWXKM3vjhjU9Fbec0WKXib gK4kJi/avNqHK/Mvd+vTZ+Lm/lLykciLtydrkKoUeF+/Ap37BSB1e7Be9+unCpbXtVNJTAVx+ JBdcpCJ8yB3d401FJpYKRBva4gKlTAr+KNSq59+rgvigiUHKWvpmdGyxPqfkSGQmJhIFhgsam SNV9gYv2kySJkBk89jeN41NB6Zw8VYuUc3WrRLJHuXyTARFK5RyhA6ZjzlvoeALAEIas7AQiu tKVJEjyVbdHjhu4RJ14tkyhuOLDJ/oKngCV0U2QnDSnOi4hnJmKnePBF2MBifGlXfJcR2HPXG Q7tY41DwYj0OLlrLp5CvnokoM0yP1Tvyp9vL6rfGb8Iwul/K7efzKMEg0auMAXWrJxeXoIVeq ngJBi5FG5ZZ3Lrp0CtQ5h5yUc9QH0StRMiPYA35jiBhqZap/wjfd/drzl+VuDoD5IUsx6d6Li zOBzj5zbya2mJdjpxHg4RV+S9rdoadp7w3WZFuocPeVfWUXDg5Cyb1zSJblhH1V+nk3KVTAo2 8/e1GxDdwZLxHT7BMuV4FrF6AuJKFU2JoH6DWP4GVWGRxVRYQR8RdY2zNeFA/a34Scn58gY8M +vS0GCVJETNnb4HXnOK3fpeQF8ANg== X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, Am 14.09.22 um 20:20 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 > Another idea is to populate an OPP table in the rpi firmware driver for > this platform device with the adjusted max frequency. That would be an > SoC/firmware agnostic interface that expresses the constraints. Do you mean in the source code of this driver or in the DT? > I'm > almost certain we talked about this before. I'm not sure about the context. Do you mean the CPU frequency handling? I remember it was a hard decision. In the end it was little benefit but a lot of disadvantages (hard to maintain all theses OPP tables for all Raspberry Pi boards, doesn't work with already deployed DT). So yes, i'm part of the problem i mentioned before ;-)