Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[media] exynos4-is: Copy timestamps from M2M OUTPUT to CAPTURE buffer qu... #2

Merged
merged 1 commit into from
Apr 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions drivers/media/platform/s5p-fimc/fimc-m2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int stop_streaming(struct vb2_queue *q)

static void fimc_device_run(void *priv)
{
struct vb2_buffer *vb = NULL;
struct vb2_buffer *src_vb, *dst_vb;
struct fimc_ctx *ctx = priv;
struct fimc_frame *sf, *df;
struct fimc_dev *fimc;
Expand All @@ -123,16 +123,18 @@ static void fimc_device_run(void *priv)
fimc_prepare_dma_offset(ctx, df);
}

vb = v4l2_m2m_next_src_buf(ctx->m2m_ctx);
ret = fimc_prepare_addr(ctx, vb, sf, &sf->paddr);
src_vb = v4l2_m2m_next_src_buf(ctx->m2m_ctx);
ret = fimc_prepare_addr(ctx, src_vb, sf, &sf->paddr);
if (ret)
goto dma_unlock;

vb = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);
ret = fimc_prepare_addr(ctx, vb, df, &df->paddr);
dst_vb = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);
ret = fimc_prepare_addr(ctx, dst_vb, df, &df->paddr);
if (ret)
goto dma_unlock;

dst_vb->v4l2_buf.timestamp = src_vb->v4l2_buf.timestamp;

/* Reconfigure hardware if the context has changed. */
if (fimc->m2m.ctx != ctx) {
ctx->state |= FIMC_PARAMS;
Expand Down