Re: [PATCH] powercap: DTPM: Fix unneeded conversion to micro-Watts

From: Lukasz Luba
Date: Tue Nov 28 2023 - 09:23:44 EST




On 11/28/23 14:17, Rafael J. Wysocki wrote:
On Mon, Nov 27, 2023 at 10:27 AM Lukasz Luba <lukasz.luba@xxxxxxx> wrote:

The Power values coming from the Energy Model are already in uW.
The PowerCap and DTPM framework operate on uW, thus all places should
just use the values from EM. Fix the code which left and still does
the unneeded conversion.

Fixes: ae6ccaa65038 (PM: EM: convert power field to micro-Watts precision and align drivers)
Cc: <stable@xxxxxxxxxxxxxxx> # v5.19+
Signed-off-by: Lukasz Luba <lukasz.luba@xxxxxxx>
---
Hi Daniel,

I have found an issue due to the uW in the EM. My apologies for that.

No need to apologize, you are making the code better.

I apologize because I introduced this uW change in the EM fwk :)
although I missed those DTPM bits which are now fixed.

Daniel told me last week that I can easily test the DTPM using
the rockpi code (because it was a pain for me in some hacks
trying to test DTPM).


I have check those with the Rockpi dev board with your DTPM module there.
BTW, if you like to check the DTPM_devfreq there, you can apply that
patch. It should create EM for your GPU there and setup DTPM GPU:
https://lore.kernel.org/all/20231127081511.1911706-1-lukasz.luba@xxxxxxx/


[snip]


Applied as 6.7-rc material, thanks!

thanks Rafael!