Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging, null pointer oopses on SMP, libcrstalhd3-git i686 not interfacing to a

2013-01-05 Thread thomas schorpp

Hi Oliver,  hi crystalhd users and devs,  hello Broadcom Crystal HD staff,

1.
sorry for the delay, I had to upgrade my old debian i386 
stable...squeeze-backports userspace on the old core2duo machine to amd64 by 
full reinstall, otherwise the driver interface of libcrystalhd3 i686 to 
3.6.10...3.7.1amd64 SMP kernel.org kernels has failed permanently,

please (anyone still running such a setup or You) try to confirm this and 
report to this thread.

lspci still shows the same PCI-E errors (see my other posts to this list) with 
the working libcrystalhd3 amd64 and broadcom designed crystalhd driver now, so
this data reported from the chipset or lspci has to be considered faulty or 
stale and irelevant now, I will build the latest lspci from source to 
crosscheck this.


Please build ffmpeg rel. 1.0.1(non-MT version, not later version, git master 
showed up with an audio format bug, presenting wrong audio sample format as 
planar (sfltp, fltp, s16p) which bino cannot handle and makes mplayer cry for 
not having libavresample access but which is disabled by default in ffmpeg 
configure defaults and debian dmo source packages )
from Your distro source package with --disable-decoders='h264, h264_vdpau, 
h264_vda' and leave only h264_crystalhd need as h.264 decoder

and so trigger crystalhd by every app on your system accessing h.264 content 
for parsing or decoding and linked to libavcodec (check binaries with ldd if 
linked against this libavcodec54, , in libavcodec53 h264_crystalhd is flagged 
CAP_EXPERIMENTAL, which makes it unaccesible by other apps than the ffmpeg 
program (-strict -2), mplayer: -vc ffh264crystalhd, or will fail 
--disable-decoders='h264, h264_vdpau, h264_vda')  like mplayer (not statically 
linked), kaffeine, vlc, gnome nautilus media file properties (uses mplayer 
-identify) sequentially called and then in parallel and record and post the 
Ooopses in this thread here until the authors return from winter sports ;-)
Note for Bino users: System requirement is at least debian squeeze-backports X 
and DRI, otherwise bino will segfault the dri driver, i965 here and you need to 
build libGLEW(mx) 1.6 from source for debian stable systems, see 
http://savannah.nongnu.org/bugs/?33368 http://bino3d.org/help-wanted.html

2.
With the new amd64 userspace on 3.7.1 SMP PREEMPT kernel things got even more 
worse here now, got 5 kernel panics in IRQ handler of the crystalhd driver in 
1h while watching h.264 with
mplayer2/1 (single threaded decoding mode, stereo3d filter) resulting in system 
halting kernel crashes, I need to setup serial console debugging to get the 
logs, on my Pentium M i686 vdr machine, kernel has been able to continue at 
least after the null pointer oopses.
We need to have confirmation for this, too.

3.
Since the source code still states broadcom staff as module authors and the 
download on the broadcom website is packaged broken tar.bz2 and does not build 
here with recent kernels,
I'm CC'ing them now, too, and because it's their basic driver skeleton design 
and the quality and performance of this driver is far below the windows driver, 
which performs h.264 1080 great with http://mpc-hc.sourceforge.net at 5-10% cpu 
usage even on xp x64 on a i965, this should be the reference development target.

4.
The driver Makefile won't compile it with debian squeeze-backports 3.2 and 3.2 
bpo kbuild infrastructure, missing helper scripts and includes, it needs a full 
ready build kernel from sources:

