Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 854947f3 authored by Matt Buckley's avatar Matt Buckley
Browse files

Add ADPF FMQ implementation for PerformanceHintManager

This patch adds an implementation for ADPF FMQ to the
PerformanceHintManager, along with tests and updates to the
HintManagerService to better handle FMQ configs without additional
event flags.

Flag: android.os.adpf_use_fmq_channel_fixed
Test: atest PerformanceHintNativeTestCases
Test: atest HintManagerServiceTest
Bug: 315894228

Change-Id: I2bb2ed7bf4f8e87520bdd9a20b7a7847ba0907eb
parent 502cec5a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ interface IHintManager {
     * if creation is supported but fails.
     */
    IHintSession createHintSessionWithConfig(in IBinder token, in int[] threadIds,
            in long durationNanos, in SessionTag tag, out @nullable SessionConfig config);
            in long durationNanos, in SessionTag tag, out SessionConfig config);

    /**
     * Get preferred rate limit in nanoseconds.
@@ -48,6 +48,6 @@ interface IHintManager {
     *
     * Throws IllegalStateException if FMQ channel creation fails.
     */
    ChannelConfig getSessionChannel(in IBinder token);
    @nullable ChannelConfig getSessionChannel(in IBinder token);
    oneway void closeSessionChannel();
}
+0 −8
Original line number Diff line number Diff line
@@ -114,14 +114,6 @@ flag {
    bug: "315894228"
}

flag {
    name: "adpf_fmq_eager_send"
    namespace: "game"
    description: "Guards the use of an eager-sending optimization in FMQ for low-latency messages"
    is_fixed_read_only: true
    bug: "315894228"
}

flag {
    name: "adpf_hwui_gpu"
    namespace: "game"
+1 −0
Original line number Diff line number Diff line
@@ -367,6 +367,7 @@ LIBANDROID_PLATFORM {
    APerformanceHint_sendHint;
    APerformanceHint_getThreadIds;
    APerformanceHint_createSessionInternal;
    APerformanceHint_setUseFMQForTesting;
    extern "C++" {
        ASurfaceControl_registerSurfaceStatsListener*;
        ASurfaceControl_unregisterSurfaceStatsListener*;
+288 −46

File changed.

Preview size limit exceeded, changes collapsed.

+5 −2
Original line number Diff line number Diff line
@@ -36,10 +36,13 @@ cc_test {
    srcs: ["PerformanceHintNativeTest.cpp"],

    shared_libs: [
        "android.hardware.common.fmq-V1-ndk",
        "libandroid",
        "liblog",
        "libbinder",
        "libbinder_ndk",
        "libcutils",
        "libfmq",
        "liblog",
        "libpowermanager",
        "libutils",
    ],
@@ -56,8 +59,8 @@ cc_test {
    ],

    cflags: [
        "-Werror",
        "-Wall",
        "-Werror",
    ],

    header_libs: [
Loading