History

Merge branch 'for_3.8-rc1' into v4l_for_linus

* 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 ...

Mauro Carvalho Chehab committed 13 years ago

Commit 77c53d02 parents 9374020 d8658bc314 files · +7754 −1863Browse files

Showing the changes to include/uapi/linux (1 of 314 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+36−1
@@ -186,6 +186,7 @@ enum v4l2_memory { · 185 unmodified lines
186186 V4L2_MEMORY_MMAP = 1,
187187 V4L2_MEMORY_USERPTR = 2,
188188 V4L2_MEMORY_OVERLAY = 3,
189+ V4L2_MEMORY_DMABUF = 4,
189190 };
190191
191192 /* see also http://vektor.theorem.ca/graphics/ycbcr/ */
@@ -602,6 +603,8 @@ struct v4l2_requestbuffers { · 410 unmodified lines
602603 * should be passed to mmap() called on the video node)
603604 * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer
604605 * pointing to this plane
606+ * @fd: when memory is V4L2_MEMORY_DMABUF, a userspace file
607+ * descriptor associated with this plane
605608 * @data_offset: offset in the plane to the start of data; usually 0,
606609 * unless there is a header in front of the data
607610 *
@@ -616,6 +619,7 @@ struct v4l2_plane { · 8 unmodified lines
616619 union {
617620 __u32 mem_offset;
618621 unsigned long userptr;
622+ __s32 fd;
619623 } m;
620624 __u32 data_offset;
621625 __u32 reserved[11];
@@ -640,6 +644,8 @@ struct v4l2_plane { · 18 unmodified lines
640644 * (or a "cookie" that should be passed to mmap() as offset)
641645 * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
642646 * 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
643649 * @planes: for multiplanar buffers; userspace pointer to the array of plane
644650 * info structs for this buffer
645651 * @length: size in bytes of the buffer (NOT its payload) for single-plane
@@ -666,6 +672,7 @@ struct v4l2_buffer { · 20 unmodified lines
666672 __u32 offset;
667673 unsigned long userptr;
668674 struct v4l2_plane *planes;
675+ __s32 fd;
669676 } m;
670677 __u32 length;
671678 __u32 reserved2;
@@ -687,6 +694,33 @@ struct v4l2_buffer { · 15 unmodified lines
687694 #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800
688695 #define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000
689696
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+
690724 /*
691725 * O V E R L A Y P R E V I E W
692726 */
@@ -737,7 +771,7 @@ struct v4l2_window { · 44 unmodified lines
737771 struct v4l2_captureparm {
738772 __u32 capability; /* Supported modes */
739773 __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 */
741775 __u32 extendedmode; /* Driver-specific extensions */
742776 __u32 readbuffers; /* # of buffers for read */
743777 __u32 reserved[4];
@@ -1888,6 +1922,7 @@ struct v4l2_create_buffers { · 1144 unmodified lines
18881922 #define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer)
18891923 #define VIDIOC_OVERLAY _IOW('V', 14, int)
18901924 #define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer)
1925+#define VIDIOC_EXPBUF _IOWR('V', 16, struct v4l2_exportbuffer)
18911926 #define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer)
18921927 #define VIDIOC_STREAMON _IOW('V', 18, int)
18931928 #define VIDIOC_STREAMOFF _IOW('V', 19, int)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t