All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Remove/replace incorrect references to videobuf
@ 2022-08-10 13:01 Hans Verkuil
  2022-08-10 13:01 ` [PATCH 1/6] media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L Hans Verkuil
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media

Quite a few drivers and even the vb2 framework still contain references
to the old videobuf framework, even though they don't use that anymore.

Typically this is either in dead code (ngene), or using the term
videobuf/video-buf when either vb2 or 'video buffer' is meant.

There are also a few functions that use _videobuf_ where _video_buf_
is more appropriate.

This series cleans up the terminology, and this also makes it easier
to identify the remaining drivers that actually use the old videobuf
framework.

No code was changed, it is all comments or renaming functions.

Regards,

	Hans

Hans Verkuil (6):
  media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L
  vb2: videobuf -> videobuf2
  media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2'
  media: platform: ti: avoid using 'videobuf' or 'video-buf'
  staging/media/omap4iss/iss_video.c: videobuf -> vb2
  media: avoid use of 'videobuf'

 .../driver-api/media/drivers/pxa_camera.rst   |  2 +-
 .../media/common/videobuf2/videobuf2-core.c   | 14 ++--
 .../media/common/videobuf2/videobuf2-dvb.c    |  4 +-
 .../media/common/videobuf2/videobuf2-v4l2.c   |  4 +-
 drivers/media/dvb-frontends/rtl2832_sdr.c     |  2 +-
 drivers/media/pci/ngene/ngene.h               | 78 -------------------
 .../media/pci/solo6x10/solo6x10-v4l2-enc.c    |  2 +-
 drivers/media/platform/intel/pxa_camera.c     |  8 +-
 drivers/media/platform/marvell/mcam-core.h    |  2 +-
 .../media/platform/renesas/vsp1/vsp1_video.c  |  2 +-
 .../platform/samsung/exynos4-is/fimc-core.h   |  2 +-
 .../media/platform/samsung/s5p-mfc/s5p_mfc.c  |  2 +-
 .../media/platform/ti/am437x/am437x-vpfe.h    |  2 +-
 drivers/media/platform/ti/davinci/vpif.h      | 60 +++++++-------
 .../media/platform/ti/davinci/vpif_capture.c  |  6 +-
 .../media/platform/ti/davinci/vpif_capture.h  |  2 +-
 .../media/platform/ti/davinci/vpif_display.c  |  6 +-
 .../media/platform/ti/davinci/vpif_display.h  |  6 +-
 drivers/media/platform/ti/omap3isp/ispvideo.c |  2 +-
 drivers/media/test-drivers/vim2m.c            |  2 +-
 drivers/media/usb/airspy/airspy.c             |  2 +-
 drivers/media/usb/au0828/au0828-video.c       |  4 +-
 drivers/media/usb/cx231xx/cx231xx-vbi.c       |  2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c     |  2 +-
 drivers/media/usb/em28xx/em28xx-video.c       |  4 +-
 drivers/media/usb/msi2500/msi2500.c           |  2 +-
 drivers/media/usb/pvrusb2/pvrusb2-dvb.c       |  2 +-
 drivers/media/v4l2-core/v4l2-mem2mem.c        |  6 +-
 drivers/staging/media/omap4iss/iss_video.c    |  2 +-
 include/media/davinci/vpbe_display.h          |  6 +-
 include/media/v4l2-mem2mem.h                  | 12 +--
 include/media/videobuf2-core.h                | 16 ++--
 include/media/videobuf2-dvb.h                 |  2 +-
 33 files changed, 96 insertions(+), 174 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  2022-08-10 13:01 ` [PATCH 2/6] vb2: videobuf -> videobuf2 Hans Verkuil
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

Remove the dead code under NGENE_V4L.

Among others, this removes references to the old videobuf framework
that isn't actually used by this driver.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/pci/ngene/ngene.h | 78 ---------------------------------
 1 file changed, 78 deletions(-)

diff --git a/drivers/media/pci/ngene/ngene.h b/drivers/media/pci/ngene/ngene.h
index 3d296f1998a1..d1d7da84cd9d 100644
--- a/drivers/media/pci/ngene/ngene.h
+++ b/drivers/media/pci/ngene/ngene.h
@@ -596,43 +596,6 @@ struct mychip {
 	int capture_source[MIXER_ADDR_LAST + 1][2];
 };
 
-#ifdef NGENE_V4L
-struct ngene_overlay {
-	int                    tvnorm;
-	struct v4l2_rect       w;
-	enum v4l2_field        field;
-	struct v4l2_clip       *clips;
-	int                    nclips;
-	int                    setup_ok;
-};
-
-struct ngene_tvnorm {
-	int   v4l2_id;
-	char  *name;
-	u16   swidth, sheight; /* scaled standard width, height */
-	int   tuner_norm;
-	int   soundstd;
-};
-
-struct ngene_vopen {
-	struct ngene_channel      *ch;
-	enum v4l2_priority         prio;
-	int                        width;
-	int                        height;
-	int                        depth;
-	struct videobuf_queue      vbuf_q;
-	struct videobuf_queue      vbi;
-	int                        fourcc;
-	int                        picxcount;
-	int                        resources;
-	enum v4l2_buf_type         type;
-	const struct ngene_format *fmt;
-
-	const struct ngene_format *ovfmt;
-	struct ngene_overlay       ov;
-};
-#endif
-
 struct ngene_channel {
 	struct device         device;
 	struct i2c_adapter    i2c_adapter;
@@ -709,18 +672,6 @@ struct ngene_channel {
 	int                   tvnorm_num;
 	int                   tvnorm;
 
-#ifdef NGENE_V4L
-	int                   videousers;
-	struct v4l2_prio_state prio;
-	struct ngene_vopen    init;
-	int                   resources;
-	struct v4l2_framebuffer fbuf;
-	struct ngene_buffer  *screen;     /* overlay             */
-	struct list_head      capture;    /* video capture queue */
-	spinlock_t s_lock;
-	struct semaphore reslock;
-#endif
-
 	int running;
 
 	int tsin_offset;
@@ -863,35 +814,6 @@ struct ngene_info {
 	int (*switch_ctrl)(struct ngene_channel *, int, int);
 };
 
-#ifdef NGENE_V4L
-struct ngene_format {
-	char *name;
-	int   fourcc;          /* video4linux 2      */
-	int   btformat;        /* BT848_COLOR_FMT_*  */
-	int   format;
-	int   btswap;          /* BT848_COLOR_CTL_*  */
-	int   depth;           /* bit/pixel          */
-	int   flags;
-	int   hshift, vshift;  /* for planar modes   */
-	int   palette;
-};
-
-#define RESOURCE_OVERLAY       1
-#define RESOURCE_VIDEO         2
-#define RESOURCE_VBI           4
-
-struct ngene_buffer {
-	/* common v4l buffer stuff -- must be first */
-	struct videobuf_buffer     vb;
-
-	/* ngene specific */
-	const struct ngene_format *fmt;
-	int                        tvnorm;
-	int                        btformat;
-	int                        btswap;
-};
-#endif
-
 
 /* Provided by ngene-core.c */
 int ngene_probe(struct pci_dev *pci_dev, const struct pci_device_id *id);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] vb2: videobuf -> videobuf2
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
  2022-08-10 13:01 ` [PATCH 1/6] media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  2022-08-10 13:01 ` [PATCH 3/6] media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2' Hans Verkuil
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

It is confusing to use the term 'videobuf' or 'video-buf' since that
usually refers to the old videobuf version 1 framework. Rename to
'videobuf2' or vb2.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/common/videobuf2/videobuf2-core.c | 14 +++++++-------
 drivers/media/common/videobuf2/videobuf2-dvb.c  |  4 ++--
 drivers/media/common/videobuf2/videobuf2-v4l2.c |  4 ++--
 include/media/videobuf2-core.h                  | 16 ++++++++--------
 include/media/videobuf2-dvb.h                   |  2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index b203c1e26353..ab9697f3b5f1 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -398,7 +398,7 @@ static void init_buffer_cache_hints(struct vb2_queue *q, struct vb2_buffer *vb)
 }
 
 /*
- * __vb2_queue_alloc() - allocate videobuf buffer structures and (for MMAP type)
+ * __vb2_queue_alloc() - allocate vb2 buffer structures and (for MMAP type)
  * video buffer memory for all buffers/planes on the queue and initializes the
  * queue
  *
@@ -417,7 +417,7 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
 			    VB2_MAX_FRAME - q->num_buffers);
 
 	for (buffer = 0; buffer < num_buffers; ++buffer) {
-		/* Allocate videobuf buffer structures */
+		/* Allocate vb2 buffer structures */
 		vb = kzalloc(q->buf_struct_size, GFP_KERNEL);
 		if (!vb) {
 			dprintk(q, 1, "memory alloc for buffer struct failed\n");
@@ -599,7 +599,7 @@ static int __vb2_queue_free(struct vb2_queue *q, unsigned int buffers)
 	}
 #endif
 
