From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, marbugge@cisco.com,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [REVIEWv1 PATCH 2/5] v4l2: allow v4l2_subdev_edid to be used with video nodes
Date: Fri, 07 Mar 2014 15:04:43 +0100 [thread overview]
Message-ID: <4558126.A5rqnIvp04@avalon> (raw)
In-Reply-To: <1394187679-7345-3-git-send-email-hverkuil@xs4all.nl>
Hi Hans,
Thank you for the patch.
On Friday 07 March 2014 11:21:16 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> 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>
> ---
> include/uapi/linux/v4l2-common.h | 8 ++++++++
> include/uapi/linux/v4l2-subdev.h | 14 +++++---------
> 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 4f0667e..270db89 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__ */
> diff --git a/include/uapi/linux/v4l2-subdev.h
> b/include/uapi/linux/v4l2-subdev.h index a33c4da..87e0515 100644
> --- a/include/uapi/linux/v4l2-subdev.h
> +++ b/include/uapi/linux/v4l2-subdev.h
> @@ -148,13 +148,8 @@ struct v4l2_subdev_selection {
> __u32 reserved[8];
> };
>
> -struct v4l2_subdev_edid {
> - __u32 pad;
> - __u32 start_block;
> - __u32 blocks;
> - __u32 reserved[5];
> - __u8 __user *edid;
> -};
> +/* Backwards compatibility define --- to be removed */
> +#define v4l2_subdev_edid v4l2_edid
>
> #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
> #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
> @@ -174,7 +169,8 @@ struct v4l2_subdev_edid {
> _IOWR('V', 61, struct v4l2_subdev_selection)
> #define VIDIOC_SUBDEV_S_SELECTION \
> _IOWR('V', 62, struct v4l2_subdev_selection)
> -#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_subdev_edid)
> -#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_subdev_edid)
> +/* These two G/S_EDID ioctls are identical to the ioctls in videodev2.h */
> +#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
> +#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
>
> #endif
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 17acba8..339738a 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -1913,6 +1913,8 @@ struct v4l2_create_buffers {
> #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu)
> #define VIDIOC_G_INPUT _IOR('V', 38, int)
> #define VIDIOC_S_INPUT _IOWR('V', 39, int)
> +#define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid)
> +#define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid)
> #define VIDIOC_G_OUTPUT _IOR('V', 46, int)
> #define VIDIOC_S_OUTPUT _IOWR('V', 47, int)
> #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-03-07 14:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 10:21 [REVIEWv1 PATCH 0/5] Add G/S_EDID support for video nodes Hans Verkuil
2014-03-07 10:21 ` [REVIEWv1 PATCH 1/5] v4l2-compat-ioctl32: fix wrong VIDIOC_SUBDEV_G/S_EDID32 support Hans Verkuil
2014-03-07 14:04 ` Laurent Pinchart
2014-03-07 10:21 ` [REVIEWv1 PATCH 2/5] v4l2: allow v4l2_subdev_edid to be used with video nodes Hans Verkuil
2014-03-07 14:04 ` Laurent Pinchart [this message]
2014-03-07 10:21 ` [REVIEWv1 PATCH 3/5] v4l2: add VIDIOC_G/S_EDID support to the v4l2 core Hans Verkuil
2014-03-07 14:07 ` Laurent Pinchart
2014-03-07 10:21 ` [REVIEWv1 PATCH 4/5] adv*: replace the deprecated v4l2_subdev_edid by v4l2_edid Hans Verkuil
2014-03-07 14:07 ` Laurent Pinchart
2014-03-07 10:21 ` [REVIEWv1 PATCH 5/5] DocBook v4l2: update the G/S_EDID documentation Hans Verkuil
2014-03-07 14:09 ` Laurent Pinchart
2014-03-07 14:19 ` Hans Verkuil
2014-03-07 14:25 ` Laurent Pinchart
2014-03-07 14:31 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4558126.A5rqnIvp04@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=marbugge@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox