Skip to content

Commit f5857aa

Browse files
author
Android Build Coastguard Worker
committed
Snap for 12755599 from fe91b55 to 25Q1-release
Change-Id: I42353197dc31c9b5a9903396cc166948c2bd2336
2 parents 69c85a2 + fe91b55 commit f5857aa

13 files changed

Lines changed: 155 additions & 78 deletions

File tree

include/android/performance_hint.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,31 @@ int APerformanceHint_notifyWorkloadReset(
358358
APerformanceHintSession* _Nonnull session,
359359
bool cpu, bool gpu, const char* _Nonnull debugName) __INTRODUCED_IN(36);
360360

361+
/**
362+
* Informs the framework of an upcoming one-off expensive frame for a graphics pipeline
363+
* bound to this session. This frame will be treated as not representative of the workload as a
364+
* whole, and it will be discarded the purposes of load tracking. The user can specify
365+
* whether the workload spike is expected to be on the CPU, GPU, or both.
366+
*
367+
* Sending hints for both CPU and GPU counts as two separate hints for the purposes of the
368+
* rate limiter.
369+
*
370+
* @param cpu Indicates if the workload spike is expected to affect the CPU.
371+
* @param gpu Indicates if the workload spike is expected to affect the GPU.
372+
* @param debugName A required string used to identify this specific hint during
373+
* tracing. This debug string will only be held for the duration of the
374+
* method, and can be safely discarded after.
375+
*
376+
* @return 0 on success.
377+
* EINVAL if no hints were requested.
378+
* EBUSY if the hint was rate limited.
379+
* EPIPE if communication with the system service has failed.
380+
* ENOTSUP if the hint is not supported.
381+
*/
382+
int APerformanceHint_notifyWorkloadSpike(
383+
APerformanceHintSession* _Nonnull session,
384+
bool cpu, bool gpu, const char* _Nonnull debugName) __INTRODUCED_IN(36);
385+
361386
/**
362387
* Associates a session with any {@link ASurfaceControl} or {@link ANativeWindow}
363388
* instances managed by this session.

include/private/performance_hint_private.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ enum SessionHint: int32_t {
7474
* baseline to prepare for an arbitrary load, and must wake up if inactive.
7575
*/
7676
GPU_LOAD_RESET = 7,
77+
78+
/**
79+
* This hint indicates an upcoming CPU workload that is abnormally large and
80+
* not representative of the workload. This should be used for rare, one-time
81+
* operations and should be ignored by any load tracking or session hysteresis.
82+
*/
83+
CPU_LOAD_SPIKE = 8,
84+
85+
/**
86+
* This hint indicates an upcoming GPU workload that is abnormally large and
87+
* not representative of the workload. This should be used for rare, one-time
88+
* operations and should be ignored by any load tracking or session hysteresis.
89+
*/
90+
GPU_LOAD_SPIKE = 9,
7791
};
7892

7993
// Allows access to PowerHAL's SessionTags without needing to import its AIDL

libs/gui/tests/EndToEndNativeInputTest.cpp

Lines changed: 87 additions & 64 deletions
Large diffs are not rendered by default.

libs/gui/tests/FrameRateUtilsTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ TEST(FrameRateUtilsTest, ValidateFrameRate) {
6262
// Invalid compatibility.
6363
EXPECT_FALSE(
6464
ValidateFrameRate(60.0f, -1, ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, ""));
65-
EXPECT_FALSE(ValidateFrameRate(60.0f, 2, ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, ""));
65+
EXPECT_FALSE(ValidateFrameRate(60.0f, 3, ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, ""));
6666

6767
// Invalid change frame rate strategy.
6868
if (flags::bq_setframerate()) {

services/sensorservice/Android.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ cc_library {
9292
"libaidlcommonsupport",
9393
"android.hardware.sensors@1.0-convert",
9494
"android.hardware.sensors-V1-convert",
95-
"android.hardware.sensors-V2-ndk",
95+
"android.hardware.sensors-V3-ndk",
9696
"sensorservice_flags_c_lib",
9797
],
9898

services/sensorservice/aidl/Android.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cc_library {
2828
"libbinder_ndk",
2929
"libsensor",
3030
"android.frameworks.sensorservice-V1-ndk",
31-
"android.hardware.sensors-V2-ndk",
31+
"android.hardware.sensors-V3-ndk",
3232
],
3333
export_include_dirs: [
3434
"include/",

services/sensorservice/aidl/fuzzer/Android.bp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cc_fuzz {
2020
"android.companion.virtual.virtualdevice_aidl-cpp",
2121
"android.frameworks.sensorservice-V1-ndk",
2222
"android.hardware.sensors-V1-convert",
23-
"android.hardware.sensors-V2-ndk",
23+
"android.hardware.sensors-V3-ndk",
2424
"android.hardware.common-V2-ndk",
2525
"libsensor",
2626
"libfakeservicemanager",

services/surfaceflinger/common/Android.bp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cc_library_static {
3838
],
3939
static_libs: [
4040
"libsurfaceflingerflags",
41+
"aconfig_hardware_flags_c_lib",
4142
"android.os.flags-aconfig-cc",
4243
"android.server.display.flags-aconfig-cc",
4344
"libguiflags_no_apex",
@@ -51,6 +52,7 @@ cc_library_static {
5152
],
5253
static_libs: [
5354
"libsurfaceflingerflags_test",
55+
"aconfig_hardware_flags_c_lib",
5456
"android.os.flags-aconfig-cc-test",
5557
"android.server.display.flags-aconfig-cc",
5658
"libguiflags_no_apex",
@@ -67,6 +69,7 @@ cc_defaults {
6769
static_libs: [
6870
"libsurfaceflinger_common",
6971
"libsurfaceflingerflags",
72+
"aconfig_hardware_flags_c_lib",
7073
"android.os.flags-aconfig-cc",
7174
"android.server.display.flags-aconfig-cc",
7275
"libguiflags_no_apex",
@@ -83,6 +86,7 @@ cc_defaults {
8386
static_libs: [
8487
"libsurfaceflinger_common_test",
8588
"libsurfaceflingerflags_test",
89+
"aconfig_hardware_flags_c_lib",
8690
"android.os.flags-aconfig-cc-test",
8791
"android.server.display.flags-aconfig-cc",
8892
"libguiflags_no_apex",

services/surfaceflinger/common/FlagManager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <cinttypes>
2828

2929
#include <android_os.h>
30+
#include <android_hardware_flags.h>
3031
#include <com_android_graphics_libgui_flags.h>
3132
#include <com_android_graphics_surfaceflinger_flags.h>
3233
#include <com_android_server_display_feature_flags.h>
@@ -279,5 +280,6 @@ FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(idle_screen_refresh_rate_timeout, "",
279280
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(adpf_use_fmq_channel_fixed, "", android::os)
280281
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(trace_frame_rate_override, "",
281282
com::android::graphics::libgui::flags);
282-
283+
FLAG_MANAGER_ACONFIG_FLAG_IMPORTED(luts_api, "",
284+
android::hardware::flags);
283285
} // namespace android

services/surfaceflinger/common/include/common/FlagManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class FlagManager {
102102
bool deprecate_frame_tracker() const;
103103
bool skip_invisible_windows_in_input() const;
104104
bool begone_bright_hlg() const;
105+
bool luts_api() const;
105106

106107
protected:
107108
// overridden for unit tests

0 commit comments

Comments
 (0)