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

Commit c5120930 authored by Lakshmi Narayana Kalavala's avatar Lakshmi Narayana Kalavala Committed by David Keitel
Browse files

msm: camera: Identify invalid buf done's on vb2 buffer



Observed camera module drivers doing invalid buf done's on
vb2 buffers even after the buffers are cleaned up from
the vb2 queue, Hence adding WARN_ON to identify the clients.

Change-Id: Iaca6fc7c481d7c06cd15e94fbbf9aebe2cc7e110
Signed-off-by: default avatarLakshmi Narayana Kalavala <lkalaval@codeaurora.org>
parent 86b018a6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static int msm_vb2_put_buf(struct vb2_v4l2_buffer *vb, int session_id,
			if (vb2_v4l2_buf == vb)
				break;
		}
		if (vb2_v4l2_buf != vb) {
		if (WARN_ON(vb2_v4l2_buf != vb)) {
			pr_err("VB buffer is INVALID vb=%p, ses_id=%d, str_id=%d\n",
					vb, session_id, stream_id);
			spin_unlock_irqrestore(&stream->stream_lock, flags);
@@ -291,7 +291,7 @@ static int msm_vb2_buf_done(struct vb2_v4l2_buffer *vb, int session_id,
			if (vb2_v4l2_buf == vb)
				break;
		}
		if (vb2_v4l2_buf != vb) {
		if (WARN_ON(vb2_v4l2_buf != vb)) {
			pr_err("VB buffer is INVALID ses_id=%d, str_id=%d, vb=%p\n",
				    session_id, stream_id, vb);
			spin_unlock_irqrestore(&stream->stream_lock, flags);