schorpp@tom3:/usr/local/src/crystalhd/driver/linux$ LC_ALL=C make
make -C /lib/modules/3.2.0-0.bpo.4-amd64/build 
SUBDIRS=/mnt/data/usr/local/src/crystalhd/driver/linux modules
make[1]: Entering directory 
`/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/Makefile:287: 
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/Kbuild.include: 
Datei oder Verzeichnis nicht gefunden
/bin/bash: 
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-x86_64-has-stack-protector.sh:
 Datei oder Verzeichnis nicht gefunden
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/arch/x86/Makefile:81: 
stack protector enabled but no compiler support
/bin/bash: 
/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-common/scripts/gcc-goto.sh: Datei 
oder Verzeichnis nicht gefunden
make: *** Leerer Variablenname.  Schluss.
make[3]: *** [_module_/mnt/data/usr/local/src/crystalhd/driver/linux] Fehler 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/data/usr/src/linux-headers-3.2.0-0.bpo.4-amd64'
make: *** [all] Error 2
schorpp@tom3:/usr/local/src/crystalhd/driver/linux$

5.
I'm focusing to the 3.x kernel source code delivered staging driver now (only 
BCM70012 support so far, no BCM70015) meanwhile unitil we get more information.

6.
Mythtv and xbmc people please join and report, too.

You can get a BCM70012 for just 10US$, a BCM700015 from 30US$ up on Ebay from 
china, mini-PCI-E to PCI-E adapter 

Re: [BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging

2013-01-03 Thread Oliver Schinagl
I actually am one of the few that has one of those decoders so should be 
able to test things when needed. Just let me know what to test and I 
will try to comply


On 02-01-13 08:48, thomas schorpp wrote:

Hello guys,

I'm working on supporting BCM 970012/15 crystalhd decoder in userspace 
video/tv apps and


can't find where to report bugs of

http://git.linuxtv.org/jarod/crystalhd.git
devinheitmueller I think he just borrowed our git server.

So I borrow this list to get more developers, testers and sw- quality 
guys in.


Forgot to mention the attached Oopses under high load and 
multithreading in half automated stress/mass testing.


Scenario e.g.:
Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd :02:00.0: 
Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd :02:00.0: 
Opening new user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd :02:00.0: 
Close the handle first..


Looks like the driver is not threadsave, rebuilding kernel with 
spinlock debugging, should show more up.


y
tom

-Att: Kernel OOPS bt, etc

Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle 
kernel paging request at 2062696c

Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [2062696c] 0x2062696b
Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 08497001 
*pde = 

Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 
crypto_hash cpufreq_stats cpufreq_powersave cpufreq_userspace 
cpufreq_conservative bnep bluetooth crc16 binfmt_misc uinput fuse nfsd 
exportfs auth_rpcgss nfs_acl nfs lockd sunrpc nf_conntrack_ipv6 
nf_defrag_ipv6 ip6table_filter ip6_tables nf_conntrack_ipv4 
nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter ip_tables 
af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher 
crypto_algapi tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb 
snd_pcm_oss rt2x00usb rt2x00lib stv0297 mac80211 snd_intel8x0 
snd_ac97_codec snd_mixer_oss ac97_bus joydev snd_seq_dummy snd_pcm 
videobuf_dvb snd_seq_oss hid_sunplus hid_generic saa7134 
videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci 
crc_itu_t crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core 
snd_seq_midi_eve

n
t tveeprom videobuf_dma_sg
Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core 
videodev snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core 
pci_hotplug serio_raw pcspkr i2c_i801 8250_pnp 8250 soundcore 
serial_core acpi_cpufreq mperf processor evdev ext3 mbcache jbd sg 
sr_mod sd_mod crc_t10dif cdrom ata_piix ahci libahci uhci_hcd libata 
ehci_hcd scsi_mod usbcore
Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer 
Tainted: G  DO 3.6.10-PM #8/Alviso
Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[2062696c] 
EFLAGS: 00010286 CPU: 0

Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: 
c843c000 ECX: 636e3800 EDX: 1c10
Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: 
fb0068fc EBP: c842dea8 ESP: c842de74
Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS: 
 GS: 0033 SS: 0068
Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 
2062696c CR3: 084d9000 CR4: 07f0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0:  DR1: 
 DR2:  DR3: 

Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: 0ff0 DR7: 0400
Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 
11841, ti=c842c000 task=f0aba940 task.ti=c842c000)

Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ff10 
c117e3f6 0060 00010246 002a8464 f7138064 fafe3000
Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 
f5920988 fafe3000 c843c000 c842ded8 fa18564d c842ded8
Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 
f595a62c c842ded8 fa182977 002a8464 f5920900 f595a400

Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [fa18a569] ? 
crystalhd_link_download_fw+0x189/0x300 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [c117e3f6] ? 
__copy_from_user_ll+0xd6/0xf0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [c117e811] ? 
_copy_from_user+0x41/0xb0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [fa18564d] 
bc_cproc_download_fw+0xed/0x150 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [fa182597] ? 
chd_dec_proc_user_data+0x237/0x320 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [fa182977] ? 
chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [fa182b5e] 
chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  

[BUG] crystalhd git.linuxtv.org kernel driver: unable to handle kernel paging requests, improper (spin)locking(?) and paging

2013-01-01 Thread thomas schorpp

Hello guys,

I'm working on supporting BCM 970012/15 crystalhd decoder in userspace video/tv 
apps and

can't find where to report bugs of

http://git.linuxtv.org/jarod/crystalhd.git
devinheitmueller I think he just borrowed our git server.

So I borrow this list to get more developers, testers and sw- quality guys in.

Forgot to mention the attached Oopses under high load and multithreading in 
half automated stress/mass testing.

Scenario e.g.:
Dec 29 15:58:29 vdr1 kernel: [ 5698.364950] crystalhd :02:00.0: Opening new 
user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.557932] crystalhd :02:00.0: Opening new 
user[0] handle
Dec 29 15:58:30 vdr1 kernel: [ 5698.846312] crystalhd :02:00.0: Close the 
handle first..

Looks like the driver is not threadsave, rebuilding kernel with spinlock 
debugging, should show more up.

y
tom

-Att: Kernel OOPS bt, etc

Dec 29 15:56:10 vdr1 kernel: [ 5558.568671] BUG: unable to handle kernel paging 
request at 2062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568678] IP: [2062696c] 0x2062696b
Dec 29 15:56:10 vdr1 kernel: [ 5558.568681] *pdpt = 08497001 *pde = 

Dec 29 15:56:10 vdr1 kernel: [ 5558.568684] Oops: 0010 [#4] PREEMPT
Dec 29 15:56:10 vdr1 kernel: [ 5558.568731] Modules linked in: md5 crypto_hash 
cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative bnep 
bluetooth crc16 binfmt_misc uinput fuse nfsd exportfs auth_rpcgss nfs_acl nfs 
lockd sunrpc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_limit iptable_filter 
ip_tables af_packet ipv6 w83627ehf hwmon_vid hwmon uvcvideo isl6405 cryptomgr 
aead dvb_pll tda10086 saa7134_dvb tuner arc4 crypto_blkcipher crypto_algapi 
tda10021 snd_usb_audio snd_usbmidi_lib snd_hwdep rt73usb snd_pcm_oss rt2x00usb 
rt2x00lib stv0297 mac80211 snd_intel8x0 snd_ac97_codec snd_mixer_oss ac97_bus 
joydev snd_seq_dummy snd_pcm videobuf_dvb snd_seq_oss hid_sunplus hid_generic 
saa7134 videobuf2_vmalloc videobuf2_memops usbhid cfg80211 videobuf2_core 
snd_seq_midi hid snd_page_alloc snd_rawmidi budget_av dvb_ttpci crc_itu_t 
crypto budget_core saa7146_vv ttpci_eeprom saa7146 dvb_core snd_seq_midi_even
t tveeprom videobuf_dma_sg
Dec 29 15:56:10 vdr1 kernel: videobuf_core v4l2_common snd_seq rc_core videodev 
snd_seq_device crystalhd(O) snd_timer shpchp snd rng_core pci_hotplug serio_raw 
pcspkr i2c_i801 8250_pnp 8250 soundcore serial_core acpi_cpufreq mperf 
processor evdev ext3 mbcache jbd sg sr_mod sd_mod crc_t10dif cdrom ata_piix 
ahci libahci uhci_hcd libata ehci_hcd scsi_mod usbcore
Dec 29 15:56:10 vdr1 kernel: [ 5558.568770] Pid: 11841, comm: mplayer Tainted: 
G  DO 3.6.10-PM #8/Alviso
Dec 29 15:56:10 vdr1 kernel: [ 5558.568772] EIP: 0060:[2062696c] EFLAGS: 
00010286 CPU: 0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568775] EIP is at 0x2062696c
Dec 29 15:56:10 vdr1 kernel: [ 5558.568777] EAX: 00370042 EBX: c843c000 ECX: 
636e3800 EDX: 1c10
Dec 29 15:56:10 vdr1 kernel: [ 5558.568778] ESI: 000238fc EDI: fb0068fc EBP: 
c842dea8 ESP: c842de74
Dec 29 15:56:10 vdr1 kernel: [ 5558.568780]  DS: 007b ES: 007b FS:  GS: 
0033 SS: 0068
Dec 29 15:56:10 vdr1 kernel: [ 5558.568781] CR0: 8005003b CR2: 2062696c CR3: 
084d9000 CR4: 07f0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568783] DR0:  DR1:  DR2: 
 DR3: 
Dec 29 15:56:10 vdr1 kernel: [ 5558.568784] DR6: 0ff0 DR7: 0400
Dec 29 15:56:10 vdr1 kernel: [ 5558.568786] Process mplayer (pid: 11841, 
ti=c842c000 task=f0aba940 task.ti=c842c000)
Dec 29 15:56:10 vdr1 kernel: [ 5558.568787] Stack:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568793]  fa18a569 ff10 c117e3f6 
0060 00010246 002a8464 f7138064 fafe3000
Dec 29 15:56:10 vdr1 kernel: [ 5558.568798]  002a8440 c117e811 f5920988 
fafe3000 c843c000 c842ded8 fa18564d c842ded8
Dec 29 15:56:10 vdr1 kernel: [ 5558.568803]  fa182597 f595a400 f595a62c 
c842ded8 fa182977 002a8464 f5920900 f595a400
Dec 29 15:56:10 vdr1 kernel: [ 5558.568804] Call Trace:
Dec 29 15:56:10 vdr1 kernel: [ 5558.568818]  [fa18a569] ? 
crystalhd_link_download_fw+0x189/0x300 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568823]  [c117e3f6] ? 
__copy_from_user_ll+0xd6/0xf0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568828]  [c117e811] ? 
_copy_from_user+0x41/0xb0
Dec 29 15:56:10 vdr1 kernel: [ 5558.568839]  [fa18564d] 
bc_cproc_download_fw+0xed/0x150 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568846]  [fa182597] ? 
chd_dec_proc_user_data+0x237/0x320 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568854]  [fa182977] ? 
chd_dec_alloc_iodata+0xf7/0x120 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568861]  [fa182b5e] 
chd_dec_ioctl+0x16e/0x1c0 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568870]  [fa185560] ? 
bc_proc_in_completion+0x70/0x70 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568877]  [fa1829f0] ? 
chd_dec_free_iodata+0x50/0x50 [crystalhd]
Dec 29 15:56:10 vdr1 kernel: [ 5558.568881]  [c10f4355]