-	/* Free videobuf buffers */
+	/* Free vb2 buffers */
 	for (buffer = q->num_buffers - buffers; buffer < q->num_buffers;
 	     ++buffer) {
 		kfree(q->bufs[buffer]);
@@ -1949,7 +1949,7 @@ int vb2_core_dqbuf(struct vb2_queue *q, unsigned int *pindex, void *pb,
 	if (pb)
 		call_void_bufop(q, fill_user_buffer, vb, pb);
 
-	/* Remove from videobuf queue */
+	/* Remove from vb2 queue */
 	list_del(&vb->queued_entry);
 	q->queued_count--;
 
@@ -1978,7 +1978,7 @@ EXPORT_SYMBOL_GPL(vb2_core_dqbuf);
  * __vb2_queue_cancel() - cancel and stop (pause) streaming
  *
  * Removes all queued buffers from driver's queue and all buffers queued by
- * userspace from videobuf's queue. Returns to state after reqbufs.
+ * userspace from vb2's queue. Returns to state after reqbufs.
  */
 static void __vb2_queue_cancel(struct vb2_queue *q)
 {
@@ -2016,7 +2016,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q)
 	q->uses_qbuf = 0;
 
 	/*
-	 * Remove all buffers from videobuf's list...
+	 * Remove all buffers from vb2's list...
 	 */
 	INIT_LIST_HEAD(&q->queued_list);
 	/*
@@ -2139,7 +2139,7 @@ int vb2_core_streamoff(struct vb2_queue *q, unsigned int type)
 
 	/*
 	 * Cancel will pause streaming and remove all buffers from the driver
-	 * and videobuf, effectively returning control over them to userspace.
+	 * and vb2, effectively returning control over them to userspace.
 	 *
 	 * Note that we do this even if q->streaming == 0: if you prepare or
 	 * queue buffers, and then call streamoff without ever having called
diff --git a/drivers/media/common/videobuf2/videobuf2-dvb.c b/drivers/media/common/videobuf2/videobuf2-dvb.c
index 9d571c9d31e9..8c15bcd07eef 100644
--- a/drivers/media/common/videobuf2/videobuf2-dvb.c
+++ b/drivers/media/common/videobuf2/videobuf2-dvb.c
@@ -3,8 +3,8 @@
  *
  * some helper function for simple DVB cards which simply DMA the
  * complete transport stream and let the computer sort everything else
- * (i.e. we are using the software demux, ...).  Also uses the
- * video-buf to manage DMA buffers.
+ * (i.e. we are using the software demux, ...).  Also uses vb2
+ * to manage DMA buffers.
  *
  * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
  */
diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
index f26cb8586bd4..2ecd4483e139 100644
--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
@@ -268,7 +268,7 @@ static int vb2_fill_vb2_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b
 		/*
 		 * Single-planar buffers do not use planes array,
 		 * so fill in relevant v4l2_buffer struct fields instead.
-		 * In videobuf we use our internal V4l2_planes struct for
+		 * In vb2 we use our internal V4l2_planes struct for
 		 * single-planar buffers as well, for simplicity.
 		 *
 		 * If bytesused == 0 for the output buffer, then fall back
@@ -652,7 +652,7 @@ EXPORT_SYMBOL_GPL(vb2_find_buffer);
 
 /*
  * vb2_querybuf() - query video buffer information
- * @q:		videobuf queue
+ * @q:		vb2 queue
  * @b:		buffer struct passed from userspace to vidioc_querybuf handler
  *		in driver
  *
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 5468b633b9d2..3253bd2f6fee 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -65,7 +65,7 @@ struct vb2_buffer;
  *		 DMABUF memory types.
  * @get_userptr: acquire userspace memory for a hardware operation; used for
  *		 USERPTR memory types; vaddr is the address passed to the
- *		 videobuf layer when queuing a video buffer of USERPTR type;
+ *		 videobuf2 layer when queuing a video buffer of USERPTR type;
  *		 should return an allocator private per-buffer structure
  *		 associated with the buffer on success, ERR_PTR() on failure;
  *		 the returned private structure will then be passed as @buf_priv
@@ -97,7 +97,7 @@ struct vb2_buffer;
  *		associated with the passed private structure or NULL if not
  *		available.
  * @num_users:	return the current number of users of a memory buffer;
- *		return 1 if the videobuf layer (or actually the driver using
+ *		return 1 if the videobuf2 layer (or actually the driver using
  *		it) is the only user.
  * @mmap:	setup a userspace mapping for a given memory buffer under
  *		the provided virtual memory region.
@@ -210,11 +210,11 @@ enum vb2_io_modes {
  * enum vb2_buffer_state - current video buffer state.
  * @VB2_BUF_STATE_DEQUEUED:	buffer under userspace control.
  * @VB2_BUF_STATE_IN_REQUEST:	buffer is queued in media request.
- * @VB2_BUF_STATE_PREPARING:	buffer is being prepared in videobuf.
- * @VB2_BUF_STATE_QUEUED:	buffer queued in videobuf, but not in driver.
+ * @VB2_BUF_STATE_PREPARING:	buffer is being prepared in videobuf2.
+ * @VB2_BUF_STATE_QUEUED:	buffer queued in videobuf2, but not in driver.
  * @VB2_BUF_STATE_ACTIVE:	buffer queued in driver and possibly used
  *				in a hardware operation.
- * @VB2_BUF_STATE_DONE:		buffer returned from driver to videobuf, but
+ * @VB2_BUF_STATE_DONE:		buffer returned from driver to videobuf2, but
  *				not yet dequeued to userspace.
  * @VB2_BUF_STATE_ERROR:	same as above, but the operation on the buffer
  *				has ended with an error, which will be reported
@@ -466,7 +466,7 @@ struct vb2_buf_ops {
 };
 
 /**
- * struct vb2_queue - a videobuf queue.
+ * struct vb2_queue - a videobuf2 queue.
  *
  * @type:	private buffer type whose content is defined by the vb2-core
  *		caller. For example, for V4L2, it should match
@@ -544,7 +544,7 @@ struct vb2_buf_ops {
  * @mmap_lock:	private mutex used when buffers are allocated/freed/mmapped
  * @memory:	current memory type used
  * @dma_dir:	DMA mapping direction.
- * @bufs:	videobuf buffer structures
+ * @bufs:	videobuf2 buffer structures
  * @num_buffers: number of allocated/used buffers
  * @queued_list: list of buffers currently queued from userspace
  * @queued_count: number of buffers queued and ready for streaming.
@@ -683,7 +683,7 @@ void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no);
 void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no);
 
 /**
- * vb2_buffer_done() - inform videobuf that an operation on a buffer
+ * vb2_buffer_done() - inform videobuf2 that an operation on a buffer
  *	is finished.
  * @vb:		pointer to &struct vb2_buffer to be used.
  * @state:	state of the buffer, as defined by &enum vb2_buffer_state.
diff --git a/include/media/videobuf2-dvb.h b/include/media/videobuf2-dvb.h
index 8605366ec87c..2d577b945637 100644
--- a/include/media/videobuf2-dvb.h
+++ b/include/media/videobuf2-dvb.h
@@ -24,7 +24,7 @@ struct vb2_dvb {
 	struct dvb_frontend	*frontend;
 	struct vb2_queue	dvbq;
 
-	/* video-buf-dvb state info */
+	/* vb2-dvb state info */
 	struct mutex		lock;
 	int			nfeeds;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2'
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
  2022-08-10 13:01 ` [PATCH 1/6] media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L Hans Verkuil
  2022-08-10 13:01 ` [PATCH 2/6] vb2: videobuf -> videobuf2 Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  2022-08-10 13:01 ` [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf' Hans Verkuil
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

It is confusing to refer to vb2 structures with 'videobuf', since
that typically is used to refer to the old videobuf version 1
framework.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/v4l2-core/v4l2-mem2mem.c |  6 +++---
 include/media/v4l2-mem2mem.h           | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 837e1855f94b..be7fde1ed3ea 100644
--- a/drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/drivers/media/v4l2-core/v4l2-mem2mem.c
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Memory-to-memory device framework for Video for Linux 2 and videobuf.
+ * Memory-to-memory device framework for Video for Linux 2 and vb2.
  *
- * Helper functions for devices that use videobuf buffers for both their
+ * Helper functions for devices that use vb2 buffers for both their
  * source and destination.
  *
  * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
@@ -21,7 +21,7 @@
 #include <media/v4l2-fh.h>
 #include <media/v4l2-event.h>
 
-MODULE_DESCRIPTION("Mem to mem device framework for videobuf");
+MODULE_DESCRIPTION("Mem to mem device framework for vb2");
 MODULE_AUTHOR("Pawel Osciak, <pawel@osciak.com>");
 MODULE_LICENSE("GPL");
 
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
index fdbd5257e020..bb9de6a899e0 100644
--- a/include/media/v4l2-mem2mem.h
+++ b/include/media/v4l2-mem2mem.h
@@ -486,10 +486,10 @@ __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
  * @vma: pointer to struct &vm_area_struct
  *
  * Call from driver's mmap() function. Will handle mmap() for both queues
- * seamlessly for videobuffer, which will receive normal per-queue offsets and
- * proper videobuf queue pointers. The differentiation is made outside videobuf
- * by adding a predefined offset to buffers from one of the queues and
- * subtracting it before passing it back to videobuf. Only drivers (and
+ * seamlessly for the video buffer, which will receive normal per-queue offsets
+ * and proper vb2 queue pointers. The differentiation is made outside
+ * vb2 by adding a predefined offset to buffers from one of the queues
+ * and subtracting it before passing it back to vb2. Only drivers (and
  * thus applications) receive modified offsets.
  */
 int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
@@ -544,7 +544,7 @@ void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev);
  * @m2m_dev: opaque pointer to the internal data to handle M2M context
  * @drv_priv: driver's instance private data
  * @queue_init: a callback for queue type-specific initialization function
- *	to be used for initializing videobuf_queues
+ *	to be used for initializing vb2_queues
  *
  * Usually called from driver's ``open()`` function.
  */
@@ -579,7 +579,7 @@ void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx);
  * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx
  * @vbuf: pointer to struct &vb2_v4l2_buffer
  *
- * Call from videobuf_queue_ops->ops->buf_queue, videobuf_queue_ops callback.
+ * Call from vb2_queue_ops->ops->buf_queue, vb2_queue_ops callback.
  */
 void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx,
 			struct vb2_v4l2_buffer *vbuf);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf'
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
                   ` (2 preceding siblings ...)
  2022-08-10 13:01 ` [PATCH 3/6] media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2' Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  2022-08-11  9:27   ` Lad, Prabhakar
  2022-08-10 13:01 ` [PATCH 5/6] staging/media/omap4iss/iss_video.c: videobuf -> vb2 Hans Verkuil
  2022-08-10 13:01 ` [PATCH 6/6] media: avoid use of 'videobuf' Hans Verkuil
  5 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Lad Prabhakar

These terms typically refer to the old version 1 videobuf framework.
It is confusing to use them for the vb2 framework, so reword these
comments.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
CC: Lad Prabhakar <prabhakar.csengg@gmail.com>
---
 .../media/platform/ti/am437x/am437x-vpfe.h    |  2 +-
 drivers/media/platform/ti/davinci/vpif.h      | 60 +++++++++----------
 .../media/platform/ti/davinci/vpif_capture.c  |  6 +-
 .../media/platform/ti/davinci/vpif_capture.h  |  2 +-
 .../media/platform/ti/davinci/vpif_display.c  |  6 +-
 .../media/platform/ti/davinci/vpif_display.h  |  6 +-
 drivers/media/platform/ti/omap3isp/ispvideo.c |  2 +-
 include/media/davinci/vpbe_display.h          |  6 +-
 8 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.h b/drivers/media/platform/ti/am437x/am437x-vpfe.h
index 05ee37db0273..f8b4e917b91a 100644
--- a/drivers/media/platform/ti/am437x/am437x-vpfe.h
+++ b/drivers/media/platform/ti/am437x/am437x-vpfe.h
@@ -267,7 +267,7 @@ struct vpfe_device {
 	 * is different from the image window
 	 */
 	struct v4l2_rect crop;
-	/* Buffer queue used in video-buf */
+	/* Buffer queue used in vb2 */
 	struct vb2_queue buffer_queue;
 	/* Queue of filled frames */
 	struct list_head dma_queue;
diff --git a/drivers/media/platform/ti/davinci/vpif.h b/drivers/media/platform/ti/davinci/vpif.h
index c6d1d890478a..9ac1430f5bf9 100644
--- a/drivers/media/platform/ti/davinci/vpif.h
+++ b/drivers/media/platform/ti/davinci/vpif.h
@@ -330,10 +330,10 @@ static inline void channel1_intr_enable(int enable)
 }
 
 /* inline function to set buffer addresses in case of Y/C non mux mode */
-static inline void ch0_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
-						 unsigned long btm_strt_luma,
-						 unsigned long top_strt_chroma,
-						 unsigned long btm_strt_chroma)
+static inline void ch0_set_video_buf_addr_yc_nmux(unsigned long top_strt_luma,
+						  unsigned long btm_strt_luma,
+						  unsigned long top_strt_chroma,
+						  unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH0_TOP_STRT_ADD_LUMA);
 	regw(btm_strt_luma, VPIF_CH0_BTM_STRT_ADD_LUMA);
@@ -342,10 +342,10 @@ static inline void ch0_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
 }
 
 /* inline function to set buffer addresses in VPIF registers for video data */
