Re: [RFC] [Patch] implement video driver for sur40

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

 



On Fri, 19 Dec 2014, Hans Verkuil wrote:
drivers/media remains under heavy development, so for video capture drivers
like yours you should always patch against either the mainline linux tree
or (preferred) the media_tree.git repo (git://linuxtv.org/media_tree.git,
master branch).
As per your suggestion, I've switched development to 3.18, and now I'm nearly there in terms of v4l2-compliance (also see attachment).

There's only one failing test left, which is this one:

Streaming ioctls:
	test read/write: OK
		fail: v4l2-test-buffers.cpp(284): g_field() == V4L2_FIELD_ANY
		fail: v4l2-test-buffers.cpp(611): buf.check(q, last_seq)
		fail: v4l2-test-buffers.cpp(884): captureBufs(node, q, m2m_q, frame_count, false)
	test MMAP: FAIL
	test USERPTR: OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total: 45, Succeeded: 44, Failed: 1, Warnings: 0

Could you give some hints on what this means?


On a different note, I'm getting occasional warnings in syslog when I run a regular video streaming application (e.g. cheese):

------------[ cut here ]------------
WARNING: CPU: 1 PID: 4995 at /home/apw/COD/linux/drivers/media/v4l2-core/videobuf2-core.c:2144 __vb2_queue_cancel+0x1d0/0x240 [videobuf2_core]()
Modules linked in: sur40(OE) videobuf2_dma_contig videobuf2_memops videobuf2_core v4l2_common videodev media dm_crypt wl(POE) snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel rfcomm bnep joydev input_polldev snd_hda_controller snd_hda_codec snd_hwdep kvm_amd kvm snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi edac_core snd_seq snd_seq_device serio_raw snd_timer sp5100_tco k10temp edac_mce_amd i2c_piix4 snd btusb soundcore bluetooth cfg80211 ipmi_si ppdev lp parport_pc ipmi_msghandler parport tpm_infineon mac_hid shpchp hid_apple usbhid hid uas usb_storage pata_acpi radeon i2c_algo_bit ttm psmouse drm_kms_helper pata_atiixp drm r8169 ahci mii libahci [last unloaded: sur40]
CPU: 1 PID: 4995 Comm: cheese Tainted: P           OE  3.17.1-031701-generic #201410150735
Hardware name: Samsung SUR40/SDNE-R78BA2-20, BIOS SDNE-R78BA2-2000 11/04/2011
0000000000000860 ffff8800c2c1bd28 ffffffff81796c37 0000000000000007
0000000000000000 ffff8800c2c1bd68 ffffffff81074a3c ffff8800c2c1bd58
fff8800c05904f8 ffff8800c05904d0 ffff8800abd65d38 ffff8800abd65d38
Call Trace:
[<ffffffff81796c37>] dump_stack+0x46/0x58
[<ffffffff81074a3c>] warn_slowpath_common+0x8c/0xc0
[<ffffffff81074a8a>] warn_slowpath_null+0x1a/0x20
[<ffffffffc05b7a10>] __vb2_queue_cancel+0x1d0/0x240 [videobuf2_core]
[<ffffffffc05bb3ee>] vb2_queue_release+0x1e/0x40 [videobuf2_core]
[<ffffffffc05bb481>] _vb2_fop_release+0x71/0xb0 [videobuf2_core]
[<ffffffffc05bb4ee>] vb2_fop_release+0x2e/0x50 [videobuf2_core]
[<ffffffffc0c1f491>] v4l2_release+0x41/0x90 [videodev]
[<ffffffff811eb34d>] __fput+0xbd/0x250
[<ffffffff811eb52e>] ____fput+0xe/0x10
[<ffffffff81091504>] task_work_run+0xc4/0xe0
[<ffffffff810776a6>] do_exit+0x196/0x470
[<ffffffff81082822>] ? zap_other_threads+0x82/0xa0
[<ffffffff81077a14>] do_group_exit+0x44/0xa0
[<ffffffff81077a87>] SyS_exit_group+0x17/0x20
[<ffffffff817a47ad>] system_call_fastpath+0x1a/0x1f
---[ end trace 451ed974170f6e44 ]---

Does this mean the driver consumes too much CPU resources?

Thanks for your help & best regards, Florian
--
"_Nothing_ brightens up my morning. Coffee simply provides a shade of
grey just above the pitch-black of the infinite depths of the _abyss_."
Driver Info:
	Driver name   : sur40
	Card type     : Samsung SUR40
	Bus info      : usb-0000:00:13.2-1
	Driver version: 3.17.1
	Capabilities  : 0x85200001
		Video Capture
		Read/Write
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x05200001
		Video Capture
		Read/Write
		Streaming
		Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: 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)

Test input 0:

	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 (Not Supported)

	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

Streaming ioctls:
	test read/write: OK
		fail: v4l2-test-buffers.cpp(284): g_field() == V4L2_FIELD_ANY
		fail: v4l2-test-buffers.cpp(611): buf.check(q, last_seq)
		fail: v4l2-test-buffers.cpp(884): captureBufs(node, q, m2m_q, frame_count, false)
	test MMAP: FAIL
	test USERPTR: OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total: 45, Succeeded: 44, Failed: 1, Warnings: 0

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux