lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Nov 2019 17:52:42 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     Mirela Rabulea <mirela.rabulea@....com>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>
Cc:     dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "laurent.pinchart+renesas@...asonboard.com" 
        <laurent.pinchart+renesas@...asonboard.com>,
        Aisheng Dong <aisheng.dong@....com>,
        Laurentiu Palcu <laurentiu.palcu@....com>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "paul.kocialkowski@...tlin.com" <paul.kocialkowski@...tlin.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Robert Chiras <robert.chiras@....com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "niklas.soderlund+renesas@...natech.se" 
        <niklas.soderlund+renesas@...natech.se>,
        Daniel Baluta <daniel.baluta@....com>,
        Leonard Crestez <leonard.crestez@....com>,
        "dafna.hirschfeld@...labora.com" <dafna.hirschfeld@...labora.com>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
Subject: Re: [EXT] Re: [PATCH 0/5] Add V4L2 driver for i.MX8 JPEG
 Encoder/Decoder

On 11/6/19 5:45 PM, Mirela Rabulea wrote:
> Hi Hans,
> 
> On Mi, 2019-11-06 at 16:37 +0100, Hans Verkuil wrote:
>> That's too old. Always test with the latest version from the v4l-
>> utils git
>> repo (git://linuxtv.org/v4l-utils.git). v4l2-compliance is
>> continually
>> improved, so driver testing should always be done with the latest
>> version.
>>
>> For the JPEG encoder you can add the -s option to v4l2-compliance.
>> Unfortunately,
>> the streaming tests for JPEG decoders in v4l2-compliance are not well
>> supported
>> at the moment, so you can't use -s there.
>>
>> Please provide the full output of the v4l2-compliance command as
>> well, I'd
>> like to see the actual output.
> 
> Thanks for the reply. I updated to the latest v4l-utils, basic tests
> pass, but I have issues with the streaming tests (-s). I'll work on
> those, it might take a while.
> For the reference, here's the actual output, for both the encoder &
> decoder.
> 
> 
> root@...8qxpmek:/unit_tests/JPEG# ./v4l2-compliance -d /dev/video1 -s
> v4l2-compliance SHA: 6c415a11fceb32067cdb5c2e33f90dbf018182a4, 64 bits
> 
> Compliance test for mxc-jpeg decode device /dev/video1:
> 
> Driver Info:
> 	Driver name      : mxc-jpeg decode
> 	Card type        : mxc-jpeg decoder
> 	Bus info         : platform:58450000.jpegenc
> 	Driver version   : 5.4.0
> 	Capabilities     : 0x84204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 		Device Capabilities
> 	Device Caps      : 0x04204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 	Detected JPEG Encoder
> 
> Required ioctls:
> 	test VIDIOC_QUERYCAP: OK
> 
> Allow for multiple opens:
> 	test second /dev/video1 open: OK
> 	test VIDIOC_QUERYCAP: OK
> 	test VIDIOC_G/S_PRIORITY: OK
> 	test for unlimited opens: OK
> 
> Debug ioctls:
> 	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> 	test VIDIOC_LOG_STATUS: OK (Not Supported)
> 
> Input ioctls:
> 	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> 	test VIDIOC_ENUMAUDIO: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDIO: OK (Not Supported)
> 	Inputs: 0 Audio Inputs: 0 Tuners: 0
> 
> Output ioctls:
> 	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
> 	Outputs: 0 Audio Outputs: 0 Modulators: 0
> 
> Input/Output configuration ioctls:
> 	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
> 	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
> 	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
> 	test VIDIOC_G/S_EDID: OK (Not Supported)
> 
> Control ioctls:
> 	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
> 	test VIDIOC_QUERYCTRL: OK (Not Supported)
> 	test VIDIOC_G/S_CTRL: OK (Not Supported)
> 	test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
> 	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
> 	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> 	Standard Controls: 0 Private Controls: 0
> 
> Format ioctls:
> 	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> 	test VIDIOC_G/S_PARM: OK (Not Supported)
> 	test VIDIOC_G_FBUF: OK (Not Supported)
> 	test VIDIOC_G_FMT: OK
> 	test VIDIOC_TRY_FMT: OK
> 	test VIDIOC_S_FMT: OK
> 	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
> 	test Cropping: OK (Not Supported)
> 	test Composing: OK (Not Supported)
> 	test Scaling: OK

The presence of a scaler is suspicious: is the encoder indeed
capable of scaling? I suspect this is a bug.

> 
> Codec ioctls:
> 	test VIDIOC_(TRY_)ENCODER_CMD: OK

The presence of this...

> 	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> 	test VIDIOC_(TRY_)DECODER_CMD: OK

...and this is also strange for a JPEG codec. These ioctls are typically only
needed for MPEG/H264/etc. codecs, and not for a simple JPEG codec.

The same issues are found for the JPEG decoder.

> 
> Buffer ioctls:
> 	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
> 	test VIDIOC_EXPBUF: OK
> 	test Requests: OK (Not Supported)
> 
> Test input 0:
> 
> Streaming ioctls:
> 	test read/write: OK (Not Supported)
> 	test blocking wait: OK
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY

The driver shall never return FIELD_ANY. This needs to be FIELD_NONE.

Regards,

	Hans

> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (no poll): FAIL
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY
> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (select): FAIL
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY
> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (epoll): FAIL
> 		fail: v4l2-test-buffers.cpp(1492): ret && ret != ENOTTY
> 		fail: v4l2-test-buffers.cpp(1580): setupUserPtr(node,
> q)
> 	test USERPTR (no poll): FAIL
> 		fail: v4l2-test-buffers.cpp(1492): ret && ret != ENOTTY
> 		fail: v4l2-test-buffers.cpp(1580): setupUserPtr(node,
> q)
> 	test USERPTR (select): FAIL
> 	test DMABUF: Cannot test, specify --expbuf-device
> 
> Total for mxc-jpeg decode device /dev/video1: 51, Succeeded: 46,
> Failed: 5, Warnings: 0
> 
> 
> 
> root@...8qxpmek:/unit_tests/JPEG# ./v4l2-compliance -d /dev/video0 -s
> v4l2-compliance SHA: 6c415a11fceb32067cdb5c2e33f90dbf018182a4, 64 bits
> 
> Compliance test for mxc-jpeg decode device /dev/video0:
> 
> Driver Info:
> 	Driver name      : mxc-jpeg decode
> 	Card type        : mxc-jpeg decoder
> 	Bus info         : platform:58400000.jpegdec
> 	Driver version   : 5.4.0
> 	Capabilities     : 0x84204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 		Device Capabilities
> 	Device Caps      : 0x04204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 	Detected JPEG Decoder
> 
> Required ioctls:
> 	test VIDIOC_QUERYCAP: OK
> 
> Allow for multiple opens:
> 	test second /dev/video0 open: OK
> 	test VIDIOC_QUERYCAP: OK
> 	test VIDIOC_G/S_PRIORITY: OK
> 	test for unlimited opens: OK
> 
> Debug ioctls:
> 	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> 	test VIDIOC_LOG_STATUS: OK (Not Supported)
> 
> Input ioctls:
> 	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> 	test VIDIOC_ENUMAUDIO: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDIO: OK (Not Supported)
> 	Inputs: 0 Audio Inputs: 0 Tuners: 0
> 
> Output ioctls:
> 	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
> 	Outputs: 0 Audio Outputs: 0 Modulators: 0
> 
> Input/Output configuration ioctls:
> 	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
> 	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
> 	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
> 	test VIDIOC_G/S_EDID: OK (Not Supported)
> 
> Control ioctls:
> 	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
> 	test VIDIOC_QUERYCTRL: OK (Not Supported)
> 	test VIDIOC_G/S_CTRL: OK (Not Supported)
> 	test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
> 	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
> 	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> 	Standard Controls: 0 Private Controls: 0
> 
> Format ioctls:
> 	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> 	test VIDIOC_G/S_PARM: OK (Not Supported)
> 	test VIDIOC_G_FBUF: OK (Not Supported)
> 	test VIDIOC_G_FMT: OK
> 	test VIDIOC_TRY_FMT: OK
> 	test VIDIOC_S_FMT: OK
> 	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
> 	test Cropping: OK (Not Supported)
> 	test Composing: OK (Not Supported)
> 	test Scaling: OK
> 
> Codec ioctls:
> 	test VIDIOC_(TRY_)ENCODER_CMD: OK
> 	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> 	test VIDIOC_(TRY_)DECODER_CMD: OK
> 
> Buffer ioctls:
> 	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
> 	test VIDIOC_EXPBUF: OK
> 	test Requests: OK (Not Supported)
> 
> Test input 0:
> 
> Streaming ioctls:
> 	test read/write: OK (Not Supported)
> 	test blocking wait: OK
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY
> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (no poll): FAIL
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY
> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (select): FAIL
> 		fail: v4l2-test-buffers.cpp(254): g_field() ==
> V4L2_FIELD_ANY
> 		fail: v4l2-test-buffers.cpp(1266): buf.qbuf(node)
> 	test MMAP (epoll): FAIL
> 		fail: v4l2-test-buffers.cpp(1492): ret && ret != ENOTTY
> 		fail: v4l2-test-buffers.cpp(1580): setupUserPtr(node,
> q)
> 	test USERPTR (no poll): FAIL
> 		fail: v4l2-test-buffers.cpp(1492): ret && ret != ENOTTY
> 		fail: v4l2-test-buffers.cpp(1580): setupUserPtr(node,
> q)
> 	test USERPTR (select): FAIL
> 	test DMABUF: Cannot test, specify --expbuf-device
> 
> Total for mxc-jpeg decode device /dev/video0: 51, Succeeded: 46,
> Failed: 5, Warnings: 0
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