-static inline void ch0_set_videobuf_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+static inline void ch0_set_video_buf_addr(unsigned long top_strt_luma,
+					  unsigned long btm_strt_luma,
+					  unsigned long top_strt_chroma,
+					  unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH0_TOP_STRT_ADD_LUMA);
 	regw(btm_strt_luma, VPIF_CH0_BTM_STRT_ADD_LUMA);
@@ -353,10 +353,10 @@ static inline void ch0_set_videobuf_addr(unsigned long top_strt_luma,
 	regw(btm_strt_chroma, VPIF_CH0_BTM_STRT_ADD_CHROMA);
 }
 
-static inline void ch1_set_videobuf_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+static inline void ch1_set_video_buf_addr(unsigned long top_strt_luma,
+					  unsigned long btm_strt_luma,
+					  unsigned long top_strt_chroma,
+					  unsigned long btm_strt_chroma)
 {
 
 	regw(top_strt_luma, VPIF_CH1_TOP_STRT_ADD_LUMA);
@@ -546,10 +546,10 @@ static inline void channel3_clipping_enable(int enable)
 }
 
 /* inline function to set buffer addresses in case of Y/C non mux mode */
-static inline void ch2_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
-						 unsigned long btm_strt_luma,
-						 unsigned long top_strt_chroma,
-						 unsigned long btm_strt_chroma)
+static inline void ch2_set_video_buf_addr_yc_nmux(unsigned long top_strt_luma,
+						  unsigned long btm_strt_luma,
+						  unsigned long top_strt_chroma,
+						  unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_LUMA);
 	regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_LUMA);
