[0/2] MT8195 Cherry: Assign MFG vregs for power saving

Message ID 20231030132523.86123-1-angelogioacchino.delregno@collabora.com
Headers
Series MT8195 Cherry: Assign MFG vregs for power saving |

Message

AngeloGioacchino Del Regno Oct. 30, 2023, 1:25 p.m. UTC
  This series assigns the right regulators to MFG0 and MFG1, respectively
VGPU (GPU Core) and VSRAM_OTHERS (GPU SRAM), and removes the property
regulator-always-on from both.

This allows to save power both during runtime suspend and during system
sleep; specifically because:
 1. The GPU SRAM regulator is switched off during runtime suspend
 2. The GPU Core regulator is switched off during system sleep

Of course, in order for those power saving actions to actually take
place, it is required to also have the code in [1].
Anyway, even without series [1], this will not introduce any unstability
as the Vgpu regulator will simply not ever get turned off.

[1]: https://lore.kernel.org/r/20231030132257.85379-1-angelogioacchino.delregno@collabora.com

AngeloGioacchino Del Regno (2):
  arm64: dts: mediatek: mt8195-cherry: Add MFG0 domain supply
  arm64: dts: mediatek: mt8195-cherry: Assign sram supply to MFG1 pd

 arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 10 ++++++++--
 arch/arm64/boot/dts/mediatek/mt8195.dtsi        |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)
  

Comments

Chen-Yu Tsai Oct. 31, 2023, 9:19 a.m. UTC | #1
On Mon, Oct 30, 2023 at 9:25 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> This series assigns the right regulators to MFG0 and MFG1, respectively
> VGPU (GPU Core) and VSRAM_OTHERS (GPU SRAM), and removes the property
> regulator-always-on from both.
>
> This allows to save power both during runtime suspend and during system
> sleep; specifically because:
>  1. The GPU SRAM regulator is switched off during runtime suspend
>  2. The GPU Core regulator is switched off during system sleep
>
> Of course, in order for those power saving actions to actually take
> place, it is required to also have the code in [1].
> Anyway, even without series [1], this will not introduce any unstability
> as the Vgpu regulator will simply not ever get turned off.
>
> [1]: https://lore.kernel.org/r/20231030132257.85379-1-angelogioacchino.delregno@collabora.com
>
> AngeloGioacchino Del Regno (2):
>   arm64: dts: mediatek: mt8195-cherry: Add MFG0 domain supply
>   arm64: dts: mediatek: mt8195-cherry: Assign sram supply to MFG1 pd

Tested-by: Chen-Yu Tsai <wenst@chromium.org>

on Tomato without the power saving patches. Regulators are correctly
requested and I can see the SRAM regulator get turned on and off with
GPU usage.
  
AngeloGioacchino Del Regno Oct. 31, 2023, 1:16 p.m. UTC | #2
Il 31/10/23 10:19, Chen-Yu Tsai ha scritto:
> On Mon, Oct 30, 2023 at 9:25 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> This series assigns the right regulators to MFG0 and MFG1, respectively
>> VGPU (GPU Core) and VSRAM_OTHERS (GPU SRAM), and removes the property
>> regulator-always-on from both.
>>
>> This allows to save power both during runtime suspend and during system
>> sleep; specifically because:
>>   1. The GPU SRAM regulator is switched off during runtime suspend
>>   2. The GPU Core regulator is switched off during system sleep
>>
>> Of course, in order for those power saving actions to actually take
>> place, it is required to also have the code in [1].
>> Anyway, even without series [1], this will not introduce any unstability
>> as the Vgpu regulator will simply not ever get turned off.
>>
>> [1]: https://lore.kernel.org/r/20231030132257.85379-1-angelogioacchino.delregno@collabora.com
>>
>> AngeloGioacchino Del Regno (2):
>>    arm64: dts: mediatek: mt8195-cherry: Add MFG0 domain supply
>>    arm64: dts: mediatek: mt8195-cherry: Assign sram supply to MFG1 pd
> 
> Tested-by: Chen-Yu Tsai <wenst@chromium.org>
> 
> on Tomato without the power saving patches. Regulators are correctly
> requested and I can see the SRAM regulator get turned on and off with
> GPU usage.

Yes, I confirm that the sram vreg going on/off is expected even without the power
saving patches (as the power domain refcount decreases during runtime suspend).

Thanks!

Angelo