Merge "Add headroom window range and max tid cnt to support info" into main
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
index c90125c..d2fcae2 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
@@ -55,5 +55,10 @@
boolean isGpuSupported;
int cpuMinIntervalMillis;
int gpuMinIntervalMillis;
+ int cpuMinCalculationWindowMillis = 50;
+ int cpuMaxCalculationWindowMillis = 10000;
+ int gpuMinCalculationWindowMillis = 50;
+ int gpuMaxCalculationWindowMillis = 10000;
+ int cpuMaxTidCount = 5;
}
}
diff --git a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
index fab8f43..83a46ae 100644
--- a/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
+++ b/power/aidl/android/hardware/power/CpuHeadroomParams.aidl
@@ -35,9 +35,8 @@
CalculationType calculationType = CalculationType.MIN;
/**
- * The calculation rolling window size in milliseconds.
- * The device should support a superset of [50, 10000] and try to use the closest feasible
- * window size to the provided value param.
+ * The device should support the range specified in SupportInfo#HeadroomSupportInfo and try to
+ * use the closest feasible window size to the provided value param.
*/
int calculationWindowMillis = 1000;
@@ -50,6 +49,8 @@
* This should handle all the cases including but not limited to core affinity and app cpuset
* that change the available CPU cores for the caller. And the HAL should check that the TIDs
* have the same core affinity.
+ *
+ * The device should support the maximum TID count specified SupportInfo#HeadroomSupportInfo.
*/
int[] tids;
}
diff --git a/power/aidl/android/hardware/power/GpuHeadroomParams.aidl b/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
index 68848d8..2d64bd3 100644
--- a/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
+++ b/power/aidl/android/hardware/power/GpuHeadroomParams.aidl
@@ -35,8 +35,8 @@
CalculationType calculationType = CalculationType.MIN;
/**
- * The device should support a superset of [50, 10000] and try to use the closest feasible
- * window size to the provided value param.
+ * The device should support the range specified in SupportInfo#HeadroomSupportInfo and try to
+ * use the closest feasible window size to the provided value param.
*/
int calculationWindowMillis = 1000;
}
diff --git a/power/aidl/android/hardware/power/SupportInfo.aidl b/power/aidl/android/hardware/power/SupportInfo.aidl
index 55287cb..011dc18 100644
--- a/power/aidl/android/hardware/power/SupportInfo.aidl
+++ b/power/aidl/android/hardware/power/SupportInfo.aidl
@@ -139,5 +139,39 @@
* than the interval.
*/
int gpuMinIntervalMillis;
+
+ /**
+ * Minimum calculation window size for getCpuHeadroom in milliseconds.
+ *
+ * This should be no larger than 50ms.
+ */
+ int cpuMinCalculationWindowMillis = 50;
+
+ /**
+ * Maximum calculation window size for getCpuHeadroom in milliseconds.
+ *
+ * This should be no smaller than 10000ms.
+ */
+ int cpuMaxCalculationWindowMillis = 10000;
+
+ /**
+ * Minimum calculation window size for getGpuHeadroom in milliseconds.
+ *
+ * This should be no larger than 50ms.
+ */
+ int gpuMinCalculationWindowMillis = 50;
+
+ /**
+ * Maximum calculation window size for getGpuHeadroom in milliseconds.
+ *
+ * This should be no smaller than 10000ms.
+ */
+ int gpuMaxCalculationWindowMillis = 10000;
+
+ /**
+ * Maximum number of TIDs this device can support.
+ * This should be no smaller than 5.
+ */
+ int cpuMaxTidCount = 5;
}
}