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

Commit a9e8d15a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "graphics: use FIFO scheduler in IComposer"

parents 305f0dd8 4a71a738
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,4 +2,5 @@ service hwcomposer-2-1 /system/bin/hw/android.hardware.graphics.composer@2.1-ser
    class hal
    user system
    group graphics drmrpc readproc
    capabilities SYS_NICE
    onrestart restart surfaceflinger
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#define LOG_TAG "android.hardware.graphics.composer@2.1-service"

#include <sched.h>

#include <android/hardware/graphics/composer/2.1/IComposer.h>

#include <binder/ProcessState.h>
@@ -29,5 +31,13 @@ int main() {
    android::ProcessState::self()->setThreadPoolMaxThreadCount(4);
    android::ProcessState::self()->startThreadPool();

    // same as SF main thread
    struct sched_param param = {0};
    param.sched_priority = 2;
    if (sched_setscheduler(0, SCHED_FIFO | SCHED_RESET_ON_FORK,
                &param) != 0) {
        ALOGE("Couldn't set SCHED_FIFO: %d", errno);
    }

    return defaultPassthroughServiceImplementation<IComposer>("hwcomposer");
}