./vaapi_h264 return init fail, how to solve?

80 views
Skip to first unread message

valpa

unread,
Jul 27, 2010, 11:33:45 PM7/27/10
to crystalhd-development
I played with crystalhd by using hwdecode_demos test codes,

first I will get error:
[root@localhost src]# ./vaapi_h264
Display type 'x11'
Hardware accelerator 'vaapi'
[hwdecode_demos] VA display 0x912dad0
libva: libva version 0.31.1
libva: User requested driver 'crystalhd'
libva: Trying to open /usr/lib/va/crystalhd_drv_video.so
crystalhd_drv_video: __vaDriverInit_0_31 (#2000): being called
Running DIL (3.5.0) Version
DtsDeviceOpen: Opening HW in mode 0
Clock set to 200
crystalhd_drv_video: __vaDriverInit_0_31 (#2091): returned
libva: va_openDriver() returns 0
[hwdecode_demos] VA API version 0.31
crystalhd_drv_video: crystalhd_QueryDisplayAttributes (#1822): being
called
crystalhd_drv_video: crystalhd_QueryDisplayAttributes (#1827):
returned
[hwdecode_demos] 0 display attributes available
[hwdecode_demos] Decoded surface size: 320x240
[hwdecode_demos] 3 profiles available
[hwdecode_demos] VAProfileH264Baseline
[hwdecode_demos] VAProfileH264Main
[hwdecode_demos] VAProfileH264High
[hwdecode_demos] 1 entrypoints available for VAProfileH264High
[hwdecode_demos] VAEntrypointVLD
crystalhd_drv_video: crystalhd_GetConfigAttributes (#180): being
called
crystalhd_drv_video: crystalhd_GetConfigAttributes (#201): returned
crystalhd_drv_video: crystalhd_CreateConfig (#239): being called
crystalhd_drv_video: crystalhd_CreateConfig (#347): returned
crystalhd_drv_video: crystalhd_CreateSurfaces (#414): being called
crystalhd_drv_video: crystalhd_CreateSurfaces (#453): returned
crystalhd_drv_video: crystalhd_CreateContext (#923): being called
crystalhd_drv_video: crystalhd_CreateContext: image size = 320 x 240
Map YUV buffs Failed [6]
DtsMapYUVBuffs failed Sts:6
vaapi_h264: crystalhd_drv_video.c:1023: crystalhd_CreateContext:
Assertion `sts == BC_STS_SUCCESS' failed.
Aborted

then if I retest, it shows:

[root@localhost src]# ./vaapi_h264
Display type 'x11'
Hardware accelerator 'vaapi'
[hwdecode_demos] VA display 0x95ccad0
libva: libva version 0.31.1
libva: User requested driver 'crystalhd'
libva: Trying to open /usr/lib/va/crystalhd_drv_video.so
crystalhd_drv_video: __vaDriverInit_0_31 (#2000): being called
Running DIL (3.5.0) Version
DtsDeviceOpen: Opening HW in mode 0
Clock set to 200
DtsNotifyMode: Ioctl failed: 6
Notify Operating Mode Failed
DtsAllocIoctlData Error
crystalhd_drv_video: __vaDriverInit_0_31 (#2072): returned
libva error: /usr/lib/va/crystalhd_drv_video.so init failed
libva: va_openDriver() returns 1
[hwdecode_demos] vaInitialize(): operation failed
ERROR: initialization failed



something different between these two. What can I do for it?

Naren (Narendra) Sankar

unread,
Jul 27, 2010, 11:38:32 PM7/27/10
to crystalhd-...@googlegroups.com
Don't have the source handy in front of me. But it seems that the map function failed in malloc memory. So ran out of kernel memory resource somehow.

Can you send output of your dmesg?

Thanks

Naren
--
To post to this group, send email to
crystalhd-...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/crystalhd-development?hl=en

valpa

unread,
Jul 28, 2010, 1:03:38 AM7/28/10
to crystalhd-development
the dmesg output is:

Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 7060 f30bcf00
Firmware Downloaded Successfully
DelQAddr:4fdc8 RelQAddr:4fecc
App PIB:0 1 420 2 4 f0 f0 0 0 0
Closing user[0] handle
Deleting IOQs
Releasing RX Pkt pool
Released dio pool 10
Stopping BCM70012 Device
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 7060 f32c43c0
Firmware Downloaded Successfully
DelQAddr:4fed8 RelQAddr:4ffdc
*ERR*:drivers/staging/crystalhd/crystalhd_hw.c:2156: Insufficient
resources
Closing user[0] handle
Stopping BCM70012 Device
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 7060 f3142180
Firmware Downloaded Successfully
DelQAddr:4fed8 RelQAddr:4ffdc
*ERR*:drivers/staging/crystalhd/crystalhd_misc.c:514: No free
elements.
Closing user[0] handle
Stopping BCM70012 Device
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 7060 f32c4420
*ERR*:drivers/staging/crystalhd/crystalhd_misc.c:514: No free
elements.
Deleting IOQs
Releasing RX Pkt pool
Closing user[0] handle
Stopping BCM70012 Device
Opening new user[0] handle
Starting BCM70012 Device
clock is moving to 175 with n 35 with vco_mg 2
CInitializing Dio pool 10 1024 7060 f32c4480
*ERR*:drivers/staging/crystalhd/crystalhd_misc.c:514: No free
elements.
Deleting IOQs
Releasing RX Pkt pool
Closing user[0] handle
Stopping BCM70012 Device
[root@localhost src]# free
total used free shared buffers
cached
Mem: 2051936 839772 1212164 0 33432
583896
-/+ buffers/cache: 222444 1829492
Swap: 4112380 0 4112380


On Jul 28, 1:38 pm, "Naren (Narendra) Sankar" <nsan...@broadcom.com>
wrote:

Naren (Narendra) Sankar

unread,
Jul 28, 2010, 11:33:28 AM7/28/10
to crystalhd-...@googlegroups.com
This looks like it is using a really old version of the driver and software stack and I cannot really help debug since there is not enough information beyond the fact that we are unable to allocated DMA resources for some reason.

Can this be re-build and re-run with the latest code?

Thanks

Naren Sankar (+1 408 218 6327)
Architect/PLM
Media PC, Broadband Communications Group
Broadcom Corp.

valpa

unread,
Jul 28, 2010, 7:54:46 PM7/28/10
to crystalhd-development
Currently I'm using kernel 2.6.34.1 with staging crystalhd driver.

Here is the lspci and modinfo if helps:

02:00.0 Multimedia controller: Broadcom Corporation Device 1612 (rev
01)
Subsystem: Broadcom Corporation Device 2612
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 28
Region 0: Memory at dfc00000 (64-bit, non-prefetchable) [size=64K]
Region 2: Memory at df800000 (64-bit, non-prefetchable) [size=4M]
Capabilities: <access denied>
Kernel driver in use: Broadcom 70012 Decoder
Kernel modules: crystalhd

filename: /lib/modules/2.6.34.1/kernel/drivers/staging/crystalhd/
crystalhd.ko
alias: bcm70012
license: GPL
description: Broadcom Crystal HD Decoder (BCM70012) Driver
author: Prasad Bolisetty <pra...@broadcom.com>
author: Naren Sankar <nsa...@broadcom.com>
srcversion: 366D0D476B05DFA8B8842A8
alias: pci:v000014E4d00001612sv*sd*bc*sc*i*
depends:
staging: Y
vermagic: 2.6.34.1 SMP mod_unload 686


I found there are four places to download the driver and user space
library
- broadcom website
- linux kernel
- http://git.wilsonet.com/crystalhd.git/
- http://code.google.com/p/crystalhd-for-osx/

I tried the one from wilsonet and run export-driver-for-staging.sh, it
seems miss the flea header files. And it shows:

[root@localhost linux-2.6.34.1]# make modules
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/staging/crystalhd/crystalhd_cmds.o
In file included from drivers/staging/crystalhd/crystalhd_hw.h:35,
from drivers/staging/crystalhd/crystalhd_cmds.h:37,
from drivers/staging/crystalhd/crystalhd_lnx.h:51,
from drivers/staging/crystalhd/crystalhd_cmds.c:27:
drivers/staging/crystalhd/FleaDefs.h:7:24: error: bchp_misc1.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:8:24: error: bchp_misc2.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:9:24: error: bchp_misc3.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:10:29: error: bchp_scrub_ctrl.h:
No such file or directory
drivers/staging/crystalhd/FleaDefs.h:11:34: error:
bchp_wrap_misc_intr2.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:12:32: error:
bchp_armcr4_bridge.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:13:23: error: bchp_intr.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:14:39: error:
bchp_pri_arb_control_regs.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:15:35: error:
bchp_ddr23_ctl_regs_0.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:16:40: error:
bchp_ddr23_phy_byte_lane_0.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:17:40: error:
bchp_ddr23_phy_byte_lane_1.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:18:41: error:
bchp_ddr23_phy_control_regs.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:19:22: error: bchp_clk.h: No such
file or directory
drivers/staging/crystalhd/FleaDefs.h:20:26: error: bchp_pcie_tl.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:21:31: error:
bchp_sun_gisb_arb.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:22:29: error: bchp_misc_perst.h:
No such file or directory
drivers/staging/crystalhd/FleaDefs.h:23:35: error:
bchp_decode_cpuregs_0.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:24:36: error:
bchp_decode_cpuregs2_0.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:25:27: error: bchp_pcie_cfg.h: No
such file or directory
drivers/staging/crystalhd/FleaDefs.h:26:22: error: bchp_mfd.h: No such
file or directory
drivers/staging/crystalhd/FleaDefs.h:27:31: error:
bchp_sun_top_ctrl.h: No such file or directory
drivers/staging/crystalhd/FleaDefs.h:28:22: error: bchp_gio.h: No such
file or directory
drivers/staging/crystalhd/FleaDefs.h:29:34: error:
bchp_pri_client_regs.h: No such file or directory


On Jul 29, 1:33 am, "Naren (Narendra) Sankar" <nsan...@broadcom.com>

valpa

unread,
Jul 28, 2010, 8:35:12 PM7/28/10
to crystalhd-development
I tried another way, just compile it in crystalhd/deriver/linux/ by
autoconf and make and make install, after that, rmmod old driver and
install the new driver. Thus, kernel failure messages shows up (I'm
using fedora 13).

Kernel failure message 1:
------------[ cut here ]------------
WARNING: at drivers/pci/msi.c:655 pci_enable_msi_block+0x81/0x1ff()
Hardware name:
Modules linked in: crystalhd(+) ext2 fuse bridge stp llc bnep sco
l2cap bluetooth sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter
ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq dm_multipath uinput
snd_hda_codec_realtek snd_hda_intel i915 snd_hda_codec snd_hwdep
drm_kms_helper snd_seq drm snd_seq_device snd_pcm ppdev snd_timer
i2c_i801 i2c_algo_bit parport_pc snd iTCO_wdt i2c_core pcspkr
serio_raw joydev parport usb_storage r8169 iTCO_vendor_support
soundcore video output mii snd_page_alloc [last unloaded: crystalhd]
Pid: 27156, comm: insmod Tainted: G C 2.6.34.1 #1
Call Trace:
[<c043e6c8>] warn_slowpath_common+0x6a/0x81
[<c05c00d2>] ? pci_enable_msi_block+0x81/0x1ff
[<c043e6f1>] warn_slowpath_null+0x12/0x15
[<c05c00d2>] pci_enable_msi_block+0x81/0x1ff
[<fae0e2ab>] chd_dec_enable_int+0x2b/0xf0 [crystalhd]
[<fae0e511>] ? chd_dec_free_iodata+0x41/0x50 [crystalhd]
[<fae1a91f>] chd_dec_pci_probe+0x438/0x5a5 [crystalhd]
[<c05b21e8>] local_pci_probe+0x13/0x15
[<c05b2c62>] pci_device_probe+0x48/0x6b
[<c0636f60>] driver_probe_device+0x7e/0xf2
[<c0637015>] __driver_attach+0x41/0x59
[<c0636744>] bus_for_each_dev+0x42/0x6c
[<c0636e2a>] driver_attach+0x19/0x1b
[<c0636fd4>] ? __driver_attach+0x0/0x59
[<c0636b16>] bus_add_driver+0x94/0x1c6
[<c05a0125>] ? kset_find_obj+0x23/0x4f
[<c063725f>] driver_register+0x7e/0xe5
[<c05b2e24>] __pci_register_driver+0x3d/0x9a
[<fae23000>] ? chd_dec_module_init+0x0/0x65 [crystalhd]
[<fae2303f>] chd_dec_module_init+0x3f/0x65 [crystalhd]
[<c040305b>] do_one_initcall+0x51/0x144
[<c0468751>] sys_init_module+0xac/0x1e0
[<c0407f98>] sysenter_do_call+0x12/0x2d
---[ end trace 5f7293dca24514e5 ]---

On Jul 29, 9:54 am, valpa <valpass...@gmail.com> wrote:
> Currently I'm using kernel 2.6.34.1 with staging crystalhd driver.
>
> Here is the lspci and modinfo if helps:
>
> 02:00.0 Multimedia controller: Broadcom Corporation Device 1612 (rev
> 01)
>         Subsystem: Broadcom Corporation Device 2612
>         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
>         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 0, Cache Line Size: 64 bytes
>         Interrupt: pin A routed to IRQ 28
>         Region 0: Memory at dfc00000 (64-bit, non-prefetchable) [size=64K]
>         Region 2: Memory at df800000 (64-bit, non-prefetchable) [size=4M]
>         Capabilities: <access denied>
>         Kernel driver in use: Broadcom 70012 Decoder
>         Kernel modules: crystalhd
>
> filename:       /lib/modules/2.6.34.1/kernel/drivers/staging/crystalhd/
> crystalhd.ko
> alias:          bcm70012
> license:        GPL
> description:    Broadcom Crystal HD Decoder (BCM70012) Driver
> author:         Prasad Bolisetty <pras...@broadcom.com>
> author:         Naren Sankar <nsan...@broadcom.com>
> srcversion:     366D0D476B05DFA8B8842A8
> alias:          pci:v000014E4d00001612sv*sd*bc*sc*i*
> depends:
> staging:        Y
> vermagic:       2.6.34.1 SMP mod_unload 686
>
> I found there are four places to download the driver and user space
> library
>  - broadcom website
>  - linux kernel
>  -http://git.wilsonet.com/crystalhd.git/
>  -http://code.google.com/p/crystalhd-for-osx/
> ...
>
> read more »

Naren (Narendra) Sankar

unread,
Jul 29, 2010, 9:11:28 PM7/29/10
to crystalhd-...@googlegroups.com
The git tree from wilsonet should be the latest and greatest bleeding edge stuff. All other locations are behind.

Jarod Wilson

unread,
Jul 29, 2010, 3:39:14 PM7/29/10
to crystalhd-...@googlegroups.com
On Wed, Jul 28, 2010 at 7:54 PM, valpa <valpa...@gmail.com> wrote:
> I found there are four places to download the driver and user space
> library
>  - broadcom website
>  - linux kernel
>  - http://git.wilsonet.com/crystalhd.git/
>  - http://code.google.com/p/crystalhd-for-osx/
>
> I tried the one from wilsonet and run export-driver-for-staging.sh, it
> seems miss the flea header files. And it shows:

Forgot to mention: that script is badly in need of an update, it
hasn't been updated since the bcm970015 support was added. Another
thing on the TODO list...

--
Jarod Wilson
ja...@wilsonet.com

Jarod Wilson

unread,
Jul 29, 2010, 12:32:13 AM7/29/10
to crystalhd-...@googlegroups.com
On Wed, Jul 28, 2010 at 7:54 PM, valpa <valpa...@gmail.com> wrote:
> I found there are four places to download the driver and user space
> library
>  - broadcom website

This is a recent snapshot from the git tree, but there's been a fair
amount of changes since it was created.

>  - linux kernel

This is a really old cut from the git tree now. The git tree needs
significant coding style cleanup work done before it can get sent
along to the kernel again.

>  - http://git.wilsonet.com/crystalhd.git/

The most up-to-date at the moment, and technically, the canonical
"upstream", for Linux.

>  - http://code.google.com/p/crystalhd-for-osx/

This is the place to go for OS X, though Scott sometimes has fixes for
Linux in there too ahead of me getting around to integrating them in
the git tree (I've been swamped with another project lately...).

I'm regularly poking at the git tree on a Fedora 13 system myself.

--
Jarod Wilson
ja...@wilsonet.com

valpa

unread,
Aug 2, 2010, 8:46:19 PM8/2/10
to crystalhd-development
Thanks for information.

I think I'm using the lasted one, is it right?

Running DIL (3.5.0) Version

How can I check it?




On Jul 29, 2:32 pm, Jarod Wilson <jarodwil...@gmail.com> wrote:
> On Wed, Jul 28, 2010 at 7:54 PM, valpa <valpass...@gmail.com> wrote:
> > I found there are four places to download the driver and user space
> > library
> >  - broadcom website
>
> This is a recent snapshot from the git tree, but there's been a fair
> amount of changes since it was created.
>
> >  - linux kernel
>
> This is a really old cut from the git tree now. The git tree needs
> significant coding style cleanup work done before it can get sent
> along to the kernel again.
>
> >  -http://git.wilsonet.com/crystalhd.git/
>
> The most up-to-date at the moment, and technically, the canonical
> "upstream", for Linux.
>
> >  -http://code.google.com/p/crystalhd-for-osx/

Scott D. Davilla

unread,
Aug 3, 2010, 1:10:18 AM8/3/10
to crystalhd-development
>I think I'm using the lasted one, is it right?

http://code.google.com/p/crystalhd-for-osx/ ?

>Running DIL (3.5.0) Version

As of r144, the svn tree is in sync with the git tree.

>How can I check it?

???, check what ?

valpa

unread,
Aug 3, 2010, 2:14:17 AM8/3/10
to crystalhd-development
How to check if I'm using the latest one?

Scott D. Davilla

unread,
Aug 3, 2010, 10:58:23 AM8/3/10
to crystalhd-development
>How to check if I'm using the latest one?

eh? svn co and diff against what you have, svn info. Since I'm not
beside you, I can't tell what you are doing nor what you have done.

>On Aug 3, 3:10 pm, "Scott D. Davilla" <sdavi...@gmail.com> wrote:
>> >I think I'm using the lasted one, is it right?
>>
>> http://code.google.com/p/crystalhd-for-osx/?
>>
>> >Running DIL (3.5.0) Version
>>
>> As of r144, the svn tree is in sync with the git tree.
>>
>> >How can I check it?
>>
>> ???, check what ?
>

valpa

unread,
Aug 3, 2010, 7:08:39 PM8/3/10
to crystalhd-development
Thanks,

Currently I can use gstreamer to play a demo H.264 1080p video. It
does not use the vaapi.

If I play a 720p video, it seems choppy. The 720p video plays smoothly
within the same machine without using CrystalHD.
Reply all
Reply to author
Forward
0 new messages