QCamera3: Bump the default timeout threshold
Bump the default timeout threshold to 10 sec.
Additionally correct the buffer timeout comparisons
which should always happen on values in nanoseconds.
Bug: 73744895
Test: Camera CTS, ITS exposure test
Change-Id: I0fdfec37d2021d0e9894c2a05cd222ca150f2073
diff --git a/msm8998/QCamera2/HAL3/QCamera3HWI.cpp b/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
index bf8b467..eeeb40a 100644
--- a/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
@@ -101,7 +101,7 @@
#define MAX_HFR_BATCH_SIZE (8)
#define REGIONS_TUPLE_COUNT 5
// Set a threshold for detection of missing buffers //seconds
-#define MISSING_REQUEST_BUF_TIMEOUT 5
+#define MISSING_REQUEST_BUF_TIMEOUT 10
#define MISSING_HDRPLUS_REQUEST_BUF_TIMEOUT 30
#define FLUSH_TIMEOUT 3
#define METADATA_MAP_SIZE(MAP) (sizeof(MAP)/sizeof(MAP[0]))
@@ -3944,12 +3944,13 @@
// HDR+ request is done. So allow a longer timeout.
timeout = (mHdrPlusPendingRequests.size() > 0) ?
MISSING_HDRPLUS_REQUEST_BUF_TIMEOUT : MISSING_REQUEST_BUF_TIMEOUT;
+ timeout = s2ns(timeout);
if (timeout < mExpectedInflightDuration) {
timeout = mExpectedInflightDuration;
}
}
- if ( (currentSysTime - req.timestamp) > s2ns(timeout) ) {
+ if ((currentSysTime - req.timestamp) > timeout) {
for (auto &missed : req.mPendingBufferList) {
assert(missed.stream->priv);
if (missed.stream->priv) {