Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Hans Verkuil
On 09/18/2014 06:21 PM, Mauro Carvalho Chehab wrote:
> Em Wed, 17 Sep 2014 18:06:02 +0200
> Hans Verkuil  escreveu:
> 
>> On 09/17/2014 11:14 AM, Hans Verkuil wrote:
>>> This fixes the VBI regression seen in saa7134 when it was converted
>>> to vb2. Tested with my saa7134 board.
>>>
>>> It also updates the poll documentation and fixes a saa7134 bug where
>>> the WSS signal was never captured.
>>>
>>> The first patch should go to 3.17. It won't apply to older kernels,
>>> so I guess once this is merged we should post a patch to stable for
>>> those older kernels, certainly 3.16.
>>>
>>> I would expect this to be an issue for em28xx as well, but I will
>>> need to test that. If that driver is affected as well, then this
>>> fix needs to go into 3.9 and up.
>>
>> Update: the VBI apps won't work with the em28xx driver as I suspected.
>> With the fix all is fine for em28xx.
> 
> At least here, em28xx with one application (xawtv or qv4l2) reading
> at video0 and another one for vbi (mtt or zvbi), I'm getting the
> errors below. Clearly, it is not just the poll syscall that it is
> wrong on VB2 and/or em28xx.
> 
> I'm trying to identify what else is wrong there.

At least the queue_cancel warning is fixed by this:

https://www.mail-archive.com/linux-media@vger.kernel.org/msg78063.html

which is in the devel branch but not in the master branch.

Regards,

Hans

> 
> Regards,
> Mauro
> 
> [63271.912808] [ cut here ]
> [63271.912832] WARNING: CPU: 5 PID: 14761 at 
> drivers/media/v4l2-core/videobuf2-core.c:2126 __vb2_queue_cancel+0x1b1/0x260 
> [videobuf2_core]()
> [63271.912835] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
> em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
> tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
> x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 
> uvcvideo iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core 
> v4l2_common videodev snd_hda_codec_hdmi snd_hda_codec_realtek 
> snd_hda_codec_generic snd_hda_intel crct10dif_pclmul media cfg80211 
> snd_hda_controller iTCO_wdt mxm_wmi i2c_algo_bit drm_kms_helper drm 
> crc32_pclmul crc32c_intel ghash_clmulni_intel snd_hda_codec snd_hwdep 
> iTCO_vendor_support btusb bluetooth snd_seq snd_seq_device snd_pcm snd_timer 
> snd soundcore mei_me mei joydev i2c_i801 serio_raw microcode rfkill i2c_core 
> lpc_ich mfd_core shpchp
> [63271.913037]  wmi video r8169 mii
> [63271.913048] CPU: 5 PID: 14761 Comm: xawtv Not tainted 3.16.0-rc6+ #23
> [63271.913055] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 
> 550P5C/550P7C/SAMSUNG_NP1234567890, BIOS P05ABI.016.130917.dg 09/17/2013
> [63271.913059]   051c953c 8800c4957c08 
> 816f523f
> [63271.913067]   8800c4957c40 8108be8d 
> 
> [63271.913072]  0001 8800c5488948 88003dd35500 
> 
> [63271.913081] Call Trace:
> [63271.913098]  [] dump_stack+0x45/0x56
> [63271.913108]  [] warn_slowpath_common+0x7d/0xa0
> [63271.913115]  [] warn_slowpath_null+0x1a/0x20
> [63271.913137]  [] __vb2_queue_cancel+0x1b1/0x260 
> [videobuf2_core]
> [63271.913155]  [] vb2_internal_streamoff+0x35/0x90 
> [videobuf2_core]
> [63271.913171]  [] vb2_streamoff+0x35/0x60 [videobuf2_core]
> [63271.913184]  [] vb2_ioctl_streamoff+0x48/0x50 
> [videobuf2_core]
> [63271.913200]  [] v4l_streamoff+0x1a/0x20 [videodev]
> [63271.913215]  [] __video_do_ioctl+0x294/0x310 [videodev]
> [63271.913231]  [] video_usercopy+0x22e/0x5b0 [videodev]
> [63271.913244]  [] ? v4l_dbg_s_register+0x150/0x150 
> [videodev]
> [63271.913258]  [] ? remove_wait_queue+0x31/0x40
> [63271.913269]  [] ? n_tty_write+0x392/0x510
> [63271.913283]  [] video_ioctl2+0x15/0x20 [videodev]
> [63271.913295]  [] v4l2_ioctl+0x11b/0x150 [videodev]
> [63271.913304]  [] do_vfs_ioctl+0x2e0/0x4a0
> [63271.913310]  [] SyS_ioctl+0x81/0xa0
> [63271.913319]  [] ? __audit_syscall_exit+0x1f6/0x2a0
> [63271.913328]  [] system_call_fastpath+0x16/0x1b
> [63271.91] ---[ end trace 9381964a5237f703 ]---
> [63276.841245] [ cut here ]
> [63276.841256] WARNING: CPU: 1 PID: 1495 at fs/sysfs/dir.c:31 
> sysfs_warn_dup+0x64/0x80()
> [63276.841258] sysfs: cannot create duplicate filename 
> '/devices/pci:00/:00:14.0/usb3/3-2/3-2:1.0/ep_81'
> [63276.841260] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
> em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
> tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
> x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 
> uvcvideo iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core 
> v4l2_common videodev snd_hda_codec_hdmi snd_hda_codec_realtek 
> snd_hda_codec_generic snd_hda_intel crct10dif_pclmul media cfg80211 
> snd_hda_controller iTCO_wdt mxm_wmi i2c_algo_bit drm_kms_helper drm 
> crc32_pclmu

Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Mauro Carvalho Chehab
Em Wed, 17 Sep 2014 18:06:02 +0200
Hans Verkuil  escreveu:

