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

Commit 2b3a22f3 authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

SF: update scheduler's RefreshRateConfigs on hotplugs am: ac2bf48e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15339880

Change-Id: Id3a50afbfb7367aa8e6c121fd005ef6520f89513
parents 81208796 ac2bf48e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3124,9 +3124,11 @@ void SurfaceFlinger::triggerOnFrameRateOverridesChanged() {

void SurfaceFlinger::initScheduler(const sp<DisplayDevice>& display) {
    if (mScheduler) {
        // In practice it's not allowed to hotplug in/out the primary display once it's been
        // connected during startup, but some tests do it, so just warn and return.
        ALOGW("Can't re-init scheduler");
        // If the scheduler is already initialized, this means that we received
        // a hotplug(connected) on the primary display. In that case we should
        // update the scheduler with the most recent display information.
        ALOGW("Scheduler already initialized, updating instead");
        mScheduler->setRefreshRateConfigs(display->holdRefreshRateConfigs());
        return;
    }
    const auto currRefreshRate = display->getActiveMode()->getFps();