diff options
-rw-r--r-- | drivers/media/video/atmel-isi.c | 6 | ||||
-rw-r--r-- | drivers/media/video/marvell-ccic/mcam-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/mem2mem_testdev.c | 7 | ||||
-rw-r--r-- | drivers/media/video/mx3_camera.c | 1 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 6 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 6 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/s5p-mfc/s5p_mfc_dec.c | 7 | ||||
-rw-r--r-- | drivers/media/video/s5p-mfc/s5p_mfc_enc.c | 5 | ||||
-rw-r--r-- | drivers/media/video/s5p-tv/mixer_video.c | 4 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 1 | ||||
-rw-r--r-- | drivers/media/video/videobuf2-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/vivi.c | 6 | ||||
-rw-r--r-- | include/media/videobuf2-core.h | 6 |
14 files changed, 38 insertions, 32 deletions
diff --git a/drivers/media/video/atmel-isi.c b/drivers/media/video/atmel-isi.c index 06f6595a1c9a..8c775c59e120 100644 --- a/drivers/media/video/atmel-isi.c +++ b/drivers/media/video/atmel-isi.c | |||
@@ -249,9 +249,9 @@ static int atmel_isi_wait_status(struct atmel_isi *isi, int wait_reset) | |||
249 | /* ------------------------------------------------------------------ | 249 | /* ------------------------------------------------------------------ |
250 | Videobuf operations | 250 | Videobuf operations |
251 | ------------------------------------------------------------------*/ | 251 | ------------------------------------------------------------------*/ |
252 | static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, | 252 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, |
253 | unsigned int *nplanes, unsigned int sizes[], | 253 | unsigned int *nbuffers, unsigned int *nplanes, |
254 | void *alloc_ctxs[]) | 254 | unsigned int sizes[], void *alloc_ctxs[]) |
255 | { | 255 | { |
256 | struct soc_camera_device *icd = soc_camera_from_vb2q(vq); | 256 | struct soc_camera_device *icd = soc_camera_from_vb2q(vq); |
257 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); | 257 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); |
diff --git a/drivers/media/video/marvell-ccic/mcam-core.c b/drivers/media/video/marvell-ccic/mcam-core.c index 1141b976dff4..80ec64d2d6d8 100644 --- a/drivers/media/video/marvell-ccic/mcam-core.c +++ b/drivers/media/video/marvell-ccic/mcam-core.c | |||
@@ -883,7 +883,8 @@ static int mcam_read_setup(struct mcam_camera *cam) | |||
883 | * Videobuf2 interface code. | 883 | * Videobuf2 interface code. |
884 | */ | 884 | */ |
885 | 885 | ||
886 | static int mcam_vb_queue_setup(struct vb2_queue *vq, unsigned int *nbufs, | 886 | static int mcam_vb_queue_setup(struct vb2_queue *vq, |
887 | const struct v4l2_format *fmt, unsigned int *nbufs, | ||
887 | unsigned int *num_planes, unsigned int sizes[], | 888 | unsigned int *num_planes, unsigned int sizes[], |
888 | void *alloc_ctxs[]) | 889 | void *alloc_ctxs[]) |
889 | { | 890 | { |
diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c index 9594b52f8605..12897e8a3314 100644 --- a/drivers/media/video/mem2mem_testdev.c +++ b/drivers/media/video/mem2mem_testdev.c | |||
@@ -738,9 +738,10 @@ static const struct v4l2_ioctl_ops m2mtest_ioctl_ops = { | |||
738 | * Queue operations | 738 | * Queue operations |
739 | */ | 739 | */ |
740 | 740 | ||
741 | static int m2mtest_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, | 741 | static int m2mtest_queue_setup(struct vb2_queue *vq, |
742 | unsigned int *nplanes, unsigned int sizes[], | 742 | const struct v4l2_format *fmt, |
743 | void *alloc_ctxs[]) | 743 | unsigned int *nbuffers, unsigned int *nplanes, |
744 | unsigned int sizes[], void *alloc_ctxs[]) | ||
744 | { | 745 | { |
745 | struct m2mtest_ctx *ctx = vb2_get_drv_priv(vq); | 746 | struct m2mtest_ctx *ctx = vb2_get_drv_priv(vq); |
746 | struct m2mtest_q_data *q_data; | 747 | struct m2mtest_q_data *q_data; |
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index f4ef6b993ff1..24c2fe0714c5 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -191,6 +191,7 @@ static void mx3_cam_dma_done(void *arg) | |||
191 | * Calculate the __buffer__ (not data) size and number of buffers. | 191 | * Calculate the __buffer__ (not data) size and number of buffers. |
192 | */ | 192 | */ |
193 | static int mx3_videobuf_setup(struct vb2_queue *vq, | 193 | static int mx3_videobuf_setup(struct vb2_queue *vq, |
194 | const struct v4l2_format *fmt, | ||
194 | unsigned int *count, unsigned int *num_planes, | 195 | unsigned int *count, unsigned int *num_planes, |
195 | unsigned int sizes[], void *alloc_ctxs[]) | 196 | unsigned int sizes[], void *alloc_ctxs[]) |
196 | { | 197 | { |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 360be226718d..01ff643e682d 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -744,9 +744,9 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) | |||
744 | /***************************************************************************/ | 744 | /***************************************************************************/ |
745 | /* Videobuf2 operations */ | 745 | /* Videobuf2 operations */ |
746 | 746 | ||
747 | static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, | 747 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, |
748 | unsigned int *nplanes, unsigned int sizes[], | 748 | unsigned int *nbuffers, unsigned int *nplanes, |
749 | void *alloc_ctxs[]) | 749 | unsigned int sizes[], void *alloc_ctxs[]) |
750 | { | 750 | { |
751 | struct pwc_device *pdev = vb2_get_drv_priv(vq); | 751 | struct pwc_device *pdev = vb2_get_drv_priv(vq); |
752 | 752 | ||
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 931f469604b0..c8d91b0cd9bd 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -246,9 +246,9 @@ static unsigned int get_plane_size(struct fimc_frame *fr, unsigned int plane) | |||
246 | return fr->f_width * fr->f_height * fr->fmt->depth[plane] / 8; | 246 | return fr->f_width * fr->f_height * fr->fmt->depth[plane] / 8; |
247 | } | 247 | } |
248 | 248 | ||
249 | static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers, | 249 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *pfmt, |
250 | unsigned int *num_planes, unsigned int sizes[], | 250 | unsigned int *num_buffers, unsigned int *num_planes, |
251 | void *allocators[]) | 251 | unsigned int sizes[], void *allocators[]) |
252 | { | 252 | { |
253 | struct fimc_ctx *ctx = vq->drv_priv; | 253 | struct fimc_ctx *ctx = vq->drv_priv; |
254 | struct fimc_fmt *fmt = ctx->d_frame.fmt; | 254 | struct fimc_fmt *fmt = ctx->d_frame.fmt; |
diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index 6c1c9cb55378..19ca6db38b2f 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video/s5p-fimc/fimc-core.c | |||
@@ -670,9 +670,9 @@ static void fimc_job_abort(void *priv) | |||
670 | fimc_m2m_shutdown(priv); | 670 | fimc_m2m_shutdown(priv); |
671 | } | 671 | } |
672 | 672 | ||
673 | static int fimc_queue_setup(struct vb2_queue *vq, unsigned int *num_buffers, | 673 | static int fimc_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, |
674 | unsigned int *num_planes, unsigned int sizes[], | 674 | unsigned int *num_buffers, unsigned int *num_planes, |
675 | void *allocators[]) | 675 | unsigned int sizes[], void *allocators[]) |
676 | { | 676 | { |
677 | struct fimc_ctx *ctx = vb2_get_drv_priv(vq); | 677 | struct fimc_ctx *ctx = vb2_get_drv_priv(vq); |
678 | struct fimc_frame *f; | 678 | struct fimc_frame *f; |
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c b/drivers/media/video/s5p-mfc/s5p_mfc_dec.c index bfbe08432050..725634d9736d 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_dec.c | |||
@@ -744,9 +744,10 @@ static const struct v4l2_ioctl_ops s5p_mfc_dec_ioctl_ops = { | |||
744 | .vidioc_g_crop = vidioc_g_crop, | 744 | .vidioc_g_crop = vidioc_g_crop, |
745 | }; | 745 | }; |
746 | 746 | ||
747 | static int s5p_mfc_queue_setup(struct vb2_queue *vq, unsigned int *buf_count, | 747 | static int s5p_mfc_queue_setup(struct vb2_queue *vq, |
748 | unsigned int *plane_count, unsigned int psize[], | 748 | const struct v4l2_format *fmt, unsigned int *buf_count, |
749 | void *allocators[]) | 749 | unsigned int *plane_count, unsigned int psize[], |
750 | void *allocators[]) | ||
750 | { | 751 | { |
751 | struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); | 752 | struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); |
752 | 753 | ||
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c index 4c90e53bd964..ecef127dbc66 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c | |||
@@ -1513,8 +1513,9 @@ static int check_vb_with_fmt(struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb) | |||
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static int s5p_mfc_queue_setup(struct vb2_queue *vq, | 1515 | static int s5p_mfc_queue_setup(struct vb2_queue *vq, |
1516 | unsigned int *buf_count, unsigned int *plane_count, | 1516 | const struct v4l2_format *fmt, |
1517 | unsigned int psize[], void *allocators[]) | 1517 | unsigned int *buf_count, unsigned int *plane_count, |
1518 | unsigned int psize[], void *allocators[]) | ||
1518 | { | 1519 | { |
1519 | struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); | 1520 | struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv); |
1520 | 1521 | ||
diff --git a/drivers/media/video/s5p-tv/mixer_video.c b/drivers/media/video/s5p-tv/mixer_video.c index 4917e2c2b321..e16d3a4bc1dc 100644 --- a/drivers/media/video/s5p-tv/mixer_video.c +++ b/drivers/media/video/s5p-tv/mixer_video.c | |||
@@ -727,8 +727,8 @@ static const struct v4l2_file_operations mxr_fops = { | |||
727 | .unlocked_ioctl = video_ioctl2, | 727 | .unlocked_ioctl = video_ioctl2, |
728 | }; | 728 | }; |
729 | 729 | ||
730 | static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, | 730 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *pfmt, |
731 | unsigned int *nplanes, unsigned int sizes[], | 731 | unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], |
732 | void *alloc_ctxs[]) | 732 | void *alloc_ctxs[]) |
733 | { | 733 | { |
734 | struct mxr_layer *layer = vb2_get_drv_priv(vq); | 734 | struct mxr_layer *layer = vb2_get_drv_priv(vq); |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 5c8ddd821df6..0cb19689cfe8 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -193,6 +193,7 @@ static int sh_mobile_ceu_soft_reset(struct sh_mobile_ceu_dev *pcdev) | |||
193 | * Videobuf operations | 193 | * Videobuf operations |
194 | */ | 194 | */ |
195 | static int sh_mobile_ceu_videobuf_setup(struct vb2_queue *vq, | 195 | static int sh_mobile_ceu_videobuf_setup(struct vb2_queue *vq, |
196 | const struct v4l2_format *fmt, | ||
196 | unsigned int *count, unsigned int *num_planes, | 197 | unsigned int *count, unsigned int *num_planes, |
197 | unsigned int sizes[], void *alloc_ctxs[]) | 198 | unsigned int sizes[], void *alloc_ctxs[]) |
198 | { | 199 | { |
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 82b51be3ca72..f04f27d68cec 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c | |||
@@ -530,7 +530,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) | |||
530 | * Ask the driver how many buffers and planes per buffer it requires. | 530 | * Ask the driver how many buffers and planes per buffer it requires. |
531 | * Driver also sets the size and allocator context for each plane. | 531 | * Driver also sets the size and allocator context for each plane. |
532 | */ | 532 | */ |
533 | ret = call_qop(q, queue_setup, q, &num_buffers, &num_planes, | 533 | ret = call_qop(q, queue_setup, q, NULL, &num_buffers, &num_planes, |
534 | q->plane_sizes, q->alloc_ctx); | 534 | q->plane_sizes, q->alloc_ctx); |
535 | if (ret) | 535 | if (ret) |
536 | return ret; | 536 | return ret; |
@@ -549,8 +549,8 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) | |||
549 | unsigned int orig_num_buffers; | 549 | unsigned int orig_num_buffers; |
550 | 550 | ||
551 | orig_num_buffers = num_buffers = ret; | 551 | orig_num_buffers = num_buffers = ret; |
552 | ret = call_qop(q, queue_setup, q, &num_buffers, &num_planes, | 552 | ret = call_qop(q, queue_setup, q, NULL, &num_buffers, |
553 | q->plane_sizes, q->alloc_ctx); | 553 | &num_planes, q->plane_sizes, q->alloc_ctx); |
554 | if (ret) | 554 | if (ret) |
555 | goto free_mem; | 555 | goto free_mem; |
556 | 556 | ||
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 7cf94c09d99a..7d754fbcccbf 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -650,9 +650,9 @@ static void vivi_stop_generating(struct vivi_dev *dev) | |||
650 | /* ------------------------------------------------------------------ | 650 | /* ------------------------------------------------------------------ |
651 | Videobuf operations | 651 | Videobuf operations |
652 | ------------------------------------------------------------------*/ | 652 | ------------------------------------------------------------------*/ |
653 | static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, | 653 | static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, |
654 | unsigned int *nplanes, unsigned int sizes[], | 654 | unsigned int *nbuffers, unsigned int *nplanes, |
655 | void *alloc_ctxs[]) | 655 | unsigned int sizes[], void *alloc_ctxs[]) |
656 | { | 656 | { |
657 | struct vivi_dev *dev = vb2_get_drv_priv(vq); | 657 | struct vivi_dev *dev = vb2_get_drv_priv(vq); |
658 | unsigned long size; | 658 | unsigned long size; |
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index dbd10acc8e80..692e35c232a9 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -218,9 +218,9 @@ struct vb2_buffer { | |||
218 | * pre-queued buffers before calling STREAMON | 218 | * pre-queued buffers before calling STREAMON |
219 | */ | 219 | */ |
220 | struct vb2_ops { | 220 | struct vb2_ops { |
221 | int (*queue_setup)(struct vb2_queue *q, unsigned int *num_buffers, | 221 | int (*queue_setup)(struct vb2_queue *q, const struct v4l2_format *fmt, |
222 | unsigned int *num_planes, unsigned int sizes[], | 222 | unsigned int *num_buffers, unsigned int *num_planes, |
223 | void *alloc_ctxs[]); | 223 | unsigned int sizes[], void *alloc_ctxs[]); |
224 | 224 | ||
225 | void (*wait_prepare)(struct vb2_queue *q); | 225 | void (*wait_prepare)(struct vb2_queue *q); |
226 | void (*wait_finish)(struct vb2_queue *q); | 226 | void (*wait_finish)(struct vb2_queue *q); |