> On 09/17/2014 11:14 AM, Hans Verkuil wrote:
> > This fixes the VBI regression seen in saa7134 when it was converted
> > to vb2. Tested with my saa7134 board.
> > 
> > It also updates the poll documentation and fixes a saa7134 bug where
> > the WSS signal was never captured.
> > 
> > The first patch should go to 3.17. It won't apply to older kernels,
> > so I guess once this is merged we should post a patch to stable for
> > those older kernels, certainly 3.16.
> > 
> > I would expect this to be an issue for em28xx as well, but I will
> > need to test that. If that driver is affected as well, then this
> > fix needs to go into 3.9 and up.
> 
> Update: the VBI apps won't work with the em28xx driver as I suspected.
> With the fix all is fine for em28xx.

At least here, em28xx with one application (xawtv or qv4l2) reading
at video0 and another one for vbi (mtt or zvbi), I'm getting the
errors below. Clearly, it is not just the poll syscall that it is
wrong on VB2 and/or em28xx.

I'm trying to identify what else is wrong there.

Regards,
Mauro

[63271.912808] [ cut here ]
[63271.912832] WARNING: CPU: 5 PID: 14761 at 
drivers/media/v4l2-core/videobuf2-core.c:2126 __vb2_queue_cancel+0x1b1/0x260 
[videobuf2_core]()
[63271.912835] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 uvcvideo 
iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
videodev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic 
snd_hda_intel crct10dif_pclmul media cfg80211 snd_hda_controller iTCO_wdt 
mxm_wmi i2c_algo_bit drm_kms_helper drm crc32_pclmul crc32c_intel 
ghash_clmulni_intel snd_hda_codec snd_hwdep iTCO_vendor_support btusb bluetooth 
snd_seq snd_seq_device snd_pcm snd_timer snd soundcore mei_me mei joydev 
i2c_i801 serio_raw microcode rfkill i2c_core lpc_ich mfd_core shpchp
[63271.913037]  wmi video r8169 mii
[63271.913048] CPU: 5 PID: 14761 Comm: xawtv Not tainted 3.16.0-rc6+ #23
[63271.913055] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 
550P5C/550P7C/SAMSUNG_NP1234567890, BIOS P05ABI.016.130917.dg 09/17/2013
[63271.913059]   051c953c 8800c4957c08 
816f523f
[63271.913067]   8800c4957c40 8108be8d 

[63271.913072]  0001 8800c5488948 88003dd35500 

