diff options
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-ioctl.c')
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 8f388ff31ebb..aa6e7c788db2 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
| @@ -155,6 +155,7 @@ static const char *v4l2_memory_names[] = { | |||
| 155 | [V4L2_MEMORY_MMAP] = "mmap", | 155 | [V4L2_MEMORY_MMAP] = "mmap", |
| 156 | [V4L2_MEMORY_USERPTR] = "userptr", | 156 | [V4L2_MEMORY_USERPTR] = "userptr", |
| 157 | [V4L2_MEMORY_OVERLAY] = "overlay", | 157 | [V4L2_MEMORY_OVERLAY] = "overlay", |
| 158 | [V4L2_MEMORY_DMABUF] = "dmabuf", | ||
| 158 | }; | 159 | }; |
| 159 | 160 | ||
| 160 | #define prt_names(a, arr) (((unsigned)(a)) < ARRAY_SIZE(arr) ? arr[a] : "unknown") | 161 | #define prt_names(a, arr) (((unsigned)(a)) < ARRAY_SIZE(arr) ? arr[a] : "unknown") |
| @@ -453,6 +454,15 @@ static void v4l_print_buffer(const void *arg, bool write_only) | |||
| 453 | tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); | 454 | tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); |
| 454 | } | 455 | } |
| 455 | 456 | ||
| 457 | static void v4l_print_exportbuffer(const void *arg, bool write_only) | ||
| 458 | { | ||
| 459 | const struct v4l2_exportbuffer *p = arg; | ||
| 460 | |||
| 461 | pr_cont("fd=%d, type=%s, index=%u, plane=%u, flags=0x%08x\n", | ||
| 462 | p->fd, prt_names(p->type, v4l2_type_names), | ||
| 463 | p->index, p->plane, p->flags); | ||
| 464 | } | ||
| 465 | |||
| 456 | static void v4l_print_create_buffers(const void *arg, bool write_only) | 466 | static void v4l_print_create_buffers(const void *arg, bool write_only) |
| 457 | { | 467 | { |
| 458 | const struct v4l2_create_buffers *p = arg; | 468 | const struct v4l2_create_buffers *p = arg; |
| @@ -1960,6 +1970,7 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = { | |||
| 1960 | IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO), | 1970 | IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO), |
| 1961 | IOCTL_INFO_FNC(VIDIOC_OVERLAY, v4l_overlay, v4l_print_u32, INFO_FL_PRIO), | 1971 | IOCTL_INFO_FNC(VIDIOC_OVERLAY, v4l_overlay, v4l_print_u32, INFO_FL_PRIO), |
| 1962 | IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE), | 1972 | IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE), |
| 1973 | IOCTL_INFO_STD(VIDIOC_EXPBUF, vidioc_expbuf, v4l_print_exportbuffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_exportbuffer, flags)), | ||
| 1963 | IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE), | 1974 | IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE), |
| 1964 | IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), | 1975 | IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), |
| 1965 | IOCTL_INFO_FNC(VIDIOC_STREAMOFF, v4l_streamoff, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), | 1976 | IOCTL_INFO_FNC(VIDIOC_STREAMOFF, v4l_streamoff, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE), |
