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

Commit f5013e3f authored by Sunid Wilson's avatar Sunid Wilson
Browse files

msm: fd: Flip the order of calling vb2_buffer_done and v4l2_event_queue_fh



In the FD IRQ handler the order of calling vb2_buffer_done and
v4l2_event_queue_fh is incorrect, this is causing FD to fail.
Flip the order of calling vb2_buffer_done and v4l2_event_queue_fh
to fix this issue.

Change-Id: Ibed4ff7deda5e716fb725019c199e34ba5f0bae2
Signed-off-by: default avatarSunid Wilson <sunidw@codeaurora.org>
parent bd940499
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1163,6 +1163,10 @@ static void msm_fd_wq_handler(struct work_struct *work)
	/* We have the data from fd hw, we can start next processing */
	msm_fd_hw_schedule_next_buffer(fd);

	/* Return buffer to vb queue */
	active_buf->vb.v4l2_buf.sequence = ctx->fh.sequence;
	vb2_buffer_done(&active_buf->vb, VB2_BUF_STATE_DONE);

	/* Sent event */
	memset(&event, 0x00, sizeof(event));
	event.type = MSM_EVENT_FD;
@@ -1172,10 +1176,6 @@ static void msm_fd_wq_handler(struct work_struct *work)
	fd_event->frame_id = ctx->sequence;
	v4l2_event_queue_fh(&ctx->fh, &event);

	/* Return buffer to vb queue */
	active_buf->vb.v4l2_buf.sequence = ctx->fh.sequence;
	vb2_buffer_done(&active_buf->vb, VB2_BUF_STATE_DONE);

	/* Release buffer from the device */
	msm_fd_hw_buffer_done(fd, active_buf);
}