[63271.913081] Call Trace:
[63271.913098]  [] dump_stack+0x45/0x56
[63271.913108]  [] warn_slowpath_common+0x7d/0xa0
[63271.913115]  [] warn_slowpath_null+0x1a/0x20
[63271.913137]  [] __vb2_queue_cancel+0x1b1/0x260 
[videobuf2_core]
[63271.913155]  [] vb2_internal_streamoff+0x35/0x90 
[videobuf2_core]
[63271.913171]  [] vb2_streamoff+0x35/0x60 [videobuf2_core]
[63271.913184]  [] vb2_ioctl_streamoff+0x48/0x50 
[videobuf2_core]
[63271.913200]  [] v4l_streamoff+0x1a/0x20 [videodev]
[63271.913215]  [] __video_do_ioctl+0x294/0x310 [videodev]
[63271.913231]  [] video_usercopy+0x22e/0x5b0 [videodev]
[63271.913244]  [] ? v4l_dbg_s_register+0x150/0x150 [videodev]
[63271.913258]  [] ? remove_wait_queue+0x31/0x40
[63271.913269]  [] ? n_tty_write+0x392/0x510
[63271.913283]  [] video_ioctl2+0x15/0x20 [videodev]
[63271.913295]  [] v4l2_ioctl+0x11b/0x150 [videodev]
[63271.913304]  [] do_vfs_ioctl+0x2e0/0x4a0
[63271.913310]  [] SyS_ioctl+0x81/0xa0
[63271.913319]  [] ? __audit_syscall_exit+0x1f6/0x2a0
[63271.913328]  [] system_call_fastpath+0x16/0x1b
[63271.91] ---[ end trace 9381964a5237f703 ]---
[63276.841245] [ cut here ]
[63276.841256] WARNING: CPU: 1 PID: 1495 at fs/sysfs/dir.c:31 
sysfs_warn_dup+0x64/0x80()
[63276.841258] sysfs: cannot create duplicate filename 
'/devices/pci:00/:00:14.0/usb3/3-2/3-2:1.0/ep_81'
[63276.841260] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 uvcvideo 
iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
videodev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic 
snd_hda_intel crct10dif_pclmul media cfg80211 snd_hda_controller iTCO_wdt 
mxm_wmi i2c_algo_bit drm_kms_helper drm crc32_pclmul crc32c_intel 
ghash_clmulni_intel snd_hda_codec snd_hwdep iTCO_vendor_support btusb bluetooth 
snd_seq snd_seq_device snd_pcm snd_timer snd soundcore mei_me mei joydev 
i2c_i801 serio_raw microcode rfkill i2c_core lpc_ich mfd_core shpchp
[63276.841326]  wmi video r8169 mii
[63276.841333] CPU: 1 PID: 1495 Comm: pulseaudio Tainted: GW 
3.16.0-rc6+ #23
[63276.841335] Hardware name: SAMSUNG ELECTRONICS CO., LTD

Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Hans Verkuil
On 09/18/14 14:55, Mauro Carvalho Chehab wrote:
> Em Wed, 17 Sep 2014 11:14:28 +0200
> Hans Verkuil  escreveu:
> 
>> This fixes the VBI regression seen in saa7134 when it was converted
>> to vb2. Tested with my saa7134 board.
>>
>> It also updates the poll documentation and fixes a saa7134 bug where
>> the WSS signal was never captured.
>>
>> The first patch should go to 3.17. It won't apply to older kernels,
>> so I guess once this is merged we should post a patch to stable for
>> those older kernels, certainly 3.16.
>>
>> I would expect this to be an issue for em28xx as well, but I will
>> need to test that. If that driver is affected as well, then this
>> fix needs to go into 3.9 and up.
> 
> For now:
> 
> Nacked-by: Mauro Carvalho Chehab 
> 
> 
> Changing the V4L2 API is *not* the right way to fix a regression.

Then that leaves option 4 as described by Laurent here:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg79465.html

Please reply to his email rather than this one.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Mauro Carvalho Chehab
Em Wed, 17 Sep 2014 11:14:28 +0200
Hans Verkuil  escreveu:

> This fixes the VBI regression seen in saa7134 when it was converted
> to vb2. Tested with my saa7134 board.
> 
> It also updates the poll documentation and fixes a saa7134 bug where
> the WSS signal was never captured.
> 
> The first patch should go to 3.17. It won't apply to older kernels,
> so I guess once this is merged we should post a patch to stable for
> those older kernels, certainly 3.16.
> 
> I would expect this to be an issue for em28xx as well, but I will
> need to test that. If that driver is affected as well, then this
> fix needs to go into 3.9 and up.

For now:

Nacked-by: Mauro Carvalho Chehab 


Changing the V4L2 API is *not* the right way to fix a regression.

Also, this changes a behavior that it is there since 2.6.24.
We can't do that, except if you're sure that no userspace applications
rely on the old behavior, with seems unlikely.

> 
> Regards,
> 
>   Hans
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-17 Thread Hans Verkuil
On 09/17/2014 11:14 AM, Hans Verkuil wrote:
> This fixes the VBI regression seen in saa7134 when it was converted
> to vb2. Tested with my saa7134 board.
> 
> It also updates the poll documentation and fixes a saa7134 bug where
> the WSS signal was never captured.
> 
> The first patch should go to 3.17. It won't apply to older kernels,
> so I guess once this is merged we should post a patch to stable for
> those older kernels, certainly 3.16.
> 
> I would expect this to be an issue for em28xx as well, but I will
> need to test that. If that driver is affected as well, then this
> fix needs to go into 3.9 and up.

Update: the VBI apps won't work with the em28xx driver as I suspected.
With the fix all is fine for em28xx.

Hans

> 
> Regards,
> 
>   Hans
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html