Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8277159rwn; Wed, 14 Sep 2022 11:42:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR5t5FLSsp61kCfDJkPJOfVlwWvV2d97DQslcREI1Vh15QwY3inw38ODpekFbAOalktKsdW9 X-Received: by 2002:a17:907:b04:b0:780:32ea:4fe with SMTP id h4-20020a1709070b0400b0078032ea04femr3148568ejl.452.1663180940903; Wed, 14 Sep 2022 11:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663180940; cv=none; d=google.com; s=arc-20160816; b=RJ3KOKHlrhRVKMP4u0OHsmdH4akQ5BNyvPjWrkUL+BzlM/1oG9LUZGdcMowmS+o5u1 lCeJ7B9mKGTtWitwwe6zB0FNtnURRNiHaJzLtvBHvGOmH3C6TIVXj7rrNmoa+RH8phhT tCbNgy2G1Vzs4motNBd49/RBi3p5fCnbWfOzOeiQ1CJI55H7oNuq2JIU76Y8K2QjtPyu Oyn6MVxfxpQbl6XD2/8r2t7/sFRH8GsgwwqpzAnKvxilZGtil3q2ZyQLl8suHXEppXOu agaQZGWNERnS3Z0f4lenPSN2djsMHgWX8f/dJMcQA/K5/A73sXr2uSfYrBi0M2msoAj7 u8Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=Zk2s5aDGw4LpRQmUD+4Ov+iB47L7yxrOpSI6tzx7nyE=; b=wNehYx2XO1VOxpSocEuTHUxbbjCwIBoJR4hX3ERVLl4YFiFm+Xr8ICy5IRmS4PEn3T vQ0/ZUsxiJI+l9tSg/vww3P1zgH1CbYUocptNmlPfjoBqZBAaMZvehBP3SfgBjBd8tcf neB97mNHakBPCzJ5qIr6muzuTrv5IEoLQWKfPy4BhCGwK2VRpTi8ax9njK0tCh6FdRUx 6PFhiG5SqIRP+IFwG3ZdZz9K7AyWppWLYYNShERclK2jQRhPfALGquXvJcVA9hjkq0yU wRI1MOwrzKzxuYYy+LUwoPo8P5yWsroSaI0sD2/Kqk6d4s3ga/8CnRF+tTpYMjo2w++m FwAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lMDyla8C; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id su14-20020a17090703ce00b00733b061e7bdsi10469626ejb.637.2022.09.14.11.41.55; Wed, 14 Sep 2022 11:42:20 -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=@kernel.org header.s=k20201202 header.b=lMDyla8C; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbiINSVE (ORCPT + 99 others); Wed, 14 Sep 2022 14:21:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiINSVD (ORCPT ); Wed, 14 Sep 2022 14:21:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC0F5E54B; Wed, 14 Sep 2022 11:21:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 47FCF61E90; Wed, 14 Sep 2022 18:21:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92286C433D6; Wed, 14 Sep 2022 18:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663179661; bh=0k1o6bRr+NEvKLRyyWRelzjtd4DFbk4nFQCS2HGUee4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=lMDyla8CGKj9lVQmz4y65wn+Av/UPaMz0rAPrKy4RNHqc+uRdnZW6zqNnYXqts19e rWykZtJthMqEb0j1UwnAnKPgUcyV0evqJ8WXnkDC5EWfcSYIXiWqc1Px7sq/8iQXN/ d/LJwkdiqVqQPI8Fr22/tXHHpxsXI+ye60PEgTWgtlEEcY7p0bTBxLH2LSsGGPvjJF ogplaJ0Ck88abKk/YDQpt2Y5W9jwft13EMM3ENV7GzrGiEOkc4QlpGhmLfDoCT0acw fXD2dVAQ54yzHBZAC65OwJ5cIXbJ0eupRlSzydszyFAizETOihaiizunruM1WZT117 oHK5jIztyc/4w== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: 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> Subject: Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum From: Stephen Boyd 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 To: Broadcom internal kernel review list , Daniel Vetter , David Airlie , Emma Anholt , Florian Fainelli , Maxime Ripard , Maxime Ripard , Michael Turquette , Ray Jui , Scott Branden , Stefan Wahren Date: Wed, 14 Sep 2022 11:20:59 -0700 User-Agent: alot/0.10 Message-Id: <20220914182101.92286C433D6@smtp.kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 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 rat= e? > >>> 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 v= s. > >>> 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. I'm almost certain we talked about this before.