From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E15F52AD2C; Tue, 26 Mar 2024 20:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711483987; cv=none; b=PkxhFweHqwerDMIEI4e23/lIe8ll35uzpMLDvg54lLBtcTC8XLmZqMVutzXjzITJAFzLvp7Zss5rO1FTEaxaSbtFlNyWhJWz9Vyc2R26CG7VbpPHy+MFaKBLb3PgR6ziHxyWfQg2+2tG03Hb6Vfer3ZGtnFB/cLfdRamqDlTGEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711483987; c=relaxed/simple; bh=ONqS7vCsZDHAZUJpV/vbCQilzEFVRm30lbCcXCOG7dk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ai19z0nusk4Eex1ZGmcUuJ7gNCZ1DYke5VMxCm5iq7vKCPsg+AyiT/9/FKasZerCjUPMJZwsKmd6BEYR9tgkzsyF3jwMLlyHAJn5qSXVrG3jgNBzmgZrraaQI18Mc8pbgBpyiOwWU6Y6OdKiENQI7W7wZUEAnEWyo6WQNzh2uY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8E7C52F4; Tue, 26 Mar 2024 13:13:36 -0700 (PDT) Received: from [10.57.71.219] (unknown [10.57.71.219]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99A983F64C; Tue, 26 Mar 2024 13:13:00 -0700 (PDT) Message-ID: Date: Tue, 26 Mar 2024 20:12:59 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND][PATCH v2 4/4] soc: samsung: exynos-asv: Update Energy Model after adjusting voltage Content-Language: en-US To: Dietmar Eggemann Cc: linux-arm-kernel@lists.infradead.org, sboyd@kernel.org, nm@ti.com, linux-samsung-soc@vger.kernel.org, daniel.lezcano@linaro.org, rafael@kernel.org, viresh.kumar@linaro.org, krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, m.szyprowski@samsung.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20240322110850.77086-1-lukasz.luba@arm.com> <20240322110850.77086-5-lukasz.luba@arm.com> <59d37960-cf19-4b10-802f-59d42496c133@arm.com> From: Lukasz Luba In-Reply-To: <59d37960-cf19-4b10-802f-59d42496c133@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Dietmar, On 3/26/24 11:20, Dietmar Eggemann wrote: > On 22/03/2024 12:08, Lukasz Luba wrote: > > [...] > >> @@ -97,9 +98,17 @@ static int exynos_asv_update_opps(struct exynos_asv *asv) >> last_opp_table = opp_table; >> >> ret = exynos_asv_update_cpu_opps(asv, cpu); >> - if (ret < 0) >> + if (!ret) { >> + /* >> + * When the voltage for OPPs successfully >> + * changed, update the EM power values to >> + * reflect the reality and not use stale data > > At this point, can we really say that the voltage has changed? > > exynos_asv_update_cpu_opps() > > ... > ret = dev_pm_opp_adjust_voltage() > if (!ret) > em_dev_update_chip_binning() > ... > > dev_pm_opp_adjust_voltage() also returns 0 when the voltage value stays > the same? > > [...] The comment for the dev_pm_opp_adjust_voltage() says that it returns 0 if no modification was done or modification was successful. So I cannot distinguish in that driver code, but also there is no additional need to do it IMO (even framework doesn't do this). Regards, Lukasz [1] https://elixir.bootlin.com/linux/v6.9-rc1/source/drivers/opp/core.c#L2950 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 BFD96C54E67 for ; Tue, 26 Mar 2024 20:13:30 +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=rScnoUwUaSUQgEpYZptbqvj08yq/6nHW4z3VWctFD7E=; b=4LY61VnTubMihK OaBJ0Mb1KuoYSxD8mOjuBqJUq/xhlSpcCxzEhateCUU1o7FbuY1XGt+KnqyaLgma3CNQ2/zaYlk5J wafphoodGIDMqkSwN2tbZF2FX00ewVOz5wqQ/r49tvhjySYhUP1t1syJwvGBMWuCAB194EZZ7nG8c MzlGF5iPbcUJ89HyZsfQYKFeThUFIlVuQh/rmJTV25VDp0pE6BKibDD3uKdvy/WBnofNcbFniDV58 NqLBfVUuWs+VAaD+qXxL7j8jzDMQc1hNv/LGc1LvjE7h30Xlh2Ko2ul+9DDN0B1FCb3lCmVMywxO3 wa9H9LXQFpYj3Y/DVwig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpDAc-00000006Hqk-3Ubm; Tue, 26 Mar 2024 20:13:18 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpDAT-00000006Hme-3GHW for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 20:13:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8E7C52F4; Tue, 26 Mar 2024 13:13:36 -0700 (PDT) Received: from [10.57.71.219] (unknown [10.57.71.219]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 99A983F64C; Tue, 26 Mar 2024 13:13:00 -0700 (PDT) Message-ID: Date: Tue, 26 Mar 2024 20:12:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND][PATCH v2 4/4] soc: samsung: exynos-asv: Update Energy Model after adjusting voltage Content-Language: en-US To: Dietmar Eggemann Cc: linux-arm-kernel@lists.infradead.org, sboyd@kernel.org, nm@ti.com, linux-samsung-soc@vger.kernel.org, daniel.lezcano@linaro.org, rafael@kernel.org, viresh.kumar@linaro.org, krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, m.szyprowski@samsung.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20240322110850.77086-1-lukasz.luba@arm.com> <20240322110850.77086-5-lukasz.luba@arm.com> <59d37960-cf19-4b10-802f-59d42496c133@arm.com> From: Lukasz Luba In-Reply-To: <59d37960-cf19-4b10-802f-59d42496c133@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_131315_006593_191441E4 X-CRM114-Status: GOOD ( 13.16 ) 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 Dietmar, On 3/26/24 11:20, Dietmar Eggemann wrote: > On 22/03/2024 12:08, Lukasz Luba wrote: > > [...] > >> @@ -97,9 +98,17 @@ static int exynos_asv_update_opps(struct exynos_asv *asv) >> last_opp_table = opp_table; >> >> ret = exynos_asv_update_cpu_opps(asv, cpu); >> - if (ret < 0) >> + if (!ret) { >> + /* >> + * When the voltage for OPPs successfully >> + * changed, update the EM power values to >> + * reflect the reality and not use stale data > > At this point, can we really say that the voltage has changed? > > exynos_asv_update_cpu_opps() > > ... > ret = dev_pm_opp_adjust_voltage() > if (!ret) > em_dev_update_chip_binning() > ... > > dev_pm_opp_adjust_voltage() also returns 0 when the voltage value stays > the same? > > [...] The comment for the dev_pm_opp_adjust_voltage() says that it returns 0 if no modification was done or modification was successful. So I cannot distinguish in that driver code, but also there is no additional need to do it IMO (even framework doesn't do this). Regards, Lukasz [1] https://elixir.bootlin.com/linux/v6.9-rc1/source/drivers/opp/core.c#L2950 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel