From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Arun Kumar K <arunkk.samsung@gmail.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
LMML <linux-media@vger.kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
kilyeon.im@samsung.com, shaik.ameer@samsung.com,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [RFC v2 06/10] exynos5-fimc-is: Adds isp subdev
Date: Sat, 03 Aug 2013 23:38:33 +0200 [thread overview]
Message-ID: <51FD7859.1000401@gmail.com> (raw)
In-Reply-To: <CALt3h7-VfbxxHnitQFgZ3hbTv-X9T09aJznTvu2qNqGbXnftdw@mail.gmail.com>
Hi Arun,
On 08/02/2013 06:31 AM, Arun Kumar K wrote:
[...]
>>> + * Video node ioctl operations
>>> + */
>>> +static int isp_querycap_output(struct file *file, void *priv,
>>> + struct v4l2_capability *cap)
>>> +{
>>> + strncpy(cap->driver, ISP_DRV_NAME, sizeof(cap->driver) - 1);
>>> + strncpy(cap->card, ISP_DRV_NAME, sizeof(cap->card) - 1);
>>> + strncpy(cap->bus_info, ISP_DRV_NAME, sizeof(cap->bus_info) - 1);
>>> + cap->capabilities = V4L2_CAP_STREAMING |
>>> V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>>> + cap->device_caps = V4L2_CAP_STREAMING |
>>> V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>>
>>
>> cap->capabilities = V4L2_CAP_STREAMING;
>>
>> cap->device_caps = V4L2_CAP_STREAMING |
>> V4L2_CAP_VIDEO_OUTPUT_MPLANE;
>>
>> This should be:
>>
>> cap->device_caps = V4L2_CAP_STREAMING;
>> cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
>>
>> Media Controller device nodes must not use V4L2_CAP_VIDEO_{OUTPUT,
>> CAPTURE}_(_MPLANE) capability flags.
>
> If I dont provide any video capabilities, the v4l2-compliance tool
> gives a fail :
>
> fail: v4l2-compliance.cpp(298) : node->is_video&& !(dcaps& video_caps)
> test VIDIOC_QUERYCAP: FAIL
>
> This error doesn't come if I give V4L2_CAP_VIDEO_OUTPUT_MPLANE capability.
>
> One more related error compliance tool gives is :
>
> fail: v4l2-test-formats.cpp(286): Video Output Multiplanar cap not
> set, but Video Output Multiplanar formats defined
> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
>
> Shall these errors be ignored?
I think so, yes. The capability flags should be set by a driver-specific
user space library/middleware. Such a library would intercept
VIDIOC_QUERYBUF
ioctl and set relevant capability flags. I believe v4l2-compliance should
not be used on the bare video device nodes your driver provides. It should
be used together with, e.g. libv4l2 plugin for this driver.
My colleague have been working on such a plugin for exynos4-is driver.
There is still on my todo list modifying FIMC video capture node driver
to allow video device open() even when no links to, e.g. sensor subdev
were created. This is needed because with libv4l2 video device open() must
succeed in order for the plugin to have its initialization routine called.
Then the plugin configures pipeline according to e.g. data stored in a
configuration file, and for some VIDIOC_* ioctls it does additional stuff
on involved subdevices to ensure VIDIOC_* ioctls work as if the /dev/video
would be plain V4L2 video node, without any subdev/MC stuff.
I think you're just using wrong tool for the purpose. v4l2-compliance is
just not suitable for testing MC video nodes without corresponding user
space library that would handle quirks of your device.
If you set the V4L2_CAP_VIDEO_OUTPUT_MPLANE capability standard
applications, e.g. v4l2-src GStreamer plugin (oh, it likely doesn't have
support for _MPLANE yet anyway) may get confused that this video node is
a regular capture video node and users would start filling in bug reports
thinking that your driver is crap because it doesn't work as expected. ;-)
Hans and Mauro may want to correct/add something to what is said above.
--
Thanks,
Sylwester
next prev parent reply other threads:[~2013-08-03 21:38 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 13:03 [RFC v2 00/10] Exynos5 FIMC-IS driver Arun Kumar K
2013-05-31 13:03 ` [RFC v2 01/10] exynos5-fimc-is: Add Exynos5 FIMC-IS device tree bindings documentation Arun Kumar K
2013-06-20 22:45 ` Sylwester Nawrocki
2013-07-09 11:08 ` Arun Kumar K
2013-07-16 21:23 ` Sylwester Nawrocki
2013-07-17 4:42 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 02/10] exynos5-fimc-is: Adds fimc-is driver core files Arun Kumar K
2013-06-06 5:20 ` Sachin Kamat
2013-06-07 10:26 ` Arun Kumar K
2013-06-20 22:46 ` Sylwester Nawrocki
2013-07-09 11:10 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 03/10] exynos5-fimc-is: Adds common driver header files Arun Kumar K
2013-06-20 22:46 ` Sylwester Nawrocki
2013-06-21 7:14 ` Arun Kumar K
2013-07-09 11:20 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 04/10] exynos5-fimc-is: Adds the register definition and context header Arun Kumar K
2013-06-06 6:24 ` Sachin Kamat
2013-06-07 10:27 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 05/10] exynos5-fimc-is: Adds the sensor subdev Arun Kumar K
2013-06-06 6:39 ` Sachin Kamat
2013-06-07 10:30 ` Arun Kumar K
2013-06-20 23:04 ` Sylwester Nawrocki
2013-07-09 12:01 ` Arun Kumar K
2013-06-26 7:27 ` Hans Verkuil
2013-07-09 12:04 ` Arun Kumar K
2013-07-16 22:03 ` Sylwester Nawrocki
2013-07-17 4:55 ` Arun Kumar K
2013-07-17 14:14 ` Sylwester Nawrocki
2013-07-18 4:35 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 06/10] exynos5-fimc-is: Adds isp subdev Arun Kumar K
2013-06-06 6:18 ` Sachin Kamat
2013-06-07 10:28 ` Arun Kumar K
2013-06-20 23:25 ` Sylwester Nawrocki
2013-07-09 11:42 ` Arun Kumar K
2013-07-16 22:11 ` Sylwester Nawrocki
2013-07-17 4:56 ` Arun Kumar K
2013-08-02 4:31 ` Arun Kumar K
2013-08-03 21:38 ` Sylwester Nawrocki [this message]
2013-06-26 7:15 ` Hans Verkuil
2013-07-09 11:42 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 07/10] exynos5-fimc-is: Adds scaler subdev Arun Kumar K
2013-06-06 6:45 ` Sachin Kamat
2013-06-26 7:13 ` Hans Verkuil
2013-07-09 11:30 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 08/10] exynos5-fimc-is: Adds the hardware pipeline control Arun Kumar K
2013-05-31 13:03 ` [RFC v2 09/10] exynos5-fimc-is: Adds the hardware interface module Arun Kumar K
2013-06-21 11:23 ` Andrzej Hajda
2013-07-09 11:26 ` Arun Kumar K
2013-05-31 13:03 ` [RFC v2 10/10] exynos5-fimc-is: Adds the Kconfig and Makefile Arun Kumar K
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=51FD7859.1000401@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=arunkk.samsung@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=kilyeon.im@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=s.nawrocki@samsung.com \
--cc=shaik.ameer@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).