@@ -558,10 +558,10 @@ static inline void ch2_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
 }
 
 /* inline function to set buffer addresses in VPIF registers for video data */
-static inline void ch2_set_videobuf_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+static inline void ch2_set_video_buf_addr(unsigned long top_strt_luma,
+					  unsigned long btm_strt_luma,
+					  unsigned long top_strt_chroma,
+					  unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_LUMA);
 	regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_LUMA);
@@ -569,10 +569,10 @@ static inline void ch2_set_videobuf_addr(unsigned long top_strt_luma,
 	regw(btm_strt_chroma, VPIF_CH2_BTM_STRT_ADD_CHROMA);
 }
 
-static inline void ch3_set_videobuf_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+static inline void ch3_set_video_buf_addr(unsigned long top_strt_luma,
+					  unsigned long btm_strt_luma,
+					  unsigned long top_strt_chroma,
+					  unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH3_TOP_STRT_ADD_LUMA);
 	regw(btm_strt_luma, VPIF_CH3_BTM_STRT_ADD_LUMA);
@@ -582,18 +582,18 @@ static inline void ch3_set_videobuf_addr(unsigned long top_strt_luma,
 
 /* inline function to set buffer addresses in VPIF registers for vbi data */
 static inline void ch2_set_vbi_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+				    unsigned long btm_strt_luma,
+				    unsigned long top_strt_chroma,
+				    unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_VANC);
 	regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_VANC);
 }
 
 static inline void ch3_set_vbi_addr(unsigned long top_strt_luma,
-					 unsigned long btm_strt_luma,
-					 unsigned long top_strt_chroma,
-					 unsigned long btm_strt_chroma)
+				    unsigned long btm_strt_luma,
+				    unsigned long top_strt_chroma,
+				    unsigned long btm_strt_chroma)
 {
 	regw(top_strt_luma, VPIF_CH3_TOP_STRT_ADD_VANC);
 	regw(btm_strt_luma, VPIF_CH3_BTM_STRT_ADD_VANC);
diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c
index b91eec899eb5..580723333fcc 100644
--- a/drivers/media/platform/ti/davinci/vpif_capture.c
+++ b/drivers/media/platform/ti/davinci/vpif_capture.c
@@ -632,11 +632,11 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode)
 	common = &(ch->common[VPIF_VIDEO_INDEX]);
 
 	if (VPIF_CHANNEL1_VIDEO == ch->channel_id)
-		common->set_addr = ch1_set_videobuf_addr;
+		common->set_addr = ch1_set_video_buf_addr;
 	else if (2 == muxmode)
-		common->set_addr = ch0_set_videobuf_addr_yc_nmux;
+		common->set_addr = ch0_set_video_buf_addr_yc_nmux;
 	else
-		common->set_addr = ch0_set_videobuf_addr;
+		common->set_addr = ch0_set_video_buf_addr;
 }
 
 /**
diff --git a/drivers/media/platform/ti/davinci/vpif_capture.h b/drivers/media/platform/ti/davinci/vpif_capture.h
index d5951f61df47..6191056500cf 100644
--- a/drivers/media/platform/ti/davinci/vpif_capture.h
+++ b/drivers/media/platform/ti/davinci/vpif_capture.h
@@ -50,7 +50,7 @@ struct common_obj {
 	struct vpif_cap_buffer *next_frm;
 	/* Used to store pixel format */
 	struct v4l2_format fmt;
-	/* Buffer queue used in video-buf */
+	/* Buffer queue used in vb2 */
 	struct vb2_queue buffer_queue;
 	/* Queue of filled frames */
 	struct list_head dma_queue;
diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c
index 5d524acc995d..b2df81603f62 100644
--- a/drivers/media/platform/ti/davinci/vpif_display.c
+++ b/drivers/media/platform/ti/davinci/vpif_display.c
@@ -563,12 +563,12 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode)
 	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];
 
 	if (VPIF_CHANNEL3_VIDEO == ch->channel_id) {
-		common->set_addr = ch3_set_videobuf_addr;
+		common->set_addr = ch3_set_video_buf_addr;
 	} else {
 		if (2 == muxmode)
-			common->set_addr = ch2_set_videobuf_addr_yc_nmux;
+			common->set_addr = ch2_set_video_buf_addr_yc_nmux;
 		else
-			common->set_addr = ch2_set_videobuf_addr;
+			common->set_addr = ch2_set_video_buf_addr;
 	}
 }
 
