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

Commit 85d692db authored by Ady Abraham's avatar Ady Abraham Committed by Wiwit Rifa'i
Browse files

SF: update kernel idle timer when active display changes

The refresh rate policy for a display might change when it is not
the active display, and when this display becomes active, we need
to update the kernel timer to reflect the updated policy.

Bug: 188838426
Test: check graphics.display.kernel_idle_timer.enabled is updated
      according to the most updated policy when switching active
      display.
Change-Id: I94ee9a019e4f38bf1bd28202144dbc30af2f9261
parent e9316b7f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7052,6 +7052,10 @@ void SurfaceFlinger::onActiveDisplayChangedLocked(const sp<DisplayDevice>& activ
    mScheduler->setRefreshRateConfigs(activeDisplay->holdRefreshRateConfigs());
    onActiveDisplaySizeChanged(activeDisplay);
    mActiveDisplayTransformHint = activeDisplay->getTransformHint();

    // Update the kernel timer for the current active display, since the policy
    // for this display might have changed when it was not the active display.
    toggleKernelIdleTimer();
}

status_t SurfaceFlinger::addWindowInfosListener(