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

Commit 5010ef13 authored by Matt Buckley's avatar Matt Buckley
Browse files

Add CPU/GPU_LOAD_SPIKE hints for one-off expensive workloads

Currently there is ambiguity between single-frame expensive ops
(eg: shader compilation) and longer-duration expensive ops (eg:
SF client compositon). This load hint aims to resolve this by
explicitly annotating one-time expensive workloads so they can
be given unique boost and hysteresis expectations.

For example, a load_spike aware tracker might want to ignore
the timing that comes from a LOAD_SPIKE-marked frame, as it is
known to not be representative of the overall workload.

Flag: EXEMPT HAL interface change
Test: atest libadpf_test
Test: atest VtsHalPowerTargetTest
Bug: 367803904

Change-Id: Ifaa5437be4477991cf5a6374acaf500c8aeef3ab
parent 54f806e4
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -42,4 +42,6 @@ enum SessionHint {
  GPU_LOAD_UP = 5,
  GPU_LOAD_UP = 5,
  GPU_LOAD_DOWN = 6,
  GPU_LOAD_DOWN = 6,
  GPU_LOAD_RESET = 7,
  GPU_LOAD_RESET = 7,
  CPU_LOAD_SPIKE = 8,
  GPU_LOAD_SPIKE = 9,
}
}
+14 −0
Original line number Original line Diff line number Diff line
@@ -72,4 +72,18 @@ enum SessionHint {
     * baseline to prepare for an arbitrary load, and must wake up if inactive.
     * baseline to prepare for an arbitrary load, and must wake up if inactive.
     */
     */
    GPU_LOAD_RESET = 7,
    GPU_LOAD_RESET = 7,

    /**
     * This hint indicates an upcoming CPU workload that is abnormally large and
     * not representative of the workload. This should be used for rare, one-time
     * operations and should be ignored by any load tracking or session hysteresis.
     */
    CPU_LOAD_SPIKE = 8,

    /**
     * This hint indicates an upcoming GPU workload that is abnormally large and
     * not representative of the workload. This should be used for rare, one-time
     * operations and should be ignored by any load tracking or session hysteresis.
     */
    GPU_LOAD_SPIKE = 9,
}
}