From 254a47770163f9322333660ebdabf99ba49873da Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 4 Mar 2014 07:46:47 -0300 Subject: [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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/v4l2-common.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/uapi/linux/v4l2-common.h') diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 4f0667e010d..270db8914c0 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h @@ -68,4 +68,12 @@ #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG +struct v4l2_edid { + __u32 pad; + __u32 start_block; + __u32 blocks; + __u32 reserved[5]; + __u8 __user *edid; +}; + #endif /* __V4L2_COMMON__ */ -- cgit v1.2.3-70-g09d2 From 773bcf8c9ce04c62c513182620efb729c97452fc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Apr 2014 10:48:31 -0300 Subject: [media] v4l2-common: fix warning when used on userpace As reported by Linus, make headers_check is reporting: usr/include/linux/v4l2-common.h:72: found __[us]{8,16,32,64} type without #include which seems to have come in through commits 777f4f85b75f1 and 254a47770163f. That happens because struct v4l2_edid should be visible by both subdev and V4L2 APIs. So, it was moved to v4l2-common.h. As Linus pointed, the proper fix is to just add an include for linux/types.h at v4l2-common.h. Reported-by: Linus Torvalds Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/v4l2-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/uapi/linux/v4l2-common.h') diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h index 270db8914c0..9bf508ad095 100644 --- a/include/uapi/linux/v4l2-common.h +++ b/include/uapi/linux/v4l2-common.h @@ -29,6 +29,8 @@ #ifndef __V4L2_COMMON__ #define __V4L2_COMMON__ +#include + /* * * Selection interface definitions -- cgit v1.2.3-70-g09d2