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

Commit b1822ef5 authored by Melody Hsu's avatar Melody Hsu
Browse files

Enable CPU loadup hints on client comp effects

Send a load up hint when there are changes in client
composition that involve effects like blur or shadows
in the critical workload. Conceptually, a load up hint
should be provided for other increased workloads as well,
however we limit the scale of the such a change by first
only targeting effects, which should mitigate some
regressions caused by blur.

Bug: b/385028458, b/409887260
Test: PTS power testing
Flag: com.android.graphics.surfaceflinger.flags.adpf_cpu_effects_loadup
Change-Id: Ic025f03365a7f69d371b4a3834af79aa3f46a3b5
parent a7b22cf3
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -807,7 +807,14 @@ void PowerAdvisor::setCommittedWorkload(ftl::Flags<Workload> workload) {
                                              ftl::truncated<20>(mCommittedWorkload.string()))
                                          .c_str());

        // TODO(b/385028458) load up hint
        // TODO(b/385028458) load up hint for other increased workloads.

        // Provides a load up hint only for effects that require client
        // composition, such as blur or shadows.
        if (FlagManager::getInstance().adpf_cpu_effects_loadup() &&
            mCommittedWorkload.any(adpf::Workload::EFFECTS)) {
            notifyCpuLoadUp();
        }
    }
}

+2 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ void FlagManager::dump(std::string& result) const {
    DUMP_LEGACY_SERVER_FLAG(use_skia_tracing);

    /// Trunk stable server (R/W) flags ///
    DUMP_ACONFIG_FLAG(adpf_cpu_effects_loadup);
    DUMP_ACONFIG_FLAG(adpf_gpu_sf);
    DUMP_ACONFIG_FLAG(adpf_native_session_manager);
    DUMP_ACONFIG_FLAG(adpf_use_fmq_channel);
@@ -289,6 +290,7 @@ FLAG_MANAGER_ACONFIG_FLAG(synced_resolution_switch, "");

/// Trunk stable server (R/W) flags ///
FLAG_MANAGER_ACONFIG_FLAG(refresh_rate_overlay_on_external_display, "")
FLAG_MANAGER_ACONFIG_FLAG(adpf_cpu_effects_loadup, "");
FLAG_MANAGER_ACONFIG_FLAG(adpf_gpu_sf, "")
FLAG_MANAGER_ACONFIG_FLAG(adpf_native_session_manager, "");
FLAG_MANAGER_ACONFIG_FLAG(graphite_renderengine_preview_rollout, "");
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public:
    bool use_skia_tracing() const;

    /// Trunk stable server (R/W) flags ///
    bool adpf_cpu_effects_loadup() const;
    bool adpf_gpu_sf() const;
    bool adpf_native_session_manager() const;
    bool adpf_use_fmq_channel() const;
+10 −0
Original line number Diff line number Diff line
@@ -3,6 +3,16 @@
package: "com.android.graphics.surfaceflinger.flags"
container: "system"

flag {
  name: "adpf_cpu_effects_loadup"
  namespace: "window_surfaces"
  description: "Enables CPU loadup hints for effects using client composition"
  bug: "409887260"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
} # adpf_cpu_effects_loadup

flag {
  name: "adpf_fmq_sf"
  namespace: "game"