Commit 61d5b9d4 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] v4l: omap3isp: preview: Mark output buffer done first

The sequence number counter is incremented on each output buffer, and that
incremented value is used as the sequence number of that buffer. The input
buffer sequence numbering is based just on reading the same counter. If
the input buffer is marked done first, its sequence number ends up being
that of the output buffer - 1.

This is how the resizer works as well.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 514580f9
...@@ -1480,13 +1480,6 @@ static void preview_isr_buffer(struct isp_prev_device *prev) ...@@ -1480,13 +1480,6 @@ static void preview_isr_buffer(struct isp_prev_device *prev)
struct isp_buffer *buffer; struct isp_buffer *buffer;
int restart = 0; int restart = 0;
if (prev->input == PREVIEW_INPUT_MEMORY) {
buffer = omap3isp_video_buffer_next(&prev->video_in);
if (buffer != NULL)
preview_set_inaddr(prev, buffer->dma);
pipe->state |= ISP_PIPELINE_IDLE_INPUT;
}
if (prev->output & PREVIEW_OUTPUT_MEMORY) { if (prev->output & PREVIEW_OUTPUT_MEMORY) {
buffer = omap3isp_video_buffer_next(&prev->video_out); buffer = omap3isp_video_buffer_next(&prev->video_out);
if (buffer != NULL) { if (buffer != NULL) {
...@@ -1496,6 +1489,13 @@ static void preview_isr_buffer(struct isp_prev_device *prev) ...@@ -1496,6 +1489,13 @@ static void preview_isr_buffer(struct isp_prev_device *prev)
pipe->state |= ISP_PIPELINE_IDLE_OUTPUT; pipe->state |= ISP_PIPELINE_IDLE_OUTPUT;
} }
if (prev->input == PREVIEW_INPUT_MEMORY) {
buffer = omap3isp_video_buffer_next(&prev->video_in);
if (buffer != NULL)
preview_set_inaddr(prev, buffer->dma);
pipe->state |= ISP_PIPELINE_IDLE_INPUT;
}
switch (prev->state) { switch (prev->state) {
case ISP_PIPELINE_STREAM_SINGLESHOT: case ISP_PIPELINE_STREAM_SINGLESHOT:
if (isp_pipeline_ready(pipe)) if (isp_pipeline_ready(pipe))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment