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

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

msm: fd: Do buffer done on all buffers in vb2 queue on streamoff



On v4l2 stop_streaming, a vb2_buffer_done needs to be done to
ensure that the driver gives back all the buffers it got from
the buf_queue() callback.

Change-Id: I1ba8776381efb41820ed44a8bdf70c99574b09ac
Signed-off-by: default avatarAshwini Rao <ashwinik@codeaurora.org>
parent 357160d5
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -1503,9 +1503,12 @@ void msm_fd_hw_remove_buffers_from_queue(struct msm_fd_device *fd,


			if (atomic_read(&curr_buff->active))
			if (atomic_read(&curr_buff->active))
				active_buffer = curr_buff;
				active_buffer = curr_buff;
			else
			else {
				/* Do a Buffer done on all the other buffers */
				vb2_buffer_done(&curr_buff->vb,
					VB2_BUF_STATE_DONE);
				list_del(&curr_buff->list);
				list_del(&curr_buff->list);

			}
		}
		}
	}
	}
	spin_unlock(&fd->slock);
	spin_unlock(&fd->slock);