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

Commit 828dae7f authored by Matt Buckley's avatar Matt Buckley Committed by Automerger Merge Worker
Browse files

Merge "Get vsync period for ADPF CPU hints in SF using display mode" into tm-qpr-dev am: a1c057f0

parents 684c738e a1c057f0
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -2087,11 +2087,9 @@ bool SurfaceFlinger::commit(nsecs_t frameTime, int64_t vsyncId, nsecs_t expected
    // Save this once per commit + composite to ensure consistency
    mPowerHintSessionEnabled = mPowerAdvisor->usePowerHintSession();
    if (mPowerHintSessionEnabled) {
        nsecs_t vsyncPeriod;
        {
            Mutex::Autolock lock(mStateLock);
            vsyncPeriod = getVsyncPeriodFromHWC();
        }
        const auto& display = FTL_FAKE_GUARD(mStateLock, getDefaultDisplayDeviceLocked()).get();
        // get stable vsync period from display mode
        const nsecs_t vsyncPeriod = display->getActiveMode()->getVsyncPeriod();
        mPowerAdvisor->setCommitStart(frameTime);
        mPowerAdvisor->setExpectedPresentTime(mExpectedPresentTime);
        const nsecs_t idealSfWorkDuration =