summaryrefslogtreecommitdiff
path: root/include/media/videobuf2-core.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2020-06-21 02:23:43 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-04 12:32:10 +0200
commitb820935b35479e823eb6ce133cdbe371dced7e95 (patch)
tree7cced7b8ed9695a5e35a76eb0a264978e3ff8801 /include/media/videobuf2-core.h
parent030b161c4dc8a4d9a3dcecd7101680e3f871748d (diff)
media: vb2: Print the queue pointer in debug messages
When debugging issues that involve more than one video queue, messages related to multiple queues get interleaved without any easy way to tell which queue they relate to. Fix this by adding a queue name to vb2_queue, and printing it in all debug messages in the vb2 core and V4L2 layers. If the name isn't set by drivers, it is automatically filled with the queue direction and address. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include/media/videobuf2-core.h')
-rw-r--r--include/media/videobuf2-core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 9e68fe043a6c..52ef92049073 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -561,6 +561,8 @@ struct vb2_buf_ops {
* when a buffer with the %V4L2_BUF_FLAG_LAST is dequeued.
* @fileio: file io emulator internal data, used only if emulator is active
* @threadio: thread io internal data, used only if thread is active
+ * @name: queue name, used for logging purpose. Initialized automatically
+ * if left empty by drivers.
*/
struct vb2_queue {
unsigned int type;
@@ -622,6 +624,8 @@ struct vb2_queue {
struct vb2_fileio_data *fileio;
struct vb2_threadio_data *threadio;
+ char name[32];
+
#ifdef CONFIG_VIDEO_ADV_DEBUG
/*
* Counters for how often these queue-related ops are