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

Commit 90f7c373 authored by Zhijun He's avatar Zhijun He
Browse files

Camera3Device: add prop to disable sched fifo

to disable sched fifo:
adb root
adb shell setprop camera.fifo.disable 1

Bug: 30898724

Change-Id: Ic3d1d15f9deb36b49e7d710d60fac969a98a1730
parent 15223ec2
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