Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp776698pxb; Fri, 22 Apr 2022 10:55:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSZGAzJ7EuINGZrLZ2P9/hg0nSlCMyfHg1VbfwA2A1RZaluJzPyyk5aPOBwopifzMvx1Ml X-Received: by 2002:a62:be14:0:b0:505:a43b:cf6e with SMTP id l20-20020a62be14000000b00505a43bcf6emr6143876pff.33.1650650150984; Fri, 22 Apr 2022 10:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650650150; cv=none; d=google.com; s=arc-20160816; b=B2gTYy3phjiGqxLA8gGrRmtuhgOQECIiTCpex1YM5CGKQWAa6+Bq+HKxXhL0NrBfjK dni8ECn0yPVsU9kb3ie9vMIf2cra3pJtbHc6PC9P1Ge5+eQRvxf0udP/naZRIq7YLG9Z GvZ8YFOjvbA05AGACQYmT48vZarsgmphZ+Prm7IuVIcBnuvCSQKf6xoXb3HMc8tfcJay Q8oU2sak8Vfvb5mwnIsKJofb1OO3ibOoWEoiYGvVrnv7uAOJpvf4agi8NZp0jmtx/Vef YpnUVTYpyre15LpbcvXWpLWYgd9yol3y/HVQQRmgErWB2iV6N3jnzGskqJrfTzCdXrV1 nYyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=AjgDpPskVV4R4Ry4hrbWpc/9hMmAwQ0eTwMouf2MnOU=; b=Taf3dy1GXyBAKoekzTKBAg7nEtC/CNbX5wdqkwkNZQhAXooWY/xqBWqQbb/RtgrfUC 1tch8egq6fnlRHQCJ98Cm5lMSnGmIJb9094cDieRd80IxqX7h1Au2clzCaoBYYIvYTjz JfEw9VXsMMA2e+dY/L+QvCM0gEuI+tlmtsXGGU8EoYB7K4xHOk6wJPlTciBBYrVgPYnC Q1ao7h/e2Y+IPlCLGObZBKDf/+iIN/dlnaTcOADJRDEjS6YMOftwtWH2c+vWncPIm8JE vTD7LTHZaxdsbEbpppUUrojqkHqQhGfeY64qzN5tp26aHrIl9FL9+DmdDJIi3JILnMwU MqHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=bMihXYjx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j34-20020a63fc22000000b0039dad7a82fdsi8832650pgi.632.2022.04.22.10.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:55:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=bMihXYjx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CED5C0E62; Fri, 22 Apr 2022 10:39:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357077AbiDSSag (ORCPT + 99 others); Tue, 19 Apr 2022 14:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357587AbiDSSXc (ORCPT ); Tue, 19 Apr 2022 14:23:32 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA4F94477E for ; Tue, 19 Apr 2022 11:16:37 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id md20-20020a17090b23d400b001cb70ef790dso2610011pjb.5 for ; Tue, 19 Apr 2022 11:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=AjgDpPskVV4R4Ry4hrbWpc/9hMmAwQ0eTwMouf2MnOU=; b=bMihXYjxDYd70FBAdkcUWSX+XlWzIAfBgJnYw0igXRFV+04YT4oMj+OjOTM2ojX4W9 GYMwFCZU1Xdt5BZHTbv+NmWWboVjFsrVaTtRXcXquMXtE2er7IqkVjMBBOBs6ZFROx1K cN5J3DB05qfDIzqnwP5O1+1DPUaGJQV6AyBLoyiOLvRbNcSQS3QiiYDnqLdgWGiDUCUS W5r14jEvv37KT53Roabxlk4ixJo7v1FMya2s0VY9D1HEtwlz3DsNCHsPx7u9jekYBzVs hZwkblG+Dl9GnFGir7Sr1y2O6tI5+nKUgBTdUrkm20VgY0lwgfwLyq59kXH5GSoVK05+ ItnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=AjgDpPskVV4R4Ry4hrbWpc/9hMmAwQ0eTwMouf2MnOU=; b=XH5ctznB+fEbwDOTr5KLF4QlFyTbCc2SvLE2i+n+xP/d5UHtygXcHaDcEk1v7xdZDw +Y3Baoyi7cZJ7xBaVvDGTnq14mtX5SAIlGfNXLf4rGrFPWQFM1jEmW9YNuUJP+DcE3CB DWPypSFAK2GRMvnEGwUdCkD1Bg8izqF6iRV0WJPiapc8CR8l4VV1L5OjvSZQ9G65DZFr Oq3cEApE283ytBfOMSZsNteKAUIRFyH0Yto3BoaHU+RqkNx/WYuNq48pdYQ9EmBWVc4m N4tLFUJSY7mu7/+SWIbYsgUJiCrQS+XeEtzw3dQvzWwv5rBogjsTb37ivUNKFpmLzA05 3Djg== X-Gm-Message-State: AOAM532MnlHFIj4X7tTrti+ztEx6lFNZagt1Dn0fxmhIMiqQthUrwnYG Rxffhy7lSHwWUbHfcwcL9zjaVZRN3dNqVo3e X-Received: by 2002:a17:902:bb94:b0:157:2ce:fac1 with SMTP id m20-20020a170902bb9400b0015702cefac1mr16955546pls.25.1650392196359; Tue, 19 Apr 2022 11:16:36 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id g12-20020a056a001a0c00b004e1307b249csm18036219pfv.69.2022.04.19.11.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 11:16:35 -0700 (PDT) From: Kevin Hilman To: Rex-BC Chen , rafael@kernel.org, viresh.kumar@linaro.org, robh+dt@kernel.org, krzk+dt@kernel.org Cc: matthias.bgg@gmail.com, jia-wei.chang@mediatek.com, roger.lu@mediatek.com, hsinyi@google.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH V2 13/15] cpufreq: mediatek: Link CCI device to CPU In-Reply-To: <3fc36d6b803ff3e1bef601839aaca3f4f03e62ad.camel@mediatek.com> References: <7hbkx3fiac.fsf@baylibre.com> <3fc36d6b803ff3e1bef601839aaca3f4f03e62ad.camel@mediatek.com> Date: Tue, 19 Apr 2022 11:16:35 -0700 Message-ID: <7hwnfldjlo.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Rex-BC Chen writes: > On Thu, 2022-04-14 at 14:48 -0700, Kevin Hilman wrote: [...] >> >> You explained this well, but it's still not an appropriate solution >> IMO, >> because you're still not setting the target that is requested by the >> CPUfreq core. >> >> The job of ->set_target() is to set the frequency *requested by >> CPUfreq >> core*. If you cannot do that, you should return failure. What you >> posted >> in the original patch and what you're proposing here is to ignore the >> frequency passed to ->set_target() and do something else. In the >> orignal patch, you propose do to nothing. Now, you're ignoring the >> target passed in and setting something else. In both cases, the >> CPUfreq >> core things you have successfuly set the frequency requested, but you >> have not. This means there's a mismatch between what the CPUfreq >> core & >> governer things the frequency is and what is actually set. *This* is >> the part that I think is wrong. >> >> Instead, the proper way of restricting available frequencies is to >> use >> governors or policies. This ensures that the core & governors are >> aligned with what the platform driver actually does. >> >> As I proposed earlier, I think a clean solution to this problem is to >> create a temporary policy at probe time that restricts the available >> OPPs based on what the current CCI freq/voltage are. Once CCI driver >> is >> loaded and working, this policy can be removed. >> >> Kevin >> >> > > Hello Kevin, > > In new proposal, we DO set the cpufreq passed by cpufreq core. > We just not set the corresponding voltage of target frequency which > is lookedup from opp table. OK, this makes more sense. I thought you were ignoring frequency change also. [...] > In summary, we think it's a proper solution to cover the situation > when cci is not probed. Yes, this is OK with me. > I think there is something to improve: > We can choose to lookup cci opp table using cci freq to determine > the voltage instead of voltage_on_boot. > But IMO, it's not neccessary to register cci opp table inside cpufreq > driver just for the short period. I agree. > Because I finish to prepare other patches and I think we also can > take a look at other patches which are including some cleanup, I will > send next version today. > If there is any concern and question, we can discuss in next version. OK, I'll have a closer look at the new version. Kevin