Re: [EXT] Re: media: platform/rockchip/rkisp1 - v4l-compliance reports errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 30.07.21 17:33, Jens Korinth wrote:
Hi Dafna,

Thanks for your quick answer!

Therefore you should clone the repo and compile those tools in order to use them for the driver:

Thought I did that, but it turns out I didn't pay attention to the PATH order and the system version was used, thanks!

The camera I need to support is the OV9282, which is Y10 monochrome sensor. I've had some success passing it through the ISP as SRGGB10_1x10, but it does not feel like the right way(tm). 😊 I need the raw data with as little processing as possible (though 16b extension would be nice) - any advice?

Hi,
Currently the driver does not support Y10 format. But I think that configuring the isp subdevice with SRGGB10_1x10 should work.
I think it is possible to just add Y10 format to the list of supported formats in rkisp1-isp1.c with identical data as SRGGB10_1x10:


diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
index d596bc040005..051f8d45e3cc 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
@@ -59,6 +59,13 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = {
                .mbus_code      = MEDIA_BUS_FMT_YUYV8_2X8,
                .pixel_enc      = V4L2_PIXEL_ENC_YUV,
                .direction      = RKISP1_ISP_SD_SRC,
+       }, {
+               .mbus_code      = MEDIA_BUS_FMT_Y10_1X10,
+               .pixel_enc      = V4L2_PIXEL_ENC_BAYER,
+               .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW10,
+               .bayer_pat      = RKISP1_RAW_RGGB,
+               .bus_width      = 10,
+               .direction      = RKISP1_ISP_SD_SINK | RKISP1_ISP_SD_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SRGGB10_1X10,
                .pixel_enc      = V4L2_PIXEL_ENC_BAYER,


But I don't have a monochrome camera to test it.

Thanks,
Dafna


Thanks a lot!
Jens

-----Original Message-----
From: Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx>
Sent: Friday, July 30, 2021 12:21 PM
To: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>; Jens Korinth <jens.korinth@xxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx; Helen Koike <helen.koike@xxxxxxxxxxxxx>
Subject: [EXT] Re: media: platform/rockchip/rkisp1 - v4l-compliance reports errors

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@xxxxxxxxxxx> 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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux