Loading libs/renderengine/threaded/RenderEngineThreaded.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <future> #include <android-base/stringprintf.h> #include <common/FlagManager.h> #include <common/trace.h> #include <private/gui/SyncFeatures.h> #include <processgroup/processgroup.h> Loading Loading @@ -60,7 +61,7 @@ status_t RenderEngineThreaded::setSchedFifo(bool enabled) { struct sched_param param = {0}; int sched_policy; if (enabled) { if (enabled && !FlagManager::getInstance().disable_sched_fifo_re()) { sched_policy = SCHED_FIFO; param.sched_priority = kFifoPriority; } else { Loading services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -357,7 +357,9 @@ void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { mAidlComposerCallback = ndk::SharedRefBase::make<AidlIComposerCallbackWrapper>(callback); ndk::SpAIBinder binder = mAidlComposerCallback->asBinder(); if (!FlagManager::getInstance().disable_sched_fifo_composer_callback()) { AIBinder_setMinSchedulerPolicy(binder.get(), SCHED_FIFO, 2); } const auto status = mAidlComposerClient->registerCallback(mAidlComposerCallback); if (!status.isOk()) { Loading services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <aidl/android/hardware/graphics/common/DisplayHotplugEvent.h> #include <android/binder_manager.h> #include <android/hardware/graphics/composer/2.1/types.h> #include <common/FlagManager.h> #include <common/trace.h> #include <composer-command-buffer/2.2/ComposerCommandBuffer.h> #include <hidl/HidlTransportSupport.h> Loading Loading @@ -301,7 +302,9 @@ std::string HidlComposer::dumpDebugInfo() { } void HidlComposer::registerCallback(const sp<IComposerCallback>& callback) { if (!FlagManager::getInstance().disable_sched_fifo_composer_callback()) { android::hardware::setMinSchedulerPolicy(callback, SCHED_FIFO, 2); } auto ret = [&]() { if (mClient_2_4) { Loading services/surfaceflinger/Scheduler/EventThread.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,8 @@ sp<EventThreadConnection> EventThread::createEventConnection( auto connection = sp<EventThreadConnection>::make(const_cast<EventThread*>(this), IPCThreadState::self()->getCallingUid(), eventRegistration); if (FlagManager::getInstance().misc1()) { if (FlagManager::getInstance().misc1() && !FlagManager::getInstance().disable_sched_fifo_sf_sched()) { const int policy = SCHED_FIFO; connection->setMinSchedulerPolicy(policy, sched_get_priority_min(policy)); } Loading services/surfaceflinger/Scheduler/src/Timer.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <sys/timerfd.h> #include <sys/unistd.h> #include <common/FlagManager.h> #include <common/trace.h> #include <ftl/concat.h> #include <ftl/enum.h> Loading Loading @@ -155,9 +156,11 @@ bool Timer::dispatch() { setDebugState(DebugState::Running); struct sched_param param = {0}; param.sched_priority = 2; if (!FlagManager::getInstance().disable_sched_fifo_sf_sched()) { if (pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m) != 0) { ALOGW("Failed to set SCHED_FIFO on dispatch thread"); } } if (pthread_setname_np(pthread_self(), "TimerDispatch") != 0) { ALOGW("Failed to set thread name on dispatch thread"); Loading Loading
libs/renderengine/threaded/RenderEngineThreaded.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <future> #include <android-base/stringprintf.h> #include <common/FlagManager.h> #include <common/trace.h> #include <private/gui/SyncFeatures.h> #include <processgroup/processgroup.h> Loading Loading @@ -60,7 +61,7 @@ status_t RenderEngineThreaded::setSchedFifo(bool enabled) { struct sched_param param = {0}; int sched_policy; if (enabled) { if (enabled && !FlagManager::getInstance().disable_sched_fifo_re()) { sched_policy = SCHED_FIFO; param.sched_priority = kFifoPriority; } else { Loading
services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -357,7 +357,9 @@ void AidlComposer::registerCallback(HWC2::ComposerCallback& callback) { mAidlComposerCallback = ndk::SharedRefBase::make<AidlIComposerCallbackWrapper>(callback); ndk::SpAIBinder binder = mAidlComposerCallback->asBinder(); if (!FlagManager::getInstance().disable_sched_fifo_composer_callback()) { AIBinder_setMinSchedulerPolicy(binder.get(), SCHED_FIFO, 2); } const auto status = mAidlComposerClient->registerCallback(mAidlComposerCallback); if (!status.isOk()) { Loading
services/surfaceflinger/DisplayHardware/HidlComposerHal.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <aidl/android/hardware/graphics/common/DisplayHotplugEvent.h> #include <android/binder_manager.h> #include <android/hardware/graphics/composer/2.1/types.h> #include <common/FlagManager.h> #include <common/trace.h> #include <composer-command-buffer/2.2/ComposerCommandBuffer.h> #include <hidl/HidlTransportSupport.h> Loading Loading @@ -301,7 +302,9 @@ std::string HidlComposer::dumpDebugInfo() { } void HidlComposer::registerCallback(const sp<IComposerCallback>& callback) { if (!FlagManager::getInstance().disable_sched_fifo_composer_callback()) { android::hardware::setMinSchedulerPolicy(callback, SCHED_FIFO, 2); } auto ret = [&]() { if (mClient_2_4) { Loading
services/surfaceflinger/Scheduler/EventThread.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -344,7 +344,8 @@ sp<EventThreadConnection> EventThread::createEventConnection( auto connection = sp<EventThreadConnection>::make(const_cast<EventThread*>(this), IPCThreadState::self()->getCallingUid(), eventRegistration); if (FlagManager::getInstance().misc1()) { if (FlagManager::getInstance().misc1() && !FlagManager::getInstance().disable_sched_fifo_sf_sched()) { const int policy = SCHED_FIFO; connection->setMinSchedulerPolicy(policy, sched_get_priority_min(policy)); } Loading
services/surfaceflinger/Scheduler/src/Timer.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <sys/timerfd.h> #include <sys/unistd.h> #include <common/FlagManager.h> #include <common/trace.h> #include <ftl/concat.h> #include <ftl/enum.h> Loading Loading @@ -155,9 +156,11 @@ bool Timer::dispatch() { setDebugState(DebugState::Running); struct sched_param param = {0}; param.sched_priority = 2; if (!FlagManager::getInstance().disable_sched_fifo_sf_sched()) { if (pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m) != 0) { ALOGW("Failed to set SCHED_FIFO on dispatch thread"); } } if (pthread_setname_np(pthread_self(), "TimerDispatch") != 0) { ALOGW("Failed to set thread name on dispatch thread"); Loading