]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/media/platform/sh_veu.c
Merge remote-tracking branch 'v4l-dvb/master'
[karo-tx-linux.git] / drivers / media / platform / sh_veu.c
index f5e3eb3a20ff77823ac2d8dbe1a0caad2454d19d..d6ab33e7060aa824accddf2e295d77062f37984c 100644 (file)
@@ -865,10 +865,11 @@ static const struct v4l2_ioctl_ops sh_veu_ioctl_ops = {
                /* ========== Queue operations ========== */
 
 static int sh_veu_queue_setup(struct vb2_queue *vq,
-                             const struct v4l2_format *f,
+                             const void *parg,
                              unsigned int *nbuffers, unsigned int *nplanes,
                              unsigned int sizes[], void *alloc_ctxs[])
 {
+       const struct v4l2_format *f = parg;
        struct sh_veu_dev *veu = vb2_get_drv_priv(vq);
        struct sh_veu_vfmt *vfmt;
        unsigned int size, count = *nbuffers;
@@ -931,9 +932,10 @@ static int sh_veu_buf_prepare(struct vb2_buffer *vb)
 
 static void sh_veu_buf_queue(struct vb2_buffer *vb)
 {
+       struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
        struct sh_veu_dev *veu = vb2_get_drv_priv(vb->vb2_queue);
-       dev_dbg(veu->dev, "%s(%d)\n", __func__, vb->v4l2_buf.type);
-       v4l2_m2m_buf_queue(veu->m2m_ctx, vb);
+       dev_dbg(veu->dev, "%s(%d)\n", __func__, vb->type);
+       v4l2_m2m_buf_queue(veu->m2m_ctx, vbuf);
 }
 
 static const struct vb2_ops sh_veu_qops = {
@@ -1084,8 +1086,8 @@ static irqreturn_t sh_veu_bh(int irq, void *dev_id)
 static irqreturn_t sh_veu_isr(int irq, void *dev_id)
 {
        struct sh_veu_dev *veu = dev_id;
-       struct vb2_buffer *dst;
-       struct vb2_buffer *src;
+       struct vb2_v4l2_buffer *dst;
+       struct vb2_v4l2_buffer *src;
        u32 status = sh_veu_reg_read(veu, VEU_EVTR);
 
        /* bundle read mode not used */
@@ -1105,11 +1107,11 @@ static irqreturn_t sh_veu_isr(int irq, void *dev_id)
        if (!src || !dst)
                return IRQ_NONE;
 
-       dst->v4l2_buf.timestamp = src->v4l2_buf.timestamp;
-       dst->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
-       dst->v4l2_buf.flags |=
-               src->v4l2_buf.flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
-       dst->v4l2_buf.timecode = src->v4l2_buf.timecode;
+       dst->timestamp = src->timestamp;
+       dst->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+       dst->flags |=
+               src->flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
+       dst->timecode = src->timecode;
 
        spin_lock(&veu->lock);
        v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);