All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Jens Korinth <jens.korinth@trinamix.de>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Helen Koike <helen.koike@collabora.com>
Subject: Re: media: platform/rockchip/rkisp1 - v4l-compliance reports errors
Date: Fri, 30 Jul 2021 12:20:53 +0200	[thread overview]
Message-ID: <3a1c6ef4-603c-5d23-c999-6cdef90ffd62@collabora.com> (raw)
In-Reply-To: <CAAEAJfDjGBBO4gL3gnn7qsmMHb+2MT2LNJ_Ctt7EqRoycj934A@mail.gmail.com>

Hi,


On 30.07.21 00:38, Ezequiel Garcia wrote:
> (Adding Dafna and Helen)
> 
> On Thu, 29 Jul 2021 at 09:36, Jens Korinth <jens.korinth@trinamix.de> wrote:
>>
>> Hi *,
>>
>> I am working on a camera system on Rockchip RK3399 board (Firefly ROC-RK3399-PC-Plus). Tried to use the rkisp1 driver, but was unable to connect to the rkisp1_mainpath output node, because format negotiation failed; so I ran v4l-compliance next and found that it reports several errors (see attached report).

Hi, thanks for testing and reporting. We added some new features in order to supported the driver that also needed new code in v4l-utils in order
to use v4l2-ctl and to pass compliance. Therefore you should clone the repo and compile those tools in order to use them for the driver:

git://linuxtv.org/v4l-utils.git


>>
>> Upon closer inspection I noticed in the VIDIOC_ENUM_FMT handler in drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c:1169+ that

The file rkisp1-dev.c does only the probe/remove function. The callbacks are implemented in other files.

>>
>> 1) the "reserved" member is not zeroed,
>> 2) the userspace pointer to the v4l2_fmtdesc f is not checked via access_ok, and
>> 3) it isn't copied from/to userspace using copy_from_user/copy_to_user.

Those things seems to me like something that should be in the v4l2-core.

Thanks,
Dafna

>>
>> I'm not sure if this is necessary in general, but at least on my platform the zeroing of the reserved member only worked correctly when I added the userspace copies. But even after these fixes, v4l-compliance reports further issues in format enumeration and negotiation. Is this a known issue?
>>
>> Thanks!
>> -Jens

  reply	other threads:[~2021-07-30 10:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 12:36 media: platform/rockchip/rkisp1 - v4l-compliance reports errors Jens Korinth
2021-07-29 22:38 ` Ezequiel Garcia
2021-07-30 10:20   ` Dafna Hirschfeld [this message]
     [not found]     ` <AM0PR04MB58250C5C17446561D4A18EDA98EC9@AM0PR04MB5825.eurprd04.prod.outlook.com>
2021-08-02  9:48       ` [EXT] " Dafna Hirschfeld
2021-08-06  8:07         ` Jens Korinth
2021-08-06  8:54           ` Dafna Hirschfeld
2021-08-06  8:55           ` Dafna Hirschfeld

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=3a1c6ef4-603c-5d23-c999-6cdef90ffd62@collabora.com \
    --to=dafna.hirschfeld@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=helen.koike@collabora.com \
    --cc=jens.korinth@trinamix.de \
    --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.