VAAPI and Intel Chipset

Benjamin Close Benjamin.Close at clearchain.com
Wed Feb 12 14:13:18 UTC 2014


Hi Folks,
     Just wondering what one needs to do to get VAAPI working with the 
intel chipset... or what I can do to debug this further.

I've recompiled meta, xorg, etc as per instructions to enable KMS, build 
libva and libva_intel_driver but still no luck.

I have the relevant drm2, i915kms drivers loaded (Xorg actually loaded 
them for me)
hw.dri.0.info.i915_gem_objects: 726 objects, 69472256 bytes
hw.dri.0.info.i915_gem_gtt:    0xfffff80017cb0400: p       128KiB 0001 
0001 0 0 uncached (gtt offset: 00000000, size: 00020000) (p mappable)
hw.dri.0.info.i915_gem_active: Active:
hw.dri.0.info.i915_gem_flushing: Flushing:
hw.dri.0.info.i915_gem_inactive: Inactive:
hw.dri.0.info.i915_gem_pinned: Pinned:
hw.dri.0.info.i915_gem_deferred_free: Deferred free:
hw.dri.0.info.i915_gem_pageflip: No flip due on pipe A (plane A)
hw.dri.0.info.i915_gem_request: No requests
hw.dri.0.info.i915_gem_seqno: Current sequence (render ring): 3446
hw.dri.0.info.i915_gem_fence_regs: Reserved fences = 0
hw.dri.0.info.i915_gem_interrupt: Interrupt enable:    00028c53
hw.dri.0.info.i915_gem_hws: 0x00000000: 0x00000000 0x00000000 0x00000000 
0x00000000
hw.dri.0.info.i915_gem_framebuffer: fbcon size: 1920 x 1080, depth 24, 
32 bpp, obj 0xfffff80017c97c00: p      8100KiB 0041 0000 0 0 uncached 
(gtt offset: 00040000, size: 007e9000) (p mappable)

vainfo gives:

libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/va/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva error: /usr/local/lib/va/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

Really would like hardware support for this in mythtv... and it seems so 
close!
Chip is:

vgapci1 at pci0:0:2:1:     class=0x038000 card=0x02091028 chip=0x2a038086 
rev=0x0c hdr=0x00
     vendor     = 'Intel Corporation'
     device     = 'Mobile GM965/GL960 Integrated Graphics Controller 
(secondary)'
     class      = display

And is supported by vaapi (confirmed via a ubuntu list which shows support).
truss of vainfo shows:

<snip>
libva info: Found init function __vaDriverInit_0_34
write(2,"libva info: Found init function "...,52) = 52 (0x34)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd820) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd820) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd820) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd820) = 0 (0x0)
open("/sys/devices/pci0000:00/0000:00:02.0/config",O_RDONLY,0666) ERR#2 
'No such file or directory'
ioctl(4,0x40106463 { IOR 0x64('d'), 99, 16 },0xffffd790) = 0 (0x0)
geteuid()                                        = 0 (0x0)
getuid()                                         = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd7a0) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) ERR#22 
'Invalid argument'
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) = 0 (0x0)
ioctl(4,0xc0106446 { IORW 0x64('d'), 70, 16 },0xffffd780) ERR#22 
'Invalid argument'
libva error: /usr/local/lib/va/i965_drv_video.so init failed
write(2,"libva error: /usr/local/lib/va/i"...,61) = 61 (0x3d)
libva info: va_openDriver() returns -1
write(2,"libva info: va_openDriver() retu"...,39) = 39 (0x27)
vaInitialize failed with error code -1 (unknown libva error),exit
write(2,"vaInitialize failed with error c"...,66) = 66 (0x42)

So ignoring what looks like a specific linux call opening /sys/devices/..
It looks like the ioctl is the cause for the failure.
Enabling debug with: sysctl hw.dri.debug=0xffffffff
I get:

Feb 13 00:15:43 taurus kernel: [drm:KMS:pid12823:i915_getparam] Unknown 
parameter 19
Feb 13 00:15:43 taurus kernel: [drm:pid12823:drm_ioctl] returning 22
Feb 13 00:15:43 taurus kernel: pid 12823, cmd 0xc0106446, nr 0x06/1, dev 
0xfffff800026dd500, auth 1, res 22
Feb 13 00:15:43 taurus kernel: [drm:pid12823:drm_ioctl] pid=12823, 
cmd=0xc0106446, nr=0x46, dev 0xfffff800026dd500, auth=1
Feb 13 00:15:43 taurus kernel: [drm:pid12823:drm_ioctl] pid=12823, 
cmd=0xc0106446, nr=0x46, dev 0xfffff800026dd500, auth=1
Feb 13 00:15:43 taurus kernel: [drm:KMS:pid12823:i915_getparam] Unknown 
parameter 22
Feb 13 00:15:43 taurus kernel: [drm:pid12823:drm_ioctl] returning 22

So it pretty much confirms the ioctl (in kernel?) is the problem.
Any advice?

This is under FreeBSD 10-STABLE

Cheers,
     Benjamin


More information about the freebsd-multimedia mailing list