All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH 1/5] v4l2: add device_caps to struct video_device
Date: Tue, 01 Mar 2016 16:16:59 +0200	[thread overview]
Message-ID: <1944635.GBfyVlzrOX@avalon> (raw)
In-Reply-To: <1456746345-1431-2-git-send-email-hverkuil@xs4all.nl>

Hi Hans,

Thank you for the patch.

On Monday 29 February 2016 12:45:41 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Instead of letting drivers fill in device_caps at querycap time,
> let them fill it in when the video device is registered.
> 
> This has the advantage that in the future the v4l2 core can access
> the video device's capabilities and take decisions based on that.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I've acked the first three patches, could you get them merged through your 
tree ? I'll incorporate patch 4 in my media entity type series and post patch 
5 rebased on top of it.

> ---
>  drivers/media/v4l2-core/v4l2-ioctl.c | 3 +++
>  include/media/v4l2-dev.h             | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
> b/drivers/media/v4l2-core/v4l2-ioctl.c index 86c4c19..706bb42 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1020,9 +1020,12 @@ static int v4l_querycap(const struct v4l2_ioctl_ops
> *ops, struct file *file, void *fh, void *arg)
>  {
>  	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
> +	struct video_device *vfd = video_devdata(file);
>  	int ret;
> 
>  	cap->version = LINUX_VERSION_CODE;
> +	cap->device_caps = vfd->device_caps;
> +	cap->capabilities = vfd->device_caps | V4L2_CAP_DEVICE_CAPS;
> 
>  	ret = ops->vidioc_querycap(file, fh, cap);
> 
> diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
> index 76056ab..25a3190 100644
> --- a/include/media/v4l2-dev.h
> +++ b/include/media/v4l2-dev.h
> @@ -92,6 +92,9 @@ struct video_device
>  	/* device ops */
>  	const struct v4l2_file_operations *fops;
> 
> +	/* device capabilities as used in v4l2_capabilities */
> +	u32 device_caps;
> +
>  	/* sysfs */
>  	struct device dev;		/* v4l device */
>  	struct cdev *cdev;		/* character device */

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2016-03-01 14:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 11:45 [PATCH 0/5] media: better type handling Hans Verkuil
2016-02-29 11:45 ` [PATCH 1/5] v4l2: add device_caps to struct video_device Hans Verkuil
2016-02-29 11:56   ` Laurent Pinchart
2016-02-29 11:56     ` Laurent Pinchart
2016-03-01 14:16   ` Laurent Pinchart [this message]
2016-02-29 11:45 ` [PATCH 2/5] v4l2-pci-skeleton.c: fill in device_caps in video_device Hans Verkuil
2016-02-29 11:57   ` Laurent Pinchart
2016-02-29 11:45 ` [PATCH 3/5] vivid: set " Hans Verkuil
2016-02-29 11:59   ` Laurent Pinchart
2016-02-29 11:45 ` [PATCH 4/5] media: Add type field to struct media_entity Hans Verkuil
2016-02-29 11:45 ` [PATCH 5/5] media-entity.h: rename _io to _video_device and add real _io Hans Verkuil
2016-02-29 12:23   ` Laurent Pinchart
2016-02-29 12:26     ` 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=1944635.GBfyVlzrOX@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.