diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-03-04 05:46:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-11 09:05:53 -0400 |
commit | 254a47770163f9322333660ebdabf99ba49873da (patch) | |
tree | b7bf53f4662fe1d3e827d811b4fa42f329849597 /include/uapi/linux | |
parent | bc826d6e39fe5f09cbadf8723e9183e6331b586f (diff) |
[media] v4l2: allow v4l2_subdev_edid to be used with video nodes
Struct v4l2_subdev_edid and the VIDIOC_SUBDEV_G/S_EDID ioctls were
specific for subdevices, but for hardware with a simple video pipeline
you do not need/want to create subdevice nodes to just get/set the EDID.
Move the v4l2_subdev_edid struct to v4l2-common.h and rename as
v4l2_edid. Add the same ioctls to videodev2.h as well, thus allowing
this API to be used with both video nodes and v4l-subdev nodes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/v4l2-common.h | 8 | ||||
-rw-r--r-- | include/uapi/linux/v4l2-subdev.h | 14 | ||||
-rw-r--r-- | include/uapi/linux/videodev2.h | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 4f0667e010dd..270db8914c01 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h | |||
@@ -68,4 +68,12 @@ | |||
68 | #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE | 68 | #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE |
69 | #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG | 69 | #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG |
70 | 70 | ||
71 | struct v4l2_edid { | ||
72 | __u32 pad; | ||
73 | __u32 start_block; | ||
74 | __u32 blocks; | ||
75 | __u32 reserved[5]; | ||
76 | __u8 __user *edid; | ||
77 | }; | ||
78 | |||
71 | #endif /* __V4L2_COMMON__ */ | 79 | #endif /* __V4L2_COMMON__ */ |
diff --git a/include/uapi/linux/v4l2-subdev.h b/include/uapi/linux/v4l2-subdev.h index a33c4daadce3..87e05159f637 100644 --- a/include/uapi/linux/v4l2-subdev.h +++ b/include/uapi/linux/v4l2-subdev.h | |||
@@ -148,13 +148,8 @@ struct v4l2_subdev_selection { | |||
148 | __u32 reserved[8]; | 148 | __u32 reserved[8]; |
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct v4l2_subdev_edid { | 151 | /* Backwards compatibility define --- to be removed */ |
152 | __u32 pad; | 152 | #define v4l2_subdev_edid v4l2_edid |
153 | __u32 start_block; | ||
154 | __u32 blocks; | ||
155 | __u32 reserved[5]; | ||
156 | __u8 __user *edid; | ||
157 | }; | ||
158 | 153 | ||
159 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) | 154 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) |
160 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) | 155 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) |
@@ -174,7 +169,8 @@ struct v4l2_subdev_edid { | |||
174 | _IOWR('V', 61, struct v4l2_subdev_selection) | 169 | _IOWR('V', 61, struct v4l2_subdev_selection) |
175 | #define VIDIOC_SUBDEV_S_SELECTION \ | 170 | #define VIDIOC_SUBDEV_S_SELECTION \ |
176 | _IOWR('V', 62, struct v4l2_subdev_selection) | 171 | _IOWR('V', 62, struct v4l2_subdev_selection) |
177 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_subdev_edid) | 172 | /* These two G/S_EDID ioctls are identical to the ioctls in videodev2.h */ |
178 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_subdev_edid) | 173 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) |
174 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) | ||
179 | 175 | ||
180 | #endif | 176 | #endif |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 17acba8c7f9f..339738a6e96b 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
@@ -1913,6 +1913,8 @@ struct v4l2_create_buffers { | |||
1913 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) | 1913 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) |
1914 | #define VIDIOC_G_INPUT _IOR('V', 38, int) | 1914 | #define VIDIOC_G_INPUT _IOR('V', 38, int) |
1915 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) | 1915 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) |
1916 | #define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid) | ||
1917 | #define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid) | ||
1916 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) | 1918 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) |
1917 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) | 1919 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) |
1918 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) | 1920 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) |