mbox series

[00/10] Improvements and fixups for vim2m driver

Message ID cover.1551446121.git.mchehab+samsung@kernel.org (mailing list archive)
Headers show
Series Improvements and fixups for vim2m driver | expand

Message

Mauro Carvalho Chehab March 1, 2019, 1:24 p.m. UTC
The vim2m was laking care for a long time. It had several issues. Several
were already fixed and are merged for Kernel 5.1, but there are still
some pending things.

This patch series complement the work, making it do the right thing with
regards to different resolutions at capture and output buffers.

Although it contains some improvements (like the addition of Bayer),
I'm tempted to do a late merge for it, in order for the entire set of changes
to go to Kernel 5.1, specially since:

a) It contains a fix at the buffer filling routine. At least this one should
go to 5.1 anyway;

b) while the other patches could eventually go to 5.2, they also do 
significant changes at the buffer handling logic;

c) It disables YUYV as output format (due to the horizontal scaler). It
would be good that such change would go together with the changes for
5.1 with actually implements YUYV support;

d) This is a test driver anyway and shouldn't affect systems in production.

e) As we're using it also to properly implement/fix Bayer support for M2M
transform drivers at Gstreamer, it would be better to have everything
altogether.

So, if nobody complains, I'll likely merge this series later today or along the
weekend for Kernel 5.1.


Mauro Carvalho Chehab (10):
  media: vim2m: add bayer capture formats
  media: vim2m: improve debug messages
  media: vim2m: ensure that width is multiple of two
  media: vim2m: add support for VIDIOC_ENUM_FRAMESIZES
  media: vim2m: use different framesizes for bayer formats
  media: vim2m: better handle cap/out buffers with different sizes
  media: vim2m: add vertical linear scaler
  media: vim2m: don't accept YUYV anymore as output format
  media: vim2m: add an horizontal scaler
  media: vim2m: speedup passthrough copy

 drivers/media/platform/vim2m.c | 415 +++++++++++++++++++++++----------
 1 file changed, 287 insertions(+), 128 deletions(-)

Comments

Mauro Carvalho Chehab March 1, 2019, 1:35 p.m. UTC | #1
Em Fri,  1 Mar 2019 10:24:16 -0300
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:

> The vim2m was laking care for a long time. It had several issues. Several
> were already fixed and are merged for Kernel 5.1, but there are still
> some pending things.
> 
> This patch series complement the work, making it do the right thing with
> regards to different resolutions at capture and output buffers.
> 
> Although it contains some improvements (like the addition of Bayer),
> I'm tempted to do a late merge for it, in order for the entire set of changes
> to go to Kernel 5.1, specially since:
> 
> a) It contains a fix at the buffer filling routine. At least this one should
> go to 5.1 anyway;
> 
> b) while the other patches could eventually go to 5.2, they also do 
> significant changes at the buffer handling logic;
> 
> c) It disables YUYV as output format (due to the horizontal scaler). It
> would be good that such change would go together with the changes for
> 5.1 with actually implements YUYV support;
> 
> d) This is a test driver anyway and shouldn't affect systems in production.
> 
> e) As we're using it also to properly implement/fix Bayer support for M2M
> transform drivers at Gstreamer, it would be better to have everything
> altogether.
> 
> So, if nobody complains, I'll likely merge this series later today or along the
> weekend for Kernel 5.1.

As requested on IRC, those are the results for the regression test:

#./test-media vim2m
Video input set to 3 (HDMI 0: Camera, ok)
Output set to 1
Video input set to 3 (HDMI 0: Camera, ok)
Output set to 1
Video input set to 3 (HDMI 0: Camera, ok)
Output set to 1


vim2m compliance tests

sex mar  1 10:33:00 -03 2019
v4l2-compliance SHA: 70d543c3ec02698d63f0de97397566651f9d3aa2, 64 bits

Compliance test for vim2m device /dev/media0:

Media Driver Info:
	Driver name      : vim2m
	Model            : vim2m
	Serial           : 
	Bus info         : platform:vim2m
	Media version    : 5.0.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.0.0

Required ioctls:
	test MEDIA_IOC_DEVICE_INFO: OK

Allow for multiple opens:
	test second /dev/media0 open: OK
	test MEDIA_IOC_DEVICE_INFO: OK
	test for unlimited opens: OK

Media Controller ioctls:
	test MEDIA_IOC_G_TOPOLOGY: OK
	Entities: 3 Interfaces: 1 Pads: 4 Links: 4
	test MEDIA_IOC_ENUM_ENTITIES/LINKS: OK
	test MEDIA_IOC_SETUP_LINK: OK

Total for vim2m device /dev/media0: 7, Succeeded: 7, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for vim2m device /dev/video0:

Driver Info:
	Driver name      : vim2m
	Card type        : vim2m
	Bus info         : platform:vim2m
	Driver version   : 5.0.0
	Capabilities     : 0x84208000
		Video Memory-to-Memory
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04208000
		Video Memory-to-Memory
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : vim2m
	Model            : vim2m
	Serial           : 
	Bus info         : platform:vim2m
	Media version    : 5.0.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.0.0
Interface Info:
	ID               : 0x0300000c
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : vim2m-source
	Function         : V4L2 I/O
	Pad 0x01000002   : 0: Source
	  Link 0x02000008: to remote pad 0x1000005 of entity 'vim2m-proc': Data, Enabled, Immutable

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	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
	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
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 3 Private Controls: 2

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 (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

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
	Video Capture: Captured 10 buffers
	test MMAP (no poll): OK
	Video Capture: Captured 10 buffers
	test MMAP (select): OK
	Video Capture: Captured 10 buffers
	test MMAP (epoll): OK
	Video Capture: Captured 10 buffers
	test USERPTR (no poll): OK
	Video Capture: Captured 10 buffers
	test USERPTR (select): OK
	Video Capture: Captured 10 buffers
	test DMABUF (no poll): OK
	Video Capture: Captured 10 buffers
	test DMABUF (select): OK

Total for vim2m device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0

Grand Total for vim2m device /dev/media0: 61, Succeeded: 61, Failed: 0, Warnings: 0









unbind vim2m


rebind vim2m


second unbind vim2m


rmmod vim2m









sex mar  1 10:33:09 -03 2019

unbind vivid


rmmod vivid

sex mar  1 10:33:12 -03 2019

Summary:

Total for vim2m device /dev/media0: 7, Succeeded: 7, Failed: 0, Warnings: 0
Total for vim2m device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0
Grand Total for vim2m device /dev/media0: 61, Succeeded: 61, Failed: 0, Warnings: 0

Final Summary: 61, Succeeded: 61, Failed: 0, Warnings: 0
sex mar  1 10:33:12 -03 2019


Thanks,
Mauro