Add GRAPHICS_PIPELINE session mode
This patch adds a new performance hint session mode,
GRAPHICS_PIPELINE, indicating that the threads associated with
this hint session is of graphics pipeline, namely on critical path.
This session mode allows HAL to know that these threads are of higher
priority and can schedule CPU resources accordingly.
Bug: 362801903
Bug: 367803904
Test: atest HintManagerServiceTest
atest PerformanceHintNativeTest
Flag: EXEMPT_NDK
Change-Id: I164b2e29de79bbe27c14358924cb421457831325
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
index d0ae0ba..ffa790d 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionMode.aidl
@@ -35,4 +35,5 @@
@Backing(type="int") @VintfStability
enum SessionMode {
POWER_EFFICIENCY,
+ GRAPHICS_PIPELINE,
}
diff --git a/power/aidl/android/hardware/power/SessionMode.aidl b/power/aidl/android/hardware/power/SessionMode.aidl
index f1ee64e..3d5a76f 100644
--- a/power/aidl/android/hardware/power/SessionMode.aidl
+++ b/power/aidl/android/hardware/power/SessionMode.aidl
@@ -25,4 +25,11 @@
* and can be safely scheduled to prefer power efficiency.
*/
POWER_EFFICIENCY,
+
+ /**
+ * This mode indicates that the threads associated with this hint session
+ * are part of the graphics pipeline, implying that they are on a critical path
+ * which will be called of higher priority in terms of CPU resources and scheduling.
+ */
+ GRAPHICS_PIPELINE,
}