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

Commit 0ddc1ddb 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

am: e3fd0d0c

Change-Id: I95fe0665eb2e124759d46b71fe47670c1f653e72
parents bcded90c e3fd0d0c
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>

@@ -2040,6 +2041,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,
@@ -2050,6 +2055,7 @@ status_t Camera3Device::configureStreamsLocked() {
        } else {
            ALOGD("Set real time priority for request queue thread (tid %d)", requestThreadTid);
        }
    }

    // Update device state