drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 9 Nov 2023 10:25:41 +0000 (11:25 +0100)
committerSteven Price <steven.price@arm.com>
Fri, 10 Nov 2023 14:12:07 +0000 (14:12 +0000)
commit32f175d4261a2c940fe7913f509f9f41c105b2b6
treeceadbacd5f42ca920fe0d0e0b128b7da0c2615a2
parent56e76c0179185568049913257c18069293f8bde9
drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs

All of the MediaTek SoCs supported by Panfrost can switch the clocks
off and on during system sleep to save some power without any user
experience penalty.

Measurements taken on multiple MediaTek SoCs (MT8183/8186/8192/8195)
show that adding this will not prolong the time that is required to
resume the system in any meaningful way.

As an example, for MT8195 - a "before" with only runtime PM operations
(so, without turning on/off GPU clocks), and an "after" executing both
the system sleep .resume() handler and .runtime_resume() (so the time
refers to T_Resume + T_Runtime_Resume):

Average Panfrost-only system sleep resume time, before: ~28000ns
Average Panfrost-only system sleep resume time, after:  ~33500ns

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-5-angelogioacchino.delregno@collabora.com
drivers/gpu/drm/panfrost/panfrost_drv.c