Loading services/camera/libcameraservice/device3/Camera3Device.cpp +16 −8 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ #define CLOGE(fmt, ...) ALOGE("Camera %s: %s: " fmt, mId.string(), __FUNCTION__, \ ##__VA_ARGS__) #define CLOGW(fmt, ...) ALOGW("Camera %s: %s: " fmt, mId.string(), __FUNCTION__, \ ##__VA_ARGS__) // Convenience macros for transitioning to the error state #define SET_ERR(fmt, ...) setErrorState( \ "%s: " fmt, __FUNCTION__, \ Loading Loading @@ -3267,14 +3270,19 @@ void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { ALOGVV("%s: removed frame %d from InFlightMap", __FUNCTION__, frameNumber); } // Sanity check - if we have too many in-flight frames, something has // likely gone wrong // Sanity check - if we have too many in-flight frames with long total inflight duration, // something has likely gone wrong. This might still be legit only if application send in // a long burst of long exposure requests. if (mExpectedInflightDuration > kMinWarnInflightDuration) { if (!mIsConstrainedHighSpeedConfiguration && mInFlightMap.size() > kInFlightWarnLimit) { CLOGE("In-flight list too large: %zu", mInFlightMap.size()); CLOGW("In-flight list too large: %zu, total inflight duration %" PRIu64, mInFlightMap.size(), mExpectedInflightDuration); } else if (mIsConstrainedHighSpeedConfiguration && mInFlightMap.size() > kInFlightWarnLimitHighSpeed) { CLOGE("In-flight list too large for high speed configuration: %zu", mInFlightMap.size()); CLOGW("In-flight list too large for high speed configuration: %zu," "total inflight duration %" PRIu64, mInFlightMap.size(), mExpectedInflightDuration); } } } Loading services/camera/libcameraservice/device3/Camera3Device.h +1 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,7 @@ class Camera3Device : static const size_t kDumpLockAttempts = 10; static const size_t kDumpSleepDuration = 100000; // 0.10 sec static const nsecs_t kActiveTimeout = 500000000; // 500 ms static const nsecs_t kMinWarnInflightDuration = 5000000000; // 5 s static const size_t kInFlightWarnLimit = 30; static const size_t kInFlightWarnLimitHighSpeed = 256; // batch size 32 * pipe depth 8 static const nsecs_t kDefaultExpectedDuration = 100000000; // 100 ms Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +16 −8 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ #define CLOGE(fmt, ...) ALOGE("Camera %s: %s: " fmt, mId.string(), __FUNCTION__, \ ##__VA_ARGS__) #define CLOGW(fmt, ...) ALOGW("Camera %s: %s: " fmt, mId.string(), __FUNCTION__, \ ##__VA_ARGS__) // Convenience macros for transitioning to the error state #define SET_ERR(fmt, ...) setErrorState( \ "%s: " fmt, __FUNCTION__, \ Loading Loading @@ -3267,14 +3270,19 @@ void Camera3Device::removeInFlightRequestIfReadyLocked(int idx) { ALOGVV("%s: removed frame %d from InFlightMap", __FUNCTION__, frameNumber); } // Sanity check - if we have too many in-flight frames, something has // likely gone wrong // Sanity check - if we have too many in-flight frames with long total inflight duration, // something has likely gone wrong. This might still be legit only if application send in // a long burst of long exposure requests. if (mExpectedInflightDuration > kMinWarnInflightDuration) { if (!mIsConstrainedHighSpeedConfiguration && mInFlightMap.size() > kInFlightWarnLimit) { CLOGE("In-flight list too large: %zu", mInFlightMap.size()); CLOGW("In-flight list too large: %zu, total inflight duration %" PRIu64, mInFlightMap.size(), mExpectedInflightDuration); } else if (mIsConstrainedHighSpeedConfiguration && mInFlightMap.size() > kInFlightWarnLimitHighSpeed) { CLOGE("In-flight list too large for high speed configuration: %zu", mInFlightMap.size()); CLOGW("In-flight list too large for high speed configuration: %zu," "total inflight duration %" PRIu64, mInFlightMap.size(), mExpectedInflightDuration); } } } Loading
services/camera/libcameraservice/device3/Camera3Device.h +1 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,7 @@ class Camera3Device : static const size_t kDumpLockAttempts = 10; static const size_t kDumpSleepDuration = 100000; // 0.10 sec static const nsecs_t kActiveTimeout = 500000000; // 500 ms static const nsecs_t kMinWarnInflightDuration = 5000000000; // 5 s static const size_t kInFlightWarnLimit = 30; static const size_t kInFlightWarnLimitHighSpeed = 256; // batch size 32 * pipe depth 8 static const nsecs_t kDefaultExpectedDuration = 100000000; // 100 ms Loading