media: video-i2c: add video-i2c driver support
Subsystems (3)
Matt Ranostay
maintainerv5 cover media: video-i2c: add video-i2c driver support
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Add video_i2c_try_fmt_vid_cap call in video_i2c_s_fmt_vid_cap function
Changes from v2:
* Add missing linux/kthread.h include that broke x86_64 build
Changes from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* add VB2_DMABUF to io_modes
* added entry to MAINTAINERS file switched to per chip support based on devicetree or i2c client id
Changes from v4:
* convert pointer from of_device_get_match_data() to long instead of int to avoid compiler warning
Matt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver
.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Signature · 1 line
2.14.1
Matt Ranostay
maintainerPATCH v5 1/2 media: dt-bindings: Add bindings for panasonic,amg88xx
Define the device tree bindings for the panasonic,amg88xx i2c video driver.
--- .../bindings/media/i2c/panasonic,amg88xx.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt
Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt new file +19 -0
@@ -0,0 +1,19 @@ +* Panasonic AMG88xx + +The Panasonic family of AMG88xx Grid-Eye sensors allow recording +8x8 10Hz video which consists of thermal datapoints + +Required Properties: + - compatible : Must be "panasonic,amg88xx" + - reg : i2c address of the device + +Example: + + i2c0@1c22000 { + ... + amg88xx@69 { + compatible = "panasonic,amg88xx"; + reg = <0x69>; + }; + ... + };
Signature · 1 line
2.14.1
Matt Ranostay
maintainerPATCH v5 2/2 media: video-i2c: add video-i2c driver
In reply to Matt RanostayThere are several thermal sensors that only have a low-speed bus interface but output valid video data. This patchset enables support for the AMG88xx "Grid-Eye" sensor family.
--- MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 574 insertions(+) create mode 100644 drivers/media/i2c/video-i2c.c
MAINTAINERS +6 -0
@@ -14876,6 +14876,12 @@ L: [email protected] S: Maintained F: drivers/media/platform/video-mux.c +VIDEO I2C POLLING DRIVER +M: Matt Ranostay <[email protected]> +L: [email protected] +S: Maintained +F: drivers/media/i2c/video-i2c.c + VIDEOBUF2 FRAMEWORK M: Pawel Osciak <[email protected]> M: Marek Szyprowski <[email protected]>
drivers/media/i2c/Kconfig +9 -0
@@ -963,6 +963,15 @@ config VIDEO_M52790 To compile this driver as a module, choose M here: the module will be called m52790. + +config VIDEO_I2C + tristate "I2C transport video support" + depends on VIDEO_V4L2 && I2C + select VIDEOBUF2_VMALLOC + ---help--- + Enable the I2C transport video support which supports the + following: + * Panasonic AMG88xx Grid-Eye Sensors endmenu menu "Sensors used on soc_camera driver"
drivers/media/i2c/Makefile +1 -0
@@ -95,6 +95,7 @@ obj-$(CONFIG_VIDEO_LM3646) += lm3646.o obj-$(CONFIG_VIDEO_SMIAPP_PLL) += smiapp-pll.o obj-$(CONFIG_VIDEO_AK881X) += ak881x.o obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o +obj-$(CONFIG_VIDEO_I2C) += video-i2c.o obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o obj-$(CONFIG_VIDEO_OV2659) += ov2659.o obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
drivers/media/i2c/video-i2c.c new file +558 -0
558 lines not on this page · raw message
Signature · 1 line
2.14.1
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Thanks!
Hans
Quoted 33 lines · Matt Ranostay
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Addvideo_i2c_try_fmt_vid_capcall invideo_i2c_s_fmt_vid_capfunctionChanges from v2:
* Add missinglinux/kthread.hinclude that brokex86_64buildChanges from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* addVB2_DMABUFtoio_modes
* added entry toMAINTAINERSfile switched to per chip support based on devicetree or i2c client idChanges from v4:
* convert pointer fromof_device_get_match_data()to long instead of int to avoid compiler warningMatt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Matt Ranostay
maintainerQuoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA : 14ce03c18ef67aa7a3d5781f015be855fd43839c
Compliance test for device /dev/video0:
Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
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
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 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 (Input 0):
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 (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
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 (Not Supported)
Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK (Not Supported)
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248): g_field() == V4L2_FIELD_ANY
fail: v4l2-test-buffers.cpp(658): buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(928): captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
fail: v4l2-test-buffers.cpp(1028): can_stream && ret != EINVAL test USERPTR: FAIL
test DMABUF: Cannot test, specify --expbuf-device
Stream using all formats:
test MMAP for Format Y12 , Frame Size [email protected] Hz:
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field None: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Top: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Interlaced: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Sequential Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Sequential Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Alternating: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Interlaced Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 0, Field Interlaced Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472): fmt.g_sizeimage() <= size
fail: v4l2-test-buffers.cpp(1268): q.reqbufs(node, 3) Stride 80, Field None: FAIL
Total: 64, Succeeded: 44, Failed: 20, Warnings: 0
Quoted 40 lines
Thanks!
Hans
Quoted 33 lines · Matt Ranostay
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Addvideo_i2c_try_fmt_vid_capcall invideo_i2c_s_fmt_vid_capfunctionChanges from v2:
* Add missinglinux/kthread.hinclude that brokex86_64buildChanges from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* addVB2_DMABUFtoio_modes
* added entry toMAINTAINERSfile switched to per chip support based on devicetree or i2c client idChanges from v4:
* convert pointer fromof_device_get_match_data()to long instead of int to avoid compiler warningMatt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Matt Ranostay
maintainerQuoted 106 lines · Matt Ranostay
Quoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA :
14ce03c18ef67aa7a3d5781f015be855fd43839cCompliance test for device
/dev/video0:Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities :0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps :0x05200001
Video Capture
Read/Write
Streaming
Extended Pix FormatRequired ioctls:
testVIDIOC_QUERYCAP: OKAllow for multiple opens:
test second/dev/video0open: OK
testVIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
testVIDIOC_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) testVIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) testVIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
testVIDIOC_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: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) testVIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) testVIDIOC_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: 0Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
testVIDIOC_G_FBUF: OK (Not Supported) testVIDIOC_G_FMT: OK
testVIDIOC_TRY_FMT: OK
testVIDIOC_S_FMT: OK
testVIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
testVIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
testVIDIOC_EXPBUF: OK (Not Supported)
Quoted 5 lines
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248):g_field()==V4L2_FIELD_ANY
Noticed this seems to be the most worrying of the failures. Any suggestions where could be requested and still be 0 == V4L2_FIELD_ANY?
Quoted 98 lines
fail: v4l2-test-buffers.cpp(658):
buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(928):captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
fail: v4l2-test-buffers.cpp(1028):can_stream&& ret != EINVAL test USERPTR: FAIL
test DMABUF: Cannot test, specify --expbuf-deviceStream using all formats:
test MMAP for Format Y12 , Frame Size [email protected] Hz:
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field None: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Alternating: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
Total: 64, Succeeded: 44, Failed: 20, Warnings: 0Quoted 40 lines
Thanks!
Hans
Quoted 33 lines · Matt Ranostay
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Addvideo_i2c_try_fmt_vid_capcall invideo_i2c_s_fmt_vid_capfunctionChanges from v2:
* Add missinglinux/kthread.hinclude that brokex86_64buildChanges from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* addVB2_DMABUFtoio_modes
* added entry toMAINTAINERSfile switched to per chip support based on devicetree or i2c client idChanges from v4:
* convert pointer fromof_device_get_match_data()to long instead of int to avoid compiler warningMatt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Quoted 108 lines · Matt Ranostay
Quoted 106 lines · Matt Ranostay
Quoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA :
14ce03c18ef67aa7a3d5781f015be855fd43839cCompliance test for device
/dev/video0:Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities :0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps :0x05200001
Video Capture
Read/Write
Streaming
Extended Pix FormatRequired ioctls:
testVIDIOC_QUERYCAP: OKAllow for multiple opens:
test second/dev/video0open: OK
testVIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
testVIDIOC_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) testVIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) testVIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
testVIDIOC_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: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) testVIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) testVIDIOC_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: 0Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
testVIDIOC_G_FBUF: OK (Not Supported) testVIDIOC_G_FMT: OK
testVIDIOC_TRY_FMT: OK
testVIDIOC_S_FMT: OK
testVIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
testVIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
testVIDIOC_EXPBUF: OK (Not Supported)
Quoted 8 lines
Quoted 5 lines
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248):g_field()==V4L2_FIELD_ANYNoticed this seems to be the most worrying of the failures. Any suggestions where could be requested and still be 0 ==
V4L2_FIELD_ANY?
struct v4l2_buffers should never return FIELD_ANY. For this driver the frames are always progressive, not interlaced, so just set this to FIELD_NONE in the driver.
Basically the driver must never give FIELD_ANY back to userspace. Userspace can pass in FIELD_ANY when it calls TRY/S_FMT, but it should always be replaced with a non-zero field value. In this case FIELD_NONE.
Regards,
Hans
Quoted 99 lines
Quoted 99 lines
fail: v4l2-test-buffers.cpp(658):
buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(928):captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
fail: v4l2-test-buffers.cpp(1028):can_stream&& ret != EINVAL test USERPTR: FAIL
test DMABUF: Cannot test, specify --expbuf-deviceStream using all formats:
test MMAP for Format Y12 , Frame Size [email protected] Hz:
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field None: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Alternating: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
Total: 64, Succeeded: 44, Failed: 20, Warnings: 0Quoted 40 lines
Thanks!
Hans
Quoted 33 lines · Matt Ranostay
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Addvideo_i2c_try_fmt_vid_capcall invideo_i2c_s_fmt_vid_capfunctionChanges from v2:
* Add missinglinux/kthread.hinclude that brokex86_64buildChanges from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* addVB2_DMABUFtoio_modes
* added entry toMAINTAINERSfile switched to per chip support based on devicetree or i2c client idChanges from v4:
* convert pointer fromof_device_get_match_data()to long instead of int to avoid compiler warningMatt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Matt Ranostay
maintainerQuoted 118 lines · Hans Verkuil
Quoted 108 lines · Matt Ranostay
Quoted 106 lines · Matt Ranostay
Quoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA :
14ce03c18ef67aa7a3d5781f015be855fd43839cCompliance test for device
/dev/video0:Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities :0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps :0x05200001
Video Capture
Read/Write
Streaming
Extended Pix FormatRequired ioctls:
testVIDIOC_QUERYCAP: OKAllow for multiple opens:
test second/dev/video0open: OK
testVIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
testVIDIOC_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) testVIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) testVIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
testVIDIOC_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: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) testVIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) testVIDIOC_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: 0Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
testVIDIOC_G_FBUF: OK (Not Supported) testVIDIOC_G_FMT: OK
testVIDIOC_TRY_FMT: OK
testVIDIOC_S_FMT: OK
testVIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
testVIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
testVIDIOC_EXPBUF: OK (Not Supported)Quoted 8 lines
Quoted 5 lines
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248):g_field()==V4L2_FIELD_ANYNoticed this seems to be the most worrying of the failures. Any suggestions where could be requested and still be 0 ==
V4L2_FIELD_ANY?
Quoted 7 lines
struct
v4l2_buffersshould never returnFIELD_ANY. For this driver the frames are always progressive, not interlaced, so just set this toFIELD_NONEin the driver.Basically the driver must never give
FIELD_ANYback to userspace. Userspace can pass inFIELD_ANYwhen it calls TRY/S_FMT, but it should always be replaced with a non-zero field value. In this caseFIELD_NONE.
Which callback would that be in? Because currently the driver is only handling the v4l2_pix_format settings, and not vb2_v4l2_buffer settings.
- Matt
Quoted 105 lines
Regards,
Hans
Quoted 99 lines
Quoted 99 lines
fail: v4l2-test-buffers.cpp(658):
buf.check(q, last_seq)
fail: v4l2-test-buffers.cpp(928):captureBufs(node, q, m2m_q, frame_count, false)
test MMAP: FAIL
fail: v4l2-test-buffers.cpp(1028):can_stream&& ret != EINVAL test USERPTR: FAIL
test DMABUF: Cannot test, specify --expbuf-deviceStream using all formats:
test MMAP for Format Y12 , Frame Size [email protected] Hz:
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field None: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Sequential Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Alternating: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Top-Bottom: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 0, Field Interlaced Bottom-Top: FAIL
fail: v4l2-test-buffers.cpp(1472):fmt.g_sizeimage()<= size
fail: v4l2-test-buffers.cpp(1268):q.reqbufs(node, 3)Stride 80, Field None: FAIL
Total: 64, Succeeded: 44, Failed: 20, Warnings: 0Quoted 40 lines
Thanks!
Hans
Quoted 33 lines · Matt Ranostay
Add support for video-i2c polling driver
Changes from v1:
* Switch to SPDX tags versus GPLv2 license text
* Remove unneeded zeroing of data structures
* Addvideo_i2c_try_fmt_vid_capcall invideo_i2c_s_fmt_vid_capfunctionChanges from v2:
* Add missinglinux/kthread.hinclude that brokex86_64buildChanges from v3:
* Add devicetree binding documents
* snprintf check added
* switched to per chip support based on devicetree or i2c client id
* addVB2_DMABUFtoio_modes
* added entry toMAINTAINERSfile switched to per chip support based on devicetree or i2c client idChanges from v4:
* convert pointer fromof_device_get_match_data()to long instead of int to avoid compiler warningMatt Ranostay (2):
media: dt-bindings: Add bindings for panasonic,amg88xx
media: video-i2c: add video-i2c driver.../bindings/media/i2c/panasonic,amg88xx.txt | 19 + MAINTAINERS | 6 + drivers/media/i2c/Kconfig | 9 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/video-i2c.c | 558 +++++++++++++++++++++ 5 files changed, 593 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/panasonic,amg88xx.txt create mode 100644 drivers/media/i2c/video-i2c.c
Quoted 123 lines · Matt Ranostay
Quoted 122 lines · Hans Verkuil
Quoted 108 lines · Matt Ranostay
Quoted 106 lines · Matt Ranostay
Quoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA :
14ce03c18ef67aa7a3d5781f015be855fd43839cCompliance test for device
/dev/video0:Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities :0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps :0x05200001
Video Capture
Read/Write
Streaming
Extended Pix FormatRequired ioctls:
testVIDIOC_QUERYCAP: OKAllow for multiple opens:
test second/dev/video0open: OK
testVIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
testVIDIOC_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) testVIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) testVIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
testVIDIOC_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: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) testVIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) testVIDIOC_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: 0Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
testVIDIOC_G_FBUF: OK (Not Supported) testVIDIOC_G_FMT: OK
testVIDIOC_TRY_FMT: OK
testVIDIOC_S_FMT: OK
testVIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
testVIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
testVIDIOC_EXPBUF: OK (Not Supported)Quoted 8 lines
Quoted 5 lines
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248):g_field()==V4L2_FIELD_ANYNoticed this seems to be the most worrying of the failures. Any suggestions where could be requested and still be 0 ==
V4L2_FIELD_ANY?struct
v4l2_buffersshould never returnFIELD_ANY. For this driver the frames are always progressive, not interlaced, so just set this toFIELD_NONEin the driver.
Quoted 8 lines
Quoted 3 lines
Basically the driver must never give
FIELD_ANYback to userspace. Userspace can pass inFIELD_ANYwhen it calls TRY/S_FMT, but it should always be replaced with a non-zero field value. In this caseFIELD_NONE.Which callback would that be in? Because currently the driver is only handling the
v4l2_pix_formatsettings, and notvb2_v4l2_buffersettings.
You typically do that in buffer_prepare(). BTW, I noticed that you do not set the sequence counter in v4l2_buffer! You set that just before calling vb2_buffer_done().
Regards,
Hans
Matt Ranostay
maintainerQuoted 129 lines · Hans Verkuil
Quoted 128 lines · Matt Ranostay
Quoted 125 lines · Hans Verkuil
Quoted 108 lines · Matt Ranostay
Quoted 106 lines · Matt Ranostay
Quoted 5 lines · Hans Verkuil
Hi Matt,
This is looking good. One request before I merge: please run the 'v4l2-compliance -s -f' utility and post the result here.
Quoted 8 lines
I don't think I've asked you to do that before (or if I did, I couldn't find it in my mail archive).
It should run without failures.
Use the latest version from the git repo: https://git.linuxtv.org/v4l-utils.git/
./bootstrap.sh; ./configure; make; sudo make install
Heh so not exactly no failures. Suspect a lot of these are due to the weird small 8x8 pixel input, and the fact it doesn't support modes a typical video capture device would.
v4l2-compliance SHA :
14ce03c18ef67aa7a3d5781f015be855fd43839cCompliance test for device
/dev/video0:Driver Info:
Driver name : video-i2c
Card type : I2C 2-105 Transport Video
Bus info : I2C:2-105
Driver version : 4.14.11
Capabilities :0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps :0x05200001
Video Capture
Read/Write
Streaming
Extended Pix FormatRequired ioctls:
testVIDIOC_QUERYCAP: OKAllow for multiple opens:
test second/dev/video0open: OK
testVIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
testVIDIOC_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) testVIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) testVIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
testVIDIOC_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: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) testVIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported) testVIDIOC_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: 0Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK
testVIDIOC_G_FBUF: OK (Not Supported) testVIDIOC_G_FMT: OK
testVIDIOC_TRY_FMT: OK
testVIDIOC_S_FMT: OK
testVIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
testVIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
testVIDIOC_EXPBUF: OK (Not Supported)Quoted 8 lines
Quoted 5 lines
Test input 0:
Streaming ioctls:
test read/write: OK
fail: v4l2-test-buffers.cpp(248):g_field()==V4L2_FIELD_ANYNoticed this seems to be the most worrying of the failures. Any suggestions where could be requested and still be 0 ==
V4L2_FIELD_ANY?struct
v4l2_buffersshould never returnFIELD_ANY. For this driver the frames are always progressive, not interlaced, so just set this toFIELD_NONEin the driver.Basically the driver must never give
FIELD_ANYback to userspace. Userspace can pass inFIELD_ANYwhen it calls TRY/S_FMT, but it should always be replaced with a non-zero field value. In this caseFIELD_NONE.
Quoted 8 lines
Quoted 3 lines
Which callback would that be in? Because currently the driver is only handling the
v4l2_pix_formatsettings, and notvb2_v4l2_buffersettings.You typically do that in
buffer_prepare(). BTW, I noticed that you do not set the sequence counter inv4l2_buffer! You set that just before callingvb2_buffer_done().
Ah explains another compliance failure I see now :)
Thanks,
Matt
Quoted 3 lines
Regards,
Hans