From: Hans Verkuil <hverkuil@xs4all.nl>
To: Gustavo Padovan <gustavo@padovan.org>, linux-media@vger.kernel.org
Cc: kernel@collabora.com,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Shuah Khan <shuahkh@osg.samsung.com>,
Pawel Osciak <pawel@osciak.com>,
Alexandre Courbot <acourbot@chromium.org>,
Sakari Ailus <sakari.ailus@iki.fi>,
Brian Starkey <brian.starkey@arm.com>,
linux-kernel@vger.kernel.org,
Gustavo Padovan <gustavo.padovan@collabora.com>
Subject: Re: [PATCH v8 03/13] [media] omap3isp: group device capabilities
Date: Tue, 13 Mar 2018 19:34:52 -0700 [thread overview]
Message-ID: <5756fc2a-c2f6-0d14-d8fc-9dcc5f7b7d93@xs4all.nl> (raw)
In-Reply-To: <20180309174920.22373-4-gustavo@padovan.org>
On 03/09/2018 09:49 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.com>
>
> Instead of putting V4L2_CAP_STREAMING everywhere, set device_caps
> earlier with this value.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> ---
> drivers/media/platform/omap3isp/ispvideo.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
> index a751c89a3ea8..b4d4ef926749 100644
> --- a/drivers/media/platform/omap3isp/ispvideo.c
> +++ b/drivers/media/platform/omap3isp/ispvideo.c
> @@ -658,13 +658,14 @@ isp_video_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
> strlcpy(cap->card, video->video.name, sizeof(cap->card));
> strlcpy(cap->bus_info, "media", sizeof(cap->bus_info));
>
> - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT
> - | V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS;
> + cap->device_caps = V4L2_CAP_STREAMING;
> + cap->capabilities = cap->device_caps | V4L2_CAP_VIDEO_CAPTURE |
> + V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_DEVICE_CAPS;
Same as in patch 1: I'd move this down to after the if-else. It makes more
sense that way.
>
> if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
> - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
> + cap->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
> else
> - cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
> + cap->device_caps |= V4L2_CAP_VIDEO_OUTPUT;
>
> return 0;
> }
>
Regards,
Hans
next prev parent reply other threads:[~2018-03-14 2:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 17:49 [PATCH v8 00/13] V4L2 Explicit Synchronization Gustavo Padovan
2018-03-09 17:49 ` [PATCH v8 01/13] [media] xilinx: regroup caps on querycap Gustavo Padovan
2018-03-14 2:30 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 02/13] [media] hackrf: group device capabilities Gustavo Padovan
2018-03-09 17:49 ` [PATCH v8 03/13] [media] omap3isp: " Gustavo Padovan
2018-03-14 2:34 ` Hans Verkuil [this message]
2018-03-09 17:49 ` [PATCH v8 04/13] [media] vb2: add is_unordered callback for drivers Gustavo Padovan
2018-03-14 2:44 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 05/13] [media] v4l: add 'unordered' flag to format description ioctl Gustavo Padovan
2018-03-09 17:49 ` [PATCH v8 06/13] [media] cobalt: add .is_unordered() for cobalt Gustavo Padovan
2018-03-14 2:48 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 07/13] [media] vb2: mark codec drivers as unordered Gustavo Padovan
2018-03-09 18:51 ` Nicolas Dufresne
2018-03-14 2:57 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 08/13] [media] vb2: add explicit fence user API Gustavo Padovan
2018-03-14 3:06 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 09/13] [media] vb2: add in-fence support to QBUF Gustavo Padovan
2018-03-14 15:55 ` Hans Verkuil
2018-04-25 20:11 ` Ezequiel Garcia
2018-04-26 6:27 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 10/13] [media] vb2: add out-fence " Gustavo Padovan
2018-03-14 16:25 ` Hans Verkuil
2018-04-30 15:27 ` Ezequiel Garcia
2018-03-09 17:49 ` [PATCH v8 11/13] [media] v4l: introduce the fences capability Gustavo Padovan
2018-03-14 3:12 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 12/13] [media] v4l: Add V4L2_CAP_FENCES to drivers Gustavo Padovan
2018-03-14 16:07 ` Hans Verkuil
2018-03-09 17:49 ` [PATCH v8 13/13] [media] v4l: Document explicit synchronization behavior Gustavo Padovan
2018-03-13 9:26 ` jacopo mondi
2018-03-14 3:33 ` Hans Verkuil
2018-03-14 16:01 ` 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=5756fc2a-c2f6-0d14-d8fc-9dcc5f7b7d93@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=acourbot@chromium.org \
--cc=brian.starkey@arm.com \
--cc=gustavo.padovan@collabora.com \
--cc=gustavo@padovan.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=pawel@osciak.com \
--cc=sakari.ailus@iki.fi \
--cc=shuahkh@osg.samsung.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;
as well as URLs for NNTP newsgroup(s).