diff options
Diffstat (limited to 'drivers/media/platform/sh_vou.c')
-rw-r--r-- | drivers/media/platform/sh_vou.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 2231f8922df3..115740498274 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c @@ -22,7 +22,7 @@ #include <linux/videodev2.h> #include <linux/module.h> -#include <media/sh_vou.h> +#include <media/drv-intf/sh_vou.h> #include <media/v4l2-common.h> #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> @@ -243,22 +243,21 @@ static void sh_vou_stream_config(struct sh_vou_device *vou_dev) } /* Locking: caller holds fop_lock mutex */ -static int sh_vou_queue_setup(struct vb2_queue *vq, const void *parg, +static int sh_vou_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) { - const struct v4l2_format *fmt = parg; struct sh_vou_device *vou_dev = vb2_get_drv_priv(vq); struct v4l2_pix_format *pix = &vou_dev->pix; int bytes_per_line = vou_fmt[vou_dev->pix_idx].bpp * pix->width / 8; dev_dbg(vou_dev->v4l2_dev.dev, "%s()\n", __func__); - if (fmt && fmt->fmt.pix.sizeimage < pix->height * bytes_per_line) - return -EINVAL; - *nplanes = 1; - sizes[0] = fmt ? fmt->fmt.pix.sizeimage : pix->height * bytes_per_line; alloc_ctxs[0] = vou_dev->alloc_ctx; + if (*nplanes) + return sizes[0] < pix->height * bytes_per_line ? -EINVAL : 0; + *nplanes = 1; + sizes[0] = pix->height * bytes_per_line; return 0; } @@ -1071,7 +1070,7 @@ static irqreturn_t sh_vou_isr(int irq, void *dev_id) list_del(&vb->list); - v4l2_get_timestamp(&vb->vb.timestamp); + vb->vb.vb2_buf.timestamp = ktime_get_ns(); vb->vb.sequence = vou_dev->sequence++; vb->vb.field = V4L2_FIELD_INTERLACED; vb2_buffer_done(&vb->vb.vb2_buf, VB2_BUF_STATE_DONE); |