diff options
author | Akash Goel <akash.goel@arm.com> | 2022-01-07 16:10:56 +0000 |
---|---|---|
committer | Kevin DuBois <kevindubois@google.com> | 2022-02-14 21:23:59 +0000 |
commit | 378860272aef35e484ac7ceda499cbe04b0ad732 (patch) | |
tree | e60bd78cc81307f74cface746ad2fb24830ef8ff /mali_kbase/mali_kbase_config.h | |
parent | 00ebca600bb8f0bdc9c20847f2ba4c688812044a (diff) | |
download | gpu-378860272aef35e484ac7ceda499cbe04b0ad732.tar.gz |
GPUCORE-32478: Add support for Host based control of SC power rails
This commit adds support in Kbase & FW for Host based control of the
shader core power rails.
The power rails will be turned off when the GPU idle notification
is received and will be turned on before FW resumes the execution
on cores.
After turning off the power rails, Kbase will wait for the same idle
hysteresis time before triggering the power down of GPU, where CSGs
will be suspended and MCU will be halted.
A build time config option is added to enable the workaround in
Kbase code.
The corresponding changes required in firmware to support this
feature will be enabled at runtime, through the config entry
present in the FW image header, before the intial boot of firmware.
2 power management callbacks need to be implemented in the platform
specific file to turn on/off the shader core power rails.
FW binary based on 2f830d9d8ad7ad9dd661a047fd4a6e5695d46da2 (internal)
Bug: 201222260
Bug: 207028973
Provenance: collaborate.code.arm.com/#/c/3759
Test: feature under disabled flag.
Test: boots to home with additional fixes.
Change-Id: I2274575cd9648daeaee4a49146cf534650349bf1
Diffstat (limited to 'mali_kbase/mali_kbase_config.h')
-rw-r--r-- | mali_kbase/mali_kbase_config.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mali_kbase/mali_kbase_config.h b/mali_kbase/mali_kbase_config.h index f8d7945..9508dab 100644 --- a/mali_kbase/mali_kbase_config.h +++ b/mali_kbase/mali_kbase_config.h @@ -339,6 +339,24 @@ struct kbase_pm_callback_conf { * this feature. */ void (*power_runtime_gpu_active_callback)(struct kbase_device *kbdev); + +#ifdef CONFIG_MALI_HOST_CONTROLS_SC_RAILS + /* + * This callback will be invoked by the Kbase when GPU becomes active + * to turn on the shader core power rails. + * This callback is invoked from process context and the power rails + * must be turned on before the completion of callback. + */ + void (*power_on_sc_rails_callback)(struct kbase_device *kbdev); + + /* + * This callback will be invoked by the Kbase when GPU becomes idle + * to turn off the shader core power rails. + * This callback is invoked from process context and the power rails + * must be turned off before the completion of callback. + */ + void (*power_off_sc_rails_callback)(struct kbase_device *kbdev); +#endif }; /* struct kbase_gpu_clk_notifier_data - Data for clock rate change notifier. |