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

Commit f7c721c0 authored by Steve Kondik's avatar Steve Kondik Committed by Michael Bestas
Browse files

input: Adjust priority

Change-Id: Ic0477225e9b0bb3eb4f2c71ab3b2620f56d947c7
parent 967a7f7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ cc_library_shared {
    shared_libs: [
        "android.hardware.input.classifier@1.0",
        "libbase",
        "libbfqio",
        "libinputflinger_base",
        "libinputreporter",
        "libinputreader",
+8 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#include <binder/IPCThreadState.h>

#include <bfqio/bfqio.h>
#include <log/log.h>
#include <unordered_map>

@@ -49,13 +50,15 @@ void InputManager::initialize() {
}

status_t InputManager::start() {
    status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY);
    status_t result = mDispatcherThread->run("InputDispatcher",
            PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
    if (result) {
        ALOGE("Could not start InputDispatcher thread due to error %d.", result);
        return result;
    }

    result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY);
    result = mReaderThread->run("InputReader",
            PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
    if (result) {
        ALOGE("Could not start InputReader thread due to error %d.", result);

@@ -63,6 +66,9 @@ status_t InputManager::start() {
        return result;
    }

    android_set_rt_ioprio(mDispatcherThread->getTid(), 1);
    android_set_rt_ioprio(mReaderThread->getTid(), 1);

    return OK;
}

+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ cc_defaults {
        "android.hardware.power@1.0",
        "android.hardware.power@1.3",
        "libbase",
        "libbfqio",
        "libbinder",
        "libbufferhubqueue",
        "libcutils",
+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <algorithm>

#include <android-base/stringprintf.h>
#include <bfqio/bfqio.h>
#include <cutils/properties.h>
#include <log/log.h>
#include <utils/Thread.h>
@@ -490,6 +491,8 @@ void DispSync::init(bool hasSyncFramework, int64_t dispSyncPresentTimeOffset) {
        ALOGE("Couldn't set SCHED_FIFO for DispSyncThread");
    }

    android_set_rt_ioprio(mThread->getTid(), 1);

    beginResync();

    if (mTraceDetailedInfo && kEnableZeroPhaseTracer) {
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <sched.h>
#include <sys/resource.h>

#include <bfqio/bfqio.h>
#include <cutils/sched_policy.h>
#include <log/log.h>
#include <system/thread_defs.h>
@@ -37,6 +38,8 @@ EventControlThread::EventControlThread(EventControlThread::SetVSyncEnabledFuncti
    pid_t tid = pthread_gettid_np(mThread.native_handle());
    setpriority(PRIO_PROCESS, tid, ANDROID_PRIORITY_URGENT_DISPLAY);
    set_sched_policy(tid, SP_FOREGROUND);

    android_set_rt_ioprio(tid, 1);
}

EventControlThread::~EventControlThread() {
Loading