diff --git a/drivers/media/platform/ti/davinci/vpif_display.h b/drivers/media/platform/ti/davinci/vpif_display.h
index f98062e79167..f300de37e041 100644
--- a/drivers/media/platform/ti/davinci/vpif_display.h
+++ b/drivers/media/platform/ti/davinci/vpif_display.h
@@ -72,11 +72,11 @@ struct common_obj {
 	struct vpif_disp_buffer *next_frm;	/* Pointer pointing to next
 						 * vb2_buffer */
 	struct v4l2_format fmt;			/* Used to store the format */
-	struct vb2_queue buffer_queue;		/* Buffer queue used in
-						 * video-buf */
+	struct vb2_queue buffer_queue;		/* Buffer queue used in vb2 */
 
 	struct list_head dma_queue;		/* Queue of filled frames */
-	spinlock_t irqlock;			/* Used in video-buf */
+	spinlock_t irqlock;			/* Used for video buffer
+						 * handling */
 
 	/* channel specific parameters */
 	struct mutex lock;			/* lock used to access this
diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c
index d7059180e80e..cc9a97d5d505 100644
--- a/drivers/media/platform/ti/omap3isp/ispvideo.c
+++ b/drivers/media/platform/ti/omap3isp/ispvideo.c
@@ -1071,7 +1071,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
  * processing might be possible but requires more testing.
  *
  * Stream start must be delayed until buffers are available at both the input
- * and output. The pipeline must be started in the videobuf queue callback with
+ * and output. The pipeline must be started in the vb2 queue callback with
  * the buffers queue spinlock held. The modules subdev set stream operation must
  * not sleep.
  */
diff --git a/include/media/davinci/vpbe_display.h b/include/media/davinci/vpbe_display.h
index 6d2a93740130..d8751ea926a2 100644
--- a/include/media/davinci/vpbe_display.h
+++ b/include/media/davinci/vpbe_display.h
@@ -69,13 +69,13 @@ struct vpbe_layer {
 	struct vpbe_disp_buffer *cur_frm;
 	/* Pointer pointing to next v4l2_buffer */
 	struct vpbe_disp_buffer *next_frm;
-	/* videobuf specific parameters
-	 * Buffer queue used in video-buf
+	/* vb2 specific parameters
+	 * Buffer queue used in vb2
 	 */
 	struct vb2_queue buffer_queue;
 	/* Queue of filled frames */
 	struct list_head dma_queue;
-	/* Used in video-buf */
+	/* Used for video buffer handling */
 	spinlock_t irqlock;
 	/* V4l2 specific parameters */
 	/* Identifies video device for this layer */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] staging/media/omap4iss/iss_video.c: videobuf -> vb2
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
                   ` (3 preceding siblings ...)
  2022-08-10 13:01 ` [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf' Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  2022-08-10 13:01 ` [PATCH 6/6] media: avoid use of 'videobuf' Hans Verkuil
  5 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

Rename 'videobuf' to 'vb2' in the comment. This avoids confusing
terminology since 'videobuf' typically refers to the old vb1
framework.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/staging/media/omap4iss/iss_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c
index 9512cd3314f2..842509dcfedf 100644
--- a/drivers/staging/media/omap4iss/iss_video.c
+++ b/drivers/staging/media/omap4iss/iss_video.c
@@ -843,7 +843,7 @@ iss_video_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
  * processing might be possible but requires more testing.
  *
  * Stream start must be delayed until buffers are available at both the input
- * and output. The pipeline must be started in the videobuf queue callback with
+ * and output. The pipeline must be started in the vb2 queue callback with
  * the buffers queue spinlock held. The modules subdev set stream operation must
  * not sleep.
  */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] media: avoid use of 'videobuf'
  2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
                   ` (4 preceding siblings ...)
  2022-08-10 13:01 ` [PATCH 5/6] staging/media/omap4iss/iss_video.c: videobuf -> vb2 Hans Verkuil
@ 2022-08-10 13:01 ` Hans Verkuil
  5 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2022-08-10 13:01 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

The term 'videobuf' typically refers to the old videobuf version 1
framework. Avoid using this word in drivers that are converted to
vb2.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 Documentation/driver-api/media/drivers/pxa_camera.rst | 2 +-
 drivers/media/dvb-frontends/rtl2832_sdr.c             | 2 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c        | 2 +-
 drivers/media/platform/intel/pxa_camera.c             | 8 ++++----
 drivers/media/platform/marvell/mcam-core.h            | 2 +-
 drivers/media/platform/renesas/vsp1/vsp1_video.c      | 2 +-
 drivers/media/platform/samsung/exynos4-is/fimc-core.h | 2 +-
 drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c      | 2 +-
 drivers/media/test-drivers/vim2m.c                    | 2 +-
 drivers/media/usb/airspy/airspy.c                     | 2 +-
 drivers/media/usb/au0828/au0828-video.c               | 4 ++--
 drivers/media/usb/cx231xx/cx231xx-vbi.c               | 2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c             | 2 +-
 drivers/media/usb/em28xx/em28xx-video.c               | 4 ++--
 drivers/media/usb/msi2500/msi2500.c                   | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-dvb.c               | 2 +-
 16 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/Documentation/driver-api/media/drivers/pxa_camera.rst b/Documentation/driver-api/media/drivers/pxa_camera.rst
index ee1bd96b66dd..46919919baac 100644
--- a/Documentation/driver-api/media/drivers/pxa_camera.rst
+++ b/Documentation/driver-api/media/drivers/pxa_camera.rst
@@ -19,7 +19,7 @@ Global video workflow
 
 a) QCI stopped
    Initially, the QCI interface is stopped.
-   When a buffer is queued (pxa_videobuf_ops->buf_queue), the QCI starts.
+   When a buffer is queued, start_streaming is called and the QCI starts.
 
 b) QCI started
    More buffers can be queued while the QCI is started without halting the
diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c b/drivers/media/dvb-frontends/rtl2832_sdr.c
index 6a4f2997d6f5..05f71d169726 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
@@ -245,7 +245,7 @@ static void rtl2832_sdr_urb_complete(struct urb *urb)
 		if (unlikely(fbuf == NULL)) {
 			dev->vb_full++;
 			dev_notice_ratelimited(&pdev->dev,
-					       "videobuf is full, %d packets dropped\n",
+					       "video buffer is full, %d packets dropped\n",
 					       dev->vb_full);
 			goto skip;
 		}
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 80d20e2a2099..0adf3d80f248 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -1020,7 +1020,7 @@ static int solo_g_parm(struct file *file, void *priv,
 	cp->timeperframe.numerator = solo_enc->interval;
 	cp->timeperframe.denominator = solo_enc->solo_dev->fps;
 	cp->capturemode = 0;
-	/* XXX: Shouldn't we be able to get/set this from videobuf? */
+	/* XXX: Shouldn't we be able to get/set this from vb2? */
 	cp->readbuffers = 2;
 
 	return 0;
diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c
index 35145e3348f0..54270d6b6f50 100644
--- a/drivers/media/platform/intel/pxa_camera.c
+++ b/drivers/media/platform/intel/pxa_camera.c
@@ -854,7 +854,7 @@ static int pxa_init_dma_channel(struct pxa_camera_dev *pcdev,
 	return -ENOMEM;
 }
 
-static void pxa_videobuf_set_actdma(struct pxa_camera_dev *pcdev,
+static void pxa_video_buf_set_actdma(struct pxa_camera_dev *pcdev,
 				    struct pxa_buffer *buf)
 {
 	buf->active_dma = DMA_Y;
@@ -973,7 +973,7 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev,
  * stopped. This means the tailed buffer would never be transferred by DMA.
  * This function restarts the capture for this corner case, where :
  *  - DADR() == DADDR_STOP
- *  - a videobuffer is queued on the pcdev->capture list
+ *  - a video buffer is queued on the pcdev->capture list
  *
  * Please check the "DMA hot chaining timeslice issue" in
  *   Documentation/driver-api/media/drivers/pxa_camera.rst
@@ -1163,7 +1163,7 @@ static void pxa_camera_eof(struct tasklet_struct *t)
 	pcdev->active = list_first_entry(&pcdev->capture,
 					 struct pxa_buffer, queue);
 	buf = pcdev->active;
-	pxa_videobuf_set_actdma(pcdev, buf);
+	pxa_video_buf_set_actdma(pcdev, buf);
 
 	pxa_dma_start_channels(pcdev);
 }
@@ -1416,7 +1416,7 @@ static int pxac_vb2_prepare(struct vb2_buffer *vb)
 	 * the actual buffer is yours
 	 */
 	buf->inwork = 0;
-	pxa_videobuf_set_actdma(pcdev, buf);
+	pxa_video_buf_set_actdma(pcdev, buf);
 
 	return ret;
 }
diff --git a/drivers/media/platform/marvell/mcam-core.h b/drivers/media/platform/marvell/mcam-core.h
index f324d808d737..51e66db45af6 100644
--- a/drivers/media/platform/marvell/mcam-core.h
+++ b/drivers/media/platform/marvell/mcam-core.h
@@ -32,7 +32,7 @@
 
 #if !defined(MCAM_MODE_VMALLOC) && !defined(MCAM_MODE_DMA_CONTIG) && \
 	!defined(MCAM_MODE_DMA_SG)
-#error One of the videobuf buffer modes must be selected in the config
+#error One of the vb2 buffer modes must be selected in the config
 #endif
 
 
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_video.c b/drivers/media/platform/renesas/vsp1/vsp1_video.c
index e8e0ee5f2277..df1606b49d77 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_video.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_video.c
@@ -305,7 +305,7 @@ static int vsp1_video_pipeline_setup_partitions(struct vsp1_pipeline *pipe)
  * @video: the video node
  *
  * This function completes the current buffer by filling its sequence number,
- * time stamp and payload size, and hands it back to the videobuf core.
+ * time stamp and payload size, and hands it back to the vb2 core.
  *
  * Return the next queued buffer or NULL if the queue is empty.
  */
diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.h b/drivers/media/platform/samsung/exynos4-is/fimc-core.h
index 7a058f3e6298..2b0760add092 100644
--- a/drivers/media/platform/samsung/exynos4-is/fimc-core.h
+++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.h
@@ -215,7 +215,7 @@ struct fimc_addr {
 
 /**
  * struct fimc_vid_buffer - the driver's video buffer
- * @vb:    v4l videobuf buffer
+ * @vb:    v4l vb2 buffer
  * @list:  linked list structure for buffer queue
  * @addr: precalculated DMA address set
  * @index: buffer index for the output DMA engine
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index 761341934925..219fc0235b69 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -323,7 +323,7 @@ static void s5p_mfc_handle_frame_new(struct s5p_mfc_ctx *ctx, unsigned int err)
 	}
 	ctx->sequence++;
 	/* The MFC returns address of the buffer, now we have to
-	 * check which videobuf does it correspond to */
+	 * check which vb2_buffer does it correspond to */
 	list_for_each_entry(dst_buf, &ctx->dst_queue, list) {
 		u32 addr = (u32)vb2_dma_contig_plane_dma_addr(&dst_buf->b->vb2_buf, 0);
 
diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c
index 47575490e74a..7964426bf2f7 100644
--- a/drivers/media/test-drivers/vim2m.c
+++ b/drivers/media/test-drivers/vim2m.c
@@ -2,7 +2,7 @@
 /*
  * A virtual v4l2-mem2mem example device.
  *
- * This is a virtual device driver for testing mem-to-mem videobuf framework.
+ * This is a virtual device driver for testing mem-to-mem vb2 framework.
  * It simulates a device that uses memory buffers for both source and
  * destination, processes the data and issues an "irq" (simulated by a delayed
  * workqueue).
diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c
index 240a7cc56777..b8b88244f963 100644
--- a/drivers/media/usb/airspy/airspy.c
+++ b/drivers/media/usb/airspy/airspy.c
@@ -294,7 +294,7 @@ static void airspy_urb_complete(struct urb *urb)
 		if (unlikely(fbuf == NULL)) {
 			s->vb_full++;
 			dev_notice_ratelimited(s->dev,
-					"videobuf is full, %d packets dropped\n",
+					"video buffer is full, %d packets dropped\n",
 					s->vb_full);
 			goto skip;
 		}
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
index c0f118563c7d..eb303e94cceb 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -384,7 +384,7 @@ static void au0828_copy_video(struct au0828_dev *dev,
 }
 
 /*
- * video-buf generic routine to get the next available buffer
+ * generic routine to get the next available buffer
  */
 static inline void get_next_buf(struct au0828_dmaqueue *dma_q,
 				struct au0828_buffer **buf)
@@ -459,7 +459,7 @@ static void au0828_copy_vbi(struct au0828_dev *dev,
 
 
 /*
- * video-buf generic routine to get the next available VBI buffer
+ * generic routine to get the next available VBI buffer
  */
 static inline void vbi_get_next_buf(struct au0828_dmaqueue *dma_q,
 				    struct au0828_buffer **buf)
diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c
index fdc8b7f7b0c1..33431d9f54c2 100644
--- a/drivers/media/usb/cx231xx/cx231xx-vbi.c
+++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c
@@ -558,7 +558,7 @@ u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
 }
 
 /*
- * video-buf generic routine to get the next available buffer
+ * generic routine to get the next available buffer
  */
 static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
 				    struct cx231xx_buffer **buf)
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 425e470b0fd3..e23b8ccd79d4 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -220,7 +220,7 @@ static inline void print_err_status(struct cx231xx *dev, int packet, int status)
 }
 
 /*
- * video-buf generic routine to get the next available buffer
+ * generic routine to get the next available buffer
  */
 static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q,
 				struct cx231xx_buffer **buf)
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 8181c0e6a25b..25e0620deff1 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -440,7 +440,7 @@ static inline void finish_buffer(struct em28xx *dev,
 }
 
 /*
- * Copy picture data from USB buffer to videobuf buffer
+ * Copy picture data from USB buffer to video buffer
  */
 static void em28xx_copy_video(struct em28xx *dev,
 			      struct em28xx_buffer *buf,
@@ -521,7 +521,7 @@ static void em28xx_copy_video(struct em28xx *dev,
 }
 
 /*
- * Copy VBI data from USB buffer to videobuf buffer
+ * Copy VBI data from USB buffer to video buffer
  */
 static void em28xx_copy_vbi(struct em28xx *dev,
 			    struct em28xx_buffer *buf,
diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c
index 71de6b4c4e4c..5a1f2698efb7 100644
--- a/drivers/media/usb/msi2500/msi2500.c
+++ b/drivers/media/usb/msi2500/msi2500.c
@@ -411,7 +411,7 @@ static void msi2500_isoc_handler(struct urb *urb)
 		if (unlikely(fbuf == NULL)) {
 			dev->vb_full++;
 			dev_dbg_ratelimited(dev->dev,
-					    "videobuf is full, %d packets dropped\n",
+					    "video buffer is full, %d packets dropped\n",
 					    dev->vb_full);
 			continue;
 		}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
index 6954584526a3..26811efe0fb5 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
@@ -80,7 +80,7 @@ static int pvr2_dvb_feed_func(struct pvr2_dvb_adapter *adap)
 static int pvr2_dvb_feed_thread(void *data)
 {
 	int stat = pvr2_dvb_feed_func(data);
-	/* from videobuf-dvb.c: */
+
 	while (!kthread_should_stop()) {
 		set_current_state(TASK_INTERRUPTIBLE);
 		schedule();
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf'
  2022-08-10 13:01 ` [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf' Hans Verkuil
@ 2022-08-11  9:27   ` Lad, Prabhakar
  0 siblings, 0 replies; 8+ messages in thread
From: Lad, Prabhakar @ 2022-08-11  9:27 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media

Hi Hans,

Thank you for the patch.

On Wed, Aug 10, 2022 at 2:01 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> These terms typically refer to the old version 1 videobuf framework.
> It is confusing to use them for the vb2 framework, so reword these
> comments.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> CC: Lad Prabhakar <prabhakar.csengg@gmail.com>
> ---
>  .../media/platform/ti/am437x/am437x-vpfe.h    |  2 +-
>  drivers/media/platform/ti/davinci/vpif.h      | 60 +++++++++----------
>  .../media/platform/ti/davinci/vpif_capture.c  |  6 +-
>  .../media/platform/ti/davinci/vpif_capture.h  |  2 +-
>  .../media/platform/ti/davinci/vpif_display.c  |  6 +-
>  .../media/platform/ti/davinci/vpif_display.h  |  6 +-
>  drivers/media/platform/ti/omap3isp/ispvideo.c |  2 +-
>  include/media/davinci/vpbe_display.h          |  6 +-
>  8 files changed, 45 insertions(+), 45 deletions(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar

> diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.h b/drivers/media/platform/ti/am437x/am437x-vpfe.h
> index 05ee37db0273..f8b4e917b91a 100644
> --- a/drivers/media/platform/ti/am437x/am437x-vpfe.h
> +++ b/drivers/media/platform/ti/am437x/am437x-vpfe.h
> @@ -267,7 +267,7 @@ struct vpfe_device {
>          * is different from the image window
>          */
>         struct v4l2_rect crop;
> -       /* Buffer queue used in video-buf */
> +       /* Buffer queue used in vb2 */
>         struct vb2_queue buffer_queue;
>         /* Queue of filled frames */
>         struct list_head dma_queue;
> diff --git a/drivers/media/platform/ti/davinci/vpif.h b/drivers/media/platform/ti/davinci/vpif.h
> index c6d1d890478a..9ac1430f5bf9 100644
> --- a/drivers/media/platform/ti/davinci/vpif.h
> +++ b/drivers/media/platform/ti/davinci/vpif.h
> @@ -330,10 +330,10 @@ static inline void channel1_intr_enable(int enable)
>  }
>
>  /* inline function to set buffer addresses in case of Y/C non mux mode */
> -static inline void ch0_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
> -                                                unsigned long btm_strt_luma,
> -                                                unsigned long top_strt_chroma,
> -                                                unsigned long btm_strt_chroma)
> +static inline void ch0_set_video_buf_addr_yc_nmux(unsigned long top_strt_luma,
> +                                                 unsigned long btm_strt_luma,
> +                                                 unsigned long top_strt_chroma,
> +                                                 unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH0_TOP_STRT_ADD_LUMA);
>         regw(btm_strt_luma, VPIF_CH0_BTM_STRT_ADD_LUMA);
> @@ -342,10 +342,10 @@ static inline void ch0_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
>  }
>
>  /* inline function to set buffer addresses in VPIF registers for video data */
> -static inline void ch0_set_videobuf_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +static inline void ch0_set_video_buf_addr(unsigned long top_strt_luma,
> +                                         unsigned long btm_strt_luma,
> +                                         unsigned long top_strt_chroma,
> +                                         unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH0_TOP_STRT_ADD_LUMA);
>         regw(btm_strt_luma, VPIF_CH0_BTM_STRT_ADD_LUMA);
> @@ -353,10 +353,10 @@ static inline void ch0_set_videobuf_addr(unsigned long top_strt_luma,
>         regw(btm_strt_chroma, VPIF_CH0_BTM_STRT_ADD_CHROMA);
>  }
>
> -static inline void ch1_set_videobuf_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +static inline void ch1_set_video_buf_addr(unsigned long top_strt_luma,
> +                                         unsigned long btm_strt_luma,
> +                                         unsigned long top_strt_chroma,
> +                                         unsigned long btm_strt_chroma)
>  {
>
>         regw(top_strt_luma, VPIF_CH1_TOP_STRT_ADD_LUMA);
> @@ -546,10 +546,10 @@ static inline void channel3_clipping_enable(int enable)
>  }
>
>  /* inline function to set buffer addresses in case of Y/C non mux mode */
> -static inline void ch2_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
> -                                                unsigned long btm_strt_luma,
> -                                                unsigned long top_strt_chroma,
> -                                                unsigned long btm_strt_chroma)
> +static inline void ch2_set_video_buf_addr_yc_nmux(unsigned long top_strt_luma,
> +                                                 unsigned long btm_strt_luma,
> +                                                 unsigned long top_strt_chroma,
> +                                                 unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_LUMA);
>         regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_LUMA);
> @@ -558,10 +558,10 @@ static inline void ch2_set_videobuf_addr_yc_nmux(unsigned long top_strt_luma,
>  }
>
>  /* inline function to set buffer addresses in VPIF registers for video data */
> -static inline void ch2_set_videobuf_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +static inline void ch2_set_video_buf_addr(unsigned long top_strt_luma,
> +                                         unsigned long btm_strt_luma,
> +                                         unsigned long top_strt_chroma,
> +                                         unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_LUMA);
>         regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_LUMA);
> @@ -569,10 +569,10 @@ static inline void ch2_set_videobuf_addr(unsigned long top_strt_luma,
>         regw(btm_strt_chroma, VPIF_CH2_BTM_STRT_ADD_CHROMA);
>  }
>
> -static inline void ch3_set_videobuf_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +static inline void ch3_set_video_buf_addr(unsigned long top_strt_luma,
> +                                         unsigned long btm_strt_luma,
> +                                         unsigned long top_strt_chroma,
> +                                         unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH3_TOP_STRT_ADD_LUMA);
>         regw(btm_strt_luma, VPIF_CH3_BTM_STRT_ADD_LUMA);
> @@ -582,18 +582,18 @@ static inline void ch3_set_videobuf_addr(unsigned long top_strt_luma,
>
>  /* inline function to set buffer addresses in VPIF registers for vbi data */
>  static inline void ch2_set_vbi_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +                                   unsigned long btm_strt_luma,
> +                                   unsigned long top_strt_chroma,
> +                                   unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH2_TOP_STRT_ADD_VANC);
>         regw(btm_strt_luma, VPIF_CH2_BTM_STRT_ADD_VANC);
>  }
>
>  static inline void ch3_set_vbi_addr(unsigned long top_strt_luma,
> -                                        unsigned long btm_strt_luma,
> -                                        unsigned long top_strt_chroma,
> -                                        unsigned long btm_strt_chroma)
> +                                   unsigned long btm_strt_luma,
> +                                   unsigned long top_strt_chroma,
> +                                   unsigned long btm_strt_chroma)
>  {
>         regw(top_strt_luma, VPIF_CH3_TOP_STRT_ADD_VANC);
>         regw(btm_strt_luma, VPIF_CH3_BTM_STRT_ADD_VANC);
> diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c
> index b91eec899eb5..580723333fcc 100644
> --- a/drivers/media/platform/ti/davinci/vpif_capture.c
> +++ b/drivers/media/platform/ti/davinci/vpif_capture.c
> @@ -632,11 +632,11 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode)
>         common = &(ch->common[VPIF_VIDEO_INDEX]);
>
>         if (VPIF_CHANNEL1_VIDEO == ch->channel_id)
> -               common->set_addr = ch1_set_videobuf_addr;
> +               common->set_addr = ch1_set_video_buf_addr;
>         else if (2 == muxmode)
> -               common->set_addr = ch0_set_videobuf_addr_yc_nmux;
> +               common->set_addr = ch0_set_video_buf_addr_yc_nmux;
>         else
> -               common->set_addr = ch0_set_videobuf_addr;
> +               common->set_addr = ch0_set_video_buf_addr;
>  }
>
>  /**
> diff --git a/drivers/media/platform/ti/davinci/vpif_capture.h b/drivers/media/platform/ti/davinci/vpif_capture.h
> index d5951f61df47..6191056500cf 100644
> --- a/drivers/media/platform/ti/davinci/vpif_capture.h
> +++ b/drivers/media/platform/ti/davinci/vpif_capture.h
> @@ -50,7 +50,7 @@ struct common_obj {
>         struct vpif_cap_buffer *next_frm;
>         /* Used to store pixel format */
>         struct v4l2_format fmt;
> -       /* Buffer queue used in video-buf */
> +       /* Buffer queue used in vb2 */
>         struct vb2_queue buffer_queue;
>         /* Queue of filled frames */
>         struct list_head dma_queue;
> diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c
> index 5d524acc995d..b2df81603f62 100644
> --- a/drivers/media/platform/ti/davinci/vpif_display.c
> +++ b/drivers/media/platform/ti/davinci/vpif_display.c
> @@ -563,12 +563,12 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode)
>         struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];
>
>         if (VPIF_CHANNEL3_VIDEO == ch->channel_id) {
> -               common->set_addr = ch3_set_videobuf_addr;
> +               common->set_addr = ch3_set_video_buf_addr;
>         } else {
>                 if (2 == muxmode)
> -                       common->set_addr = ch2_set_videobuf_addr_yc_nmux;
> +                       common->set_addr = ch2_set_video_buf_addr_yc_nmux;
>                 else
> -                       common->set_addr = ch2_set_videobuf_addr;
> +                       common->set_addr = ch2_set_video_buf_addr;
>         }
>  }
>
> diff --git a/drivers/media/platform/ti/davinci/vpif_display.h b/drivers/media/platform/ti/davinci/vpif_display.h
> index f98062e79167..f300de37e041 100644
> --- a/drivers/media/platform/ti/davinci/vpif_display.h
> +++ b/drivers/media/platform/ti/davinci/vpif_display.h
> @@ -72,11 +72,11 @@ struct common_obj {
>         struct vpif_disp_buffer *next_frm;      /* Pointer pointing to next
>                                                  * vb2_buffer */
>         struct v4l2_format fmt;                 /* Used to store the format */
> -       struct vb2_queue buffer_queue;          /* Buffer queue used in
> -                                                * video-buf */
> +       struct vb2_queue buffer_queue;          /* Buffer queue used in vb2 */
>
>         struct list_head dma_queue;             /* Queue of filled frames */
> -       spinlock_t irqlock;                     /* Used in video-buf */
> +       spinlock_t irqlock;                     /* Used for video buffer
> +                                                * handling */
>
>         /* channel specific parameters */
>         struct mutex lock;                      /* lock used to access this
> diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c
> index d7059180e80e..cc9a97d5d505 100644
> --- a/drivers/media/platform/ti/omap3isp/ispvideo.c
> +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c
> @@ -1071,7 +1071,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
>   * processing might be possible but requires more testing.
>   *
>   * Stream start must be delayed until buffers are available at both the input
> - * and output. The pipeline must be started in the videobuf queue callback with
> + * and output. The pipeline must be started in the vb2 queue callback with
>   * the buffers queue spinlock held. The modules subdev set stream operation must
>   * not sleep.
>   */
> diff --git a/include/media/davinci/vpbe_display.h b/include/media/davinci/vpbe_display.h
> index 6d2a93740130..d8751ea926a2 100644
> --- a/include/media/davinci/vpbe_display.h
> +++ b/include/media/davinci/vpbe_display.h
> @@ -69,13 +69,13 @@ struct vpbe_layer {
>         struct vpbe_disp_buffer *cur_frm;
>         /* Pointer pointing to next v4l2_buffer */
>         struct vpbe_disp_buffer *next_frm;
> -       /* videobuf specific parameters
> -        * Buffer queue used in video-buf
> +       /* vb2 specific parameters
> +        * Buffer queue used in vb2
>          */
>         struct vb2_queue buffer_queue;
>         /* Queue of filled frames */
>         struct list_head dma_queue;
> -       /* Used in video-buf */
> +       /* Used for video buffer handling */
>         spinlock_t irqlock;
>         /* V4l2 specific parameters */
>         /* Identifies video device for this layer */
> --
> 2.35.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-11  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 13:01 [PATCH 0/6] Remove/replace incorrect references to videobuf Hans Verkuil
2022-08-10 13:01 ` [PATCH 1/6] media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L Hans Verkuil
2022-08-10 13:01 ` [PATCH 2/6] vb2: videobuf -> videobuf2 Hans Verkuil
2022-08-10 13:01 ` [PATCH 3/6] media/v4l2-mem2mem.h: rename 'videobuf' to 'vb2' Hans Verkuil
2022-08-10 13:01 ` [PATCH 4/6] media: platform: ti: avoid using 'videobuf' or 'video-buf' Hans Verkuil
2022-08-11  9:27   ` Lad, Prabhakar
2022-08-10 13:01 ` [PATCH 5/6] staging/media/omap4iss/iss_video.c: videobuf -> vb2 Hans Verkuil
2022-08-10 13:01 ` [PATCH 6/6] media: avoid use of 'videobuf' Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.