Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7595101rwi; Mon, 24 Oct 2022 17:22:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56U6OEbeRUUEcfD92ZFo3Hw/nFh1bj5eaKPDnO0FzoGawhoekdd4J+ESzhzEZypV2s4THb X-Received: by 2002:a17:90b:4a47:b0:212:f7ef:1bd6 with SMTP id lb7-20020a17090b4a4700b00212f7ef1bd6mr12957979pjb.79.1666657328881; Mon, 24 Oct 2022 17:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666657328; cv=none; d=google.com; s=arc-20160816; b=EUQbFfJLUkKjpm0iCJUe7K2jTdes8pkP7ktH7/WODB8Bq2U8jZz+pScblsEJGLossv xiYj7rrWeWxTlKwdhMNP9DvE0VyZ8hhzAtxXYYMEBiawAFBN9l/4u+DLbVSXRHtoIHtK HUQCKLZvW+uQIhiym3OQiyENsZYZH6KmxIPqiDySMqhD2l6NpasxlXx4MqAPe2eFUD1j B8+UTpvEbps6KwBNN82+hDQYryA3q/0gos6SWtBKcnuKhQ4jE88q5fvT9mEIqd06zahj tS/ScIOKNmPKnFJKAEGahhOorrYFfipjIXQAzm4VsdEnspWNZrG6kbUjGl6QpBACvzyq ZKrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BzSJYeJmaTtTxu26Xk7PIR207/FtZbc1yEGzfOkJ+8U=; b=hKCiEpEHPSsUdIzi/9VFP9a5E0c1qgYwErls7RpgIcmaXFA3+dxHX6nMHDetD419Ne Z02enhdJiVg/K1MxW4Yr0C7MHAWp9M4L303LcltjBD4Cb1JO0szpeKEFFGffYpMZPNqw BIhASSmGxV7hXQQs64X9XiDUqRhqbhI8VmRtqoiBhX/TQ9HcRMXTQk/fd07VXjYs79yy G34DVwIR4Q9CYABl9mBVTc4hl4G57FjTNTtD1hnXoNKEGSxl3NxCzrUIxvlRuibJj/Ad VFzJoJ4LGnCDTT0OSXXMJuzHiieeCXYTJfgtUlwtzjkPxYqZm/Y8dSV4brl2SJfBGMMq eaig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AFR5IkY1; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj1-20020a17090b3e8100b0020f8385ca87si1757030pjb.94.2022.10.24.17.21.57; Mon, 24 Oct 2022 17:22:08 -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=@chromium.org header.s=google header.b=AFR5IkY1; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbiJXXj6 (ORCPT + 99 others); Mon, 24 Oct 2022 19:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbiJXXjb (ORCPT ); Mon, 24 Oct 2022 19:39:31 -0400 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23102317E3 for ; Mon, 24 Oct 2022 14:58:48 -0700 (PDT) Received: by mail-vs1-xe2e.google.com with SMTP id h3so9201673vsa.4 for ; Mon, 24 Oct 2022 14:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BzSJYeJmaTtTxu26Xk7PIR207/FtZbc1yEGzfOkJ+8U=; b=AFR5IkY1THjsaMBnZeQKwLYzIr9rrM6ni3gipAZKPDAEIe/ZGpVLpuD4pUFK0izrIU Iexsw5MQ6s8SqjK8P+TyE7pURsY+RfYmeh+5VhtJliGnTKLRWXxdcK3KfafIdF9EtDd5 3ONuGx+5L5V0soyNKdJYLdTlJvp3MlQxIyxms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BzSJYeJmaTtTxu26Xk7PIR207/FtZbc1yEGzfOkJ+8U=; b=Z/uYdEAiNMHL7VtoWTtZJ8BJspevAJqteTpZnRH+R0YxuQyF3nsjENw40mdQtKjZfc eIcbpibmFjSvy84++MKK1qatmehdMWOf7uWbQFQkIhLtemWjKb4K3luvkyl+W7TYWo32 5iQKJ2ulqrQlm6Hz4pX4LoeofJXQjER/YRAGPBRuQRNSX2dKGOTQW9A3Espwf7rjLXzy k5+q9k4HN8CkxDw0Ya5QV96mNTeoooGl++Uep47ELTeVLqRIxqeIUROHh/SsPBnBNKR1 x2AdoAMoWLW0UKq/d4sga3Y/FmQPSVeJzvhzN6ZU2O3Tf/vWlRk9k2sAfORZJHyI0PEi 8s/g== X-Gm-Message-State: ACrzQf1cKH9goGiMH8Js1PBILBu8Q1JHyvK6PQP/o8m5XdXYE8bnD4Iv 8K4Bc1v/ZQFyChlxn3Rk6exmskQ4W1O2ulx8JLGkxw== X-Received: by 2002:a05:6102:3a4d:b0:3aa:762:5933 with SMTP id c13-20020a0561023a4d00b003aa07625933mr9658131vsu.17.1666648719970; Mon, 24 Oct 2022 14:58:39 -0700 (PDT) MIME-Version: 1.0 References: <20221024102307.33722-1-angelogioacchino.delregno@collabora.com> <20221024102307.33722-3-angelogioacchino.delregno@collabora.com> In-Reply-To: <20221024102307.33722-3-angelogioacchino.delregno@collabora.com> From: Chen-Yu Tsai Date: Mon, 24 Oct 2022 14:58:29 -0700 Message-ID: Subject: Re: [PATCH 02/10] clk: mediatek: mt8186-topckgen: Drop flags for main/univpll fixed factors To: AngeloGioacchino Del Regno Cc: sboyd@kernel.org, mturquette@baylibre.com, matthias.bgg@gmail.com, miles.chen@mediatek.com, nfraprado@collabora.com, rex-bc.chen@mediatek.com, chun-jie.chen@mediatek.com, jose.exposito89@gmail.com, yangyingliang@huawei.com, msp@baylibre.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Mon, Oct 24, 2022 at 3:23 AM AngeloGioacchino Del Regno wrote: > > The mainpll and univpll clocks are used as clock sources for multiple > peripherals of different kind, some of which are critical (like AXIs); > a rate change on any of these two will produce a rate change on many > devices and that's likely to produce system instability if not done > correctly: this is the reason why we have "fixed factor" clocks, used > by MUX clocks to provide different rates based on PLL output dividers. > > Though, there's one fundamental issue that must be resolved somehow: > > When performing GPU DVFS, we get a rate request that will try to change > the frequency of MAINPLL due to the CLK_TOP_MFG mux having clk26m, > mfgpll (the GPU dedicated PLL), mainpll_d3, mainpll_d5 (fixed factor > dividers) as possible parents. > > In order to solve that, there are two ways: > 1. Add new "fake" mainpll_d3_fixed, mainpll_d5_fixed clocks, clones > of mainpll_d3, mainpll_d5 clocks, for the only purpose of not > declaring CLK_SET_RATE_PARENT; or > 2. Simply drop said flag from the original dividers. > > After some careful validation, I cannot see anything calling a rate > change request during runtime for MAINPLL, nor for UNIVPLL (which would, > again, mean that we're reclocking lots of peripherals at once!), so it > is safe *and sane* to simply remove the CLK_SET_RATE_PARENT flag to all > of the main/univpll fixed factor divider clocks. > > Besides, if for any (doubtful) reason main/univpll rate change will be > required in the future, it's still possible to call that on the PLL main > clocks, so we're still covered anyway. > > Signed-off-by: AngeloGioacchino Del Regno AFAIK this matches what we do for some other SoC families, so Reviewed-by: Chen-Yu Tsai