* for_3.8-rc1: (243 commits) [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check [media] omap3isp: Prepare/unprepare clocks before/after enable/disable [media] omap3isp: preview: Add support for 8-bit formats at the sink pad [media] omap3isp: Replace printk with dev_* [media] omap3isp: Find source pad from external entity [media] omap3isp: Configure CSI-2 phy based on platform data [media] omap3isp: Add PHY routing configuration [media] omap3isp: Add CSI configuration registers from control block to ISP resources [media] omap3isp: Remove unneeded module memory address definitions [media] omap3isp: Use monotonic timestamps for statistics buffers [media] uvcvideo: Fix control value clamping for unsigned integer controls [media] uvcvideo: Mark first output terminal as default video node [media] uvcvideo: Add VIDIOC_[GS]_PRIORITY support [media] uvcvideo: Return -ENOTTY for unsupported ioctls [media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP [media] uvcvideo: Don't fail when an unsupported format is requested [media] uvcvideo: Return -EACCES when trying to access a read/write-only control [media] uvcvideo: Set error_idx properly for extended controls API failures [media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2 [media] fc2580: write some registers conditionally ...
Showing the changes to include/uapi/linux (1 of 314 files). Show all
Unified · Split
| @@ -186,6 +186,7 @@ enum v4l2_memory { · 185 unmodified lines | ||
| 186 | 186 | V4L2_MEMORY_MMAP = 1, |
| 187 | 187 | V4L2_MEMORY_USERPTR = 2, |
| 188 | 188 | V4L2_MEMORY_OVERLAY = 3, |
| 189 | + V4L2_MEMORY_DMABUF = 4, | |
| 189 | 190 | }; |
| 190 | 191 | |
| 191 | 192 | /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ |
| @@ -602,6 +603,8 @@ struct v4l2_requestbuffers { · 410 unmodified lines | ||
| 602 | 603 | * should be passed to mmap() called on the video node) |
| 603 | 604 | * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer |
| 604 | 605 | * pointing to this plane |
| 606 | + * @fd: when memory is V4L2_MEMORY_DMABUF, a userspace file | |
| 607 | + * descriptor associated with this plane | |
| 605 | 608 | * @data_offset: offset in the plane to the start of data; usually 0, |
| 606 | 609 | * unless there is a header in front of the data |
| 607 | 610 | * |
| @@ -616,6 +619,7 @@ struct v4l2_plane { · 8 unmodified lines | ||
| 616 | 619 | union { |
| 617 | 620 | __u32 mem_offset; |
| 618 | 621 | unsigned long userptr; |
| 622 | + __s32 fd; | |
| 619 | 623 | } m; |
| 620 | 624 | __u32 data_offset; |
| 621 | 625 | __u32 reserved[11]; |
| @@ -640,6 +644,8 @@ struct v4l2_plane { · 18 unmodified lines | ||
| 640 | 644 | * (or a "cookie" that should be passed to mmap() as offset) |
| 641 | 645 | * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR; |
| 642 | 646 | * a userspace pointer pointing to this buffer |
| 647 | + * @fd: for non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF; | |
| 648 | + * a userspace file descriptor associated with this buffer | |
| 643 | 649 | * @planes: for multiplanar buffers; userspace pointer to the array of plane |
| 644 | 650 | * info structs for this buffer |
| 645 | 651 | * @length: size in bytes of the buffer (NOT its payload) for single-plane |
| @@ -666,6 +672,7 @@ struct v4l2_buffer { · 20 unmodified lines | ||
| 666 | 672 | __u32 offset; |
| 667 | 673 | unsigned long userptr; |
| 668 | 674 | struct v4l2_plane *planes; |
| 675 | + __s32 fd; | |
| 669 | 676 | } m; |
| 670 | 677 | __u32 length; |
| 671 | 678 | __u32 reserved2; |
| @@ -687,6 +694,33 @@ struct v4l2_buffer { · 15 unmodified lines | ||
| 687 | 694 | #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800 |
| 688 | 695 | #define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000 |
| 689 | 696 | |
| 697 | +/** | |
| 698 | + * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor | |
| 699 | + * | |
| 700 | + * @index: id number of the buffer | |
| 701 | + * @type: enum v4l2_buf_type; buffer type (type == *_MPLANE for | |
| 702 | + * multiplanar buffers); | |
| 703 | + * @plane: index of the plane to be exported, 0 for single plane queues | |
| 704 | + * @flags: flags for newly created file, currently only O_CLOEXEC is | |
| 705 | + * supported, refer to manual of open syscall for more details | |
| 706 | + * @fd: file descriptor associated with DMABUF (set by driver) | |
| 707 | + * | |
| 708 | + * Contains data used for exporting a video buffer as DMABUF file descriptor. | |
| 709 | + * The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF | |
| 710 | + * (identical to the cookie used to mmap() the buffer to userspace). All | |
| 711 | + * reserved fields must be set to zero. The field reserved0 is expected to | |
| 712 | + * become a structure 'type' allowing an alternative layout of the structure | |
| 713 | + * content. Therefore this field should not be used for any other extensions. | |
| 714 | + */ | |
| 715 | +struct v4l2_exportbuffer { | |
| 716 | + __u32 type; /* enum v4l2_buf_type */ | |
| 717 | + __u32 index; | |
| 718 | + __u32 plane; | |
| 719 | + __u32 flags; | |
| 720 | + __s32 fd; | |
| 721 | + __u32 reserved[11]; | |
| 722 | +}; | |
| 723 | + | |
| 690 | 724 | /* |
| 691 | 725 | * O V E R L A Y P R E V I E W |
| 692 | 726 | */ |
| @@ -737,7 +771,7 @@ struct v4l2_window { · 44 unmodified lines | ||
| 737 | 771 | struct v4l2_captureparm { |
| 738 | 772 | __u32 capability; /* Supported modes */ |
| 739 | 773 | __u32 capturemode; /* Current mode */ |
| 740 | − struct v4l2_fract timeperframe; /* Time per frame in .1us units */ | |
| 774 | + struct v4l2_fract timeperframe; /* Time per frame in seconds */ | |
| 741 | 775 | __u32 extendedmode; /* Driver-specific extensions */ |
| 742 | 776 | __u32 readbuffers; /* # of buffers for read */ |
| 743 | 777 | __u32 reserved[4]; |
| @@ -1888,6 +1922,7 @@ struct v4l2_create_buffers { · 1144 unmodified lines | ||
| 1888 | 1922 | #define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer) |
| 1889 | 1923 | #define VIDIOC_OVERLAY _IOW('V', 14, int) |
| 1890 | 1924 | #define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer) |
| 1925 | +#define VIDIOC_EXPBUF _IOWR('V', 16, struct v4l2_exportbuffer) | |
| 1891 | 1926 | #define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer) |
| 1892 | 1927 | #define VIDIOC_STREAMON _IOW('V', 18, int) |
| 1893 | 1928 | #define VIDIOC_STREAMOFF _IOW('V', 19, int) |