You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[media] media: videobuf2: Change queue_setup argument
Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
4d0b0ed636
commit
33119e80c3
@@ -37,6 +37,7 @@
|
||||
#include <media/v4l2-dv-timings.h>
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-event.h>
|
||||
#include <media/videobuf2-v4l2.h>
|
||||
#include <media/videobuf2-dma-contig.h>
|
||||
|
||||
MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver");
|
||||
@@ -162,10 +163,11 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id)
|
||||
* minimum number: many DMA engines need a minimum of 2 buffers in the
|
||||
* queue and you need to have another available for userspace processing.
|
||||
*/
|
||||
static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *vq, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
const struct v4l2_format *fmt = parg;
|
||||
struct skeleton *skel = vb2_get_drv_priv(vq);
|
||||
|
||||
skel->field = skel->format.field;
|
||||
|
||||
@@ -644,10 +644,11 @@ static void sur40_disconnect(struct usb_interface *interface)
|
||||
* minimum number: many DMA engines need a minimum of 2 buffers in the
|
||||
* queue and you need to have another available for userspace processing.
|
||||
*/
|
||||
static int sur40_queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int sur40_queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
const struct v4l2_format *fmt = parg;
|
||||
struct sur40_state *sur40 = vb2_get_drv_priv(q);
|
||||
|
||||
if (q->num_buffers + *nbuffers < 3)
|
||||
|
||||
@@ -490,7 +490,7 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh,
|
||||
|
||||
/* Videobuf2 operations */
|
||||
static int rtl2832_sdr_queue_setup(struct vb2_queue *vq,
|
||||
const struct v4l2_format *fmt, unsigned int *nbuffers,
|
||||
const void *parg, unsigned int *nbuffers,
|
||||
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
struct rtl2832_sdr_dev *dev = vb2_get_drv_priv(vq);
|
||||
|
||||
@@ -43,11 +43,11 @@ static const struct v4l2_dv_timings cea1080p60 = V4L2_DV_BT_CEA_1920X1080P60;
|
||||
|
||||
/* vb2 DMA streaming ops */
|
||||
|
||||
static int cobalt_queue_setup(struct vb2_queue *q,
|
||||
const struct v4l2_format *fmt,
|
||||
static int cobalt_queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
const struct v4l2_format *fmt = parg;
|
||||
struct cobalt_stream *s = q->drv_priv;
|
||||
unsigned size = s->stride * s->height;
|
||||
|
||||
|
||||
@@ -1138,7 +1138,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder)
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ static int cx23885_start_vbi_dma(struct cx23885_dev *dev,
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -315,7 +315,7 @@ static int cx23885_start_video_dma(struct cx23885_dev *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -141,10 +141,11 @@ int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status)
|
||||
return handled;
|
||||
}
|
||||
|
||||
static int cx25821_queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int cx25821_queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
const struct v4l2_format *fmt = parg;
|
||||
struct cx25821_channel *chan = q->drv_priv;
|
||||
unsigned size = (chan->fmt->depth * chan->width * chan->height) >> 3;
|
||||
|
||||
|
||||
@@ -637,7 +637,7 @@ static int blackbird_stop_codec(struct cx8802_dev *dev)
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev,
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -429,7 +429,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *num_buffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -131,11 +131,12 @@ static int wait_i2c_reg(void __iomem *addr)
|
||||
}
|
||||
|
||||
static int
|
||||
dt3155_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
|
||||
dt3155_queue_setup(struct vb2_queue *vq, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *num_planes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
|
||||
{
|
||||
const struct v4l2_format *fmt = parg;
|
||||
struct dt3155_priv *pd = vb2_get_drv_priv(vq);
|
||||
unsigned size = pd->width * pd->height;
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ static irqreturn_t netup_unidvb_isr(int irq, void *dev_id)
|
||||
}
|
||||
|
||||
static int netup_unidvb_queue_setup(struct vb2_queue *vq,
|
||||
const struct v4l2_format *fmt,
|
||||
const void *parg,
|
||||
unsigned int *nbuffers,
|
||||
unsigned int *nplanes,
|
||||
unsigned int sizes[],
|
||||
|
||||
@@ -116,7 +116,7 @@ int saa7134_ts_buffer_prepare(struct vb2_buffer *vb2)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(saa7134_ts_buffer_prepare);
|
||||
|
||||
int saa7134_ts_queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
int saa7134_ts_queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@ static int buffer_prepare(struct vb2_buffer *vb2)
|
||||
saa7134_buffer_startpage(buf));
|
||||
}
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -904,7 +904,7 @@ static int buffer_prepare(struct vb2_buffer *vb2)
|
||||
saa7134_buffer_startpage(buf));
|
||||
}
|
||||
|
||||
static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
static int queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[])
|
||||
{
|
||||
|
||||
@@ -820,7 +820,7 @@ void saa7134_video_fini(struct saa7134_dev *dev);
|
||||
|
||||
int saa7134_ts_buffer_init(struct vb2_buffer *vb2);
|
||||
int saa7134_ts_buffer_prepare(struct vb2_buffer *vb2);
|
||||
int saa7134_ts_queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt,
|
||||
int saa7134_ts_queue_setup(struct vb2_queue *q, const void *parg,
|
||||
unsigned int *nbuffers, unsigned int *nplanes,
|
||||
unsigned int sizes[], void *alloc_ctxs[]);
|
||||
int saa7134_ts_start_streaming(struct vb2_queue *vq, unsigned int count);
|
||||
|
||||
@@ -663,7 +663,7 @@ static int solo_ring_thread(void *data)
|
||||
}
|
||||
|
||||
static int solo_enc_queue_setup(struct vb2_queue *q,
|
||||
const struct v4l2_format *fmt,
|
||||
const void *parg,
|
||||
unsigned int *num_buffers,
|
||||
unsigned int *num_planes, unsigned int sizes[],
|
||||
void *alloc_ctxs[])
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user