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

Commit e3fd0d0c authored by Zhijun He's avatar Zhijun He Committed by android-build-merger
Browse files

Camera3Device: add prop to disable sched fifo am: 90f7c373

am: 601f677b

Change-Id: I86b6da77822a5c2b71ea9c2b75349c3c1e4a5482
parents b28cff2a 601f677b
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include <utils/Log.h>
#include <utils/Trace.h>
#include <utils/Timers.h>
#include <cutils/properties.h>

#include <android/hardware/camera2/ICameraDeviceUser.h>

@@ -2037,6 +2038,10 @@ status_t Camera3Device::configureStreamsLocked() {
    // across configure_streams() calls
    mRequestThread->configurationComplete(mIsConstrainedHighSpeedConfiguration);

    char value[PROPERTY_VALUE_MAX];
    property_get("camera.fifo.disable", value, "0");
    int32_t disableFifo = atoi(value);
    if (disableFifo != 1) {
        // Boost priority of request thread to SCHED_FIFO.
        pid_t requestThreadTid = mRequestThread->getTid();
        res = requestPriority(getpid(), requestThreadTid,
@@ -2047,6 +2052,7 @@ status_t Camera3Device::configureStreamsLocked() {
        } else {
            ALOGD("Set real time priority for request queue thread (tid %d)", requestThreadTid);
        }
    }

    // Update device state