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

Commit 49ebbe76 authored by Ashwini Rao's avatar Ashwini Rao Committed by Gerrit - the friendly Code Review server
Browse files

msm: fd: Handle timeout on stream off



1. On stream off, if there is a timeout waiting for
the current buffer to complete, do a
vb2_buffer_done on the active buffer before it is
removed from the queue
2. Reduce the timeout wait time to 150ms

CRs-fixed: 961394
Change-Id: I57d616e9cf89f7722483fe0d49a0b5e44f0e4782
Signed-off-by: default avatarAshwini Rao <ashwinik@codeaurora.org>
parent 628f46a2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
/* Face detection bus client name */
#define MSM_FD_BUS_CLIENT_NAME "msm_face_detect"
/* Face detection processing timeout in ms */
#define MSM_FD_PROCESSING_TIMEOUT_MS 500
#define MSM_FD_PROCESSING_TIMEOUT_MS 150
/* Face detection halt timeout in ms */
#define MSM_FD_HALT_TIMEOUT_MS 100
/* Smmu callback name */
@@ -1152,6 +1152,8 @@ void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd,
		time = wait_for_completion_timeout(&active_buffer->completion,
			msecs_to_jiffies(MSM_FD_PROCESSING_TIMEOUT_MS));
		if (!time) {
			/* Do a vb2 buffer done since it timed out */
			vb2_buffer_done(&active_buffer->vb, VB2_BUF_STATE_DONE);
			/* Remove active buffer */
			msm_fd_hw_get_active_buffer(fd);
			/* Schedule if other buffers are present in device */