]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/media/platform/exynos-gsc/gsc-m2m.c
Merge remote-tracking branch 'v4l-dvb/master'
[karo-tx-linux.git] / drivers / media / platform / exynos-gsc / gsc-m2m.c
index d5cffef2e2271232d223b4f8a836af26c45b087f..d82e717acba7b76e90254afcddd605a7b99c8ca8 100644 (file)
@@ -77,7 +77,7 @@ static void gsc_m2m_stop_streaming(struct vb2_queue *q)
 
 void gsc_m2m_job_finish(struct gsc_ctx *ctx, int vb_state)
 {
-       struct vb2_buffer *src_vb, *dst_vb;
+       struct vb2_v4l2_buffer *src_vb, *dst_vb;
 
        if (!ctx || !ctx->m2m_ctx)
                return;
@@ -86,11 +86,11 @@ void gsc_m2m_job_finish(struct gsc_ctx *ctx, int vb_state)
        dst_vb = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx);
 
        if (src_vb && dst_vb) {
-               dst_vb->v4l2_buf.timestamp = src_vb->v4l2_buf.timestamp;
-               dst_vb->v4l2_buf.timecode = src_vb->v4l2_buf.timecode;
-               dst_vb->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
-               dst_vb->v4l2_buf.flags |=
-                       src_vb->v4l2_buf.flags
+               dst_vb->timestamp = src_vb->timestamp;
+               dst_vb->timecode = src_vb->timecode;
+               dst_vb->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+               dst_vb->flags |=
+                       src_vb->flags
                        & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
 
                v4l2_m2m_buf_done(src_vb, vb_state);
@@ -109,23 +109,23 @@ static void gsc_m2m_job_abort(void *priv)
 static int gsc_get_bufs(struct gsc_ctx *ctx)
 {
        struct gsc_frame *s_frame, *d_frame;
-       struct vb2_buffer *src_vb, *dst_vb;
+       struct vb2_v4l2_buffer *src_vb, *dst_vb;
        int ret;
 
        s_frame = &ctx->s_frame;
        d_frame = &ctx->d_frame;
 
        src_vb = v4l2_m2m_next_src_buf(ctx->m2m_ctx);
-       ret = gsc_prepare_addr(ctx, src_vb, s_frame, &s_frame->addr);
+       ret = gsc_prepare_addr(ctx, &src_vb->vb2_buf, s_frame, &s_frame->addr);
        if (ret)
                return ret;
 
        dst_vb = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);
-       ret = gsc_prepare_addr(ctx, dst_vb, d_frame, &d_frame->addr);
+       ret = gsc_prepare_addr(ctx, &dst_vb->vb2_buf, d_frame, &d_frame->addr);
        if (ret)
                return ret;
 
-       dst_vb->v4l2_buf.timestamp = src_vb->v4l2_buf.timestamp;
+       dst_vb->timestamp = src_vb->timestamp;
 
        return 0;
 }
@@ -212,7 +212,7 @@ put_device:
 }
 
 static int gsc_m2m_queue_setup(struct vb2_queue *vq,
-                       const struct v4l2_format *fmt,
+                       const void *parg,
                        unsigned int *num_buffers, unsigned int *num_planes,
                        unsigned int sizes[], void *allocators[])
 {
@@ -255,12 +255,13 @@ static int gsc_m2m_buf_prepare(struct vb2_buffer *vb)
 
 static void gsc_m2m_buf_queue(struct vb2_buffer *vb)
 {
+       struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
        struct gsc_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
 
        pr_debug("ctx: %p, ctx->state: 0x%x", ctx, ctx->state);
 
        if (ctx->m2m_ctx)
-               v4l2_m2m_buf_queue(ctx->m2m_ctx, vb);
+               v4l2_m2m_buf_queue(ctx->m2m_ctx, vbuf);
 }
 
 static struct vb2_ops gsc_m2m_qops = {