From: Shuah Khan <shuahkh@osg.samsung.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>,
linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Kamil Debski <k.debski@samsung.com>,
Jeongtae Park <jtp.park@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH 1/6] [media] s5p-mfc: set capablity bus_info as required by VIDIOC_QUERYCAP
Date: Wed, 29 Jun 2016 13:43:08 -0600 [thread overview]
Message-ID: <577424CC.4080303@osg.samsung.com> (raw)
In-Reply-To: <1466113235-25909-2-git-send-email-javier@osg.samsung.com>
On 06/16/2016 03:40 PM, Javier Martinez Canillas wrote:
> The driver doesn't set the struct v4l2_capability bus_info field so the
> v4l2-compliance tool reports the following errors for VIDIOC_QUERYCAP:
>
> Required ioctls:
> VIDIOC_QUERYCAP returned 0 (Success)
> fail: v4l2-compliance.cpp(304): string empty
> fail: v4l2-compliance.cpp(528): check_ustring(vcap.bus_info, sizeof(vcap.bus_info))
> test VIDIOC_QUERYCAP: FAIL
>
> This patch fixes by setting the field in VIDIOC_QUERYCAP ioctl handler:
>
> Required ioctls:
> VIDIOC_QUERYCAP returned 0 (Success)
> test VIDIOC_QUERYCAP: OK
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
I started making the very same changes. Looks good.
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
-- Shuah
> ---
>
> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 3 ++-
> drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> index f2d6376ce618..4a40df22fd63 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -267,7 +267,8 @@ static int vidioc_querycap(struct file *file, void *priv,
>
> strncpy(cap->driver, dev->plat_dev->name, sizeof(cap->driver) - 1);
> strncpy(cap->card, dev->plat_dev->name, sizeof(cap->card) - 1);
> - cap->bus_info[0] = 0;
> + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
> + dev_name(&dev->plat_dev->dev));
> /*
> * This is only a mem-to-mem video device. The capture and output
> * device capability flags are left only for backward compatibility
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index 034b5c1d35a1..dd466ea6429e 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -945,7 +945,8 @@ static int vidioc_querycap(struct file *file, void *priv,
>
> strncpy(cap->driver, dev->plat_dev->name, sizeof(cap->driver) - 1);
> strncpy(cap->card, dev->plat_dev->name, sizeof(cap->card) - 1);
> - cap->bus_info[0] = 0;
> + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
> + dev_name(&dev->plat_dev->dev));
> /*
> * This is only a mem-to-mem video device. The capture and output
> * device capability flags are left only for backward compatibility
>
next prev parent reply other threads:[~2016-06-29 19:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 21:40 [PATCH 0/6] [media] Fixes and improvements for VIDIOC_QUERYCAP in Samsung media drivers Javier Martinez Canillas
2016-06-16 21:40 ` [PATCH 1/6] [media] s5p-mfc: set capablity bus_info as required by VIDIOC_QUERYCAP Javier Martinez Canillas
2016-06-17 7:11 ` Hans Verkuil
2016-06-29 19:43 ` Shuah Khan [this message]
2016-06-16 21:40 ` [PATCH 2/6] [media] s5p-mfc: improve v4l2_capability driver and card fields Javier Martinez Canillas
2016-06-17 7:12 ` Hans Verkuil
2016-06-29 19:45 ` Shuah Khan
2016-06-16 21:40 ` [PATCH 3/6] [media] s5p-jpeg: set capablity bus_info as required by VIDIOC_QUERYCAP Javier Martinez Canillas
2016-06-17 6:45 ` Jacek Anaszewski
2016-06-17 7:12 ` Hans Verkuil
2016-06-29 19:46 ` Shuah Khan
2016-06-16 21:40 ` [PATCH 4/6] [media] s5p-jpeg: only fill driver's name in capabilities driver field Javier Martinez Canillas
2016-06-17 6:45 ` Jacek Anaszewski
2016-06-17 7:13 ` Hans Verkuil
2016-06-29 19:47 ` Shuah Khan
2016-06-16 21:40 ` [PATCH 5/6] [media] gsc-m2m: add device name sufix to bus_info capatiliby field Javier Martinez Canillas
2016-06-17 7:13 ` Hans Verkuil
2016-06-16 21:40 ` [PATCH 6/6] [media] gsc-m2m: improve v4l2_capability driver and card fields Javier Martinez Canillas
2016-06-17 7:13 ` 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=577424CC.4080303@osg.samsung.com \
--to=shuahkh@osg.samsung.com \
--cc=javier@osg.samsung.com \
--cc=jtp.park@samsung.com \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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