OSDN Git Service

android-x86/hardware-intel-intel-driver.git
8 years agoVP9 HWDec:change the name vp8_xxx to vpx_xxx and share it with VP9
Pengfei Qu [Thu, 22 Oct 2015 08:55:04 +0000 (04:55 -0400)]
VP9 HWDec:change the name vp8_xxx to vpx_xxx and share it with VP9

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoVP9 HWDec: add VP9 HW decoding pipeline
Pengfei Qu [Thu, 22 Oct 2015 08:51:38 +0000 (04:51 -0400)]
VP9 HWDec: add VP9 HW decoding pipeline

v2: fix sengment feature in inter frame

v3: update the prob buffer logic

v4: fix intra-only feature issue

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoVP9 HWDec:add vp9 parameter check function before decoding
Pengfei Qu [Thu, 22 Oct 2015 08:40:51 +0000 (04:40 -0400)]
VP9 HWDec:add vp9 parameter check function before decoding

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoVP9 HWDec:add vp9 surface structure and related parameter
Pengfei Qu [Thu, 22 Oct 2015 08:39:07 +0000 (04:39 -0400)]
VP9 HWDec:add vp9 surface structure and related parameter

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoVP9 HWDEC:add vp9 table file
Sirisha Muppavarapu [Thu, 22 Oct 2015 08:31:40 +0000 (04:31 -0400)]
VP9 HWDEC:add vp9 table file

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoVP9 HWDec: Added profile and entrypoint for VAProfileVP9Profile0 in the driver
Sirisha Muppavarapu [Thu, 28 May 2015 15:08:52 +0000 (08:08 -0700)]
VP9 HWDec: Added profile and entrypoint for VAProfileVP9Profile0 in the driver

v2: don't export VP9 decoding on BXT because VP9 decoding isn't enabled (Peng)

Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoAdd support for P010 in vaPutSurface() in a X window system
Xiang, Haihao [Tue, 7 Jul 2015 08:32:14 +0000 (16:32 +0800)]
Add support for P010 in vaPutSurface() in a X window system

Currently it converts P010 to RGBA32 because the drawable to vaPutSurface() is RGBA color

v2: P010 has interleaved UV planar (Peng)

v3: change commit log

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
8 years agosupport HEVC 10bits decoding
Peng Chen [Mon, 15 Jun 2015 14:28:22 +0000 (22:28 +0800)]
support HEVC 10bits decoding

v2: code cleanup

v3: store shift in an int to make it more readable (Emil)

Signed-off-by: Peng Chen <peng.c.chen@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoInitial support for Broxton in the intel-driver
Sirisha Muppavarapu [Thu, 29 Jan 2015 14:41:04 +0000 (06:41 -0800)]
Initial support for Broxton in the intel-driver

Added PCIIDs, Device info and the relevant code.

Signed-off-by: Sirisha Muppavarapu <sirisha.muppavarapu@intel.com>
[Peng: disable MPEG-2 encoding on BXT]
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoFix for ring hung issue in SNB platform.
Lim Siew Hoon [Wed, 18 Nov 2015 08:56:22 +0000 (16:56 +0800)]
Fix for ring hung issue in SNB platform.

This issue is trigger by the fixed from
commit id: 7deaf55d3f927e32e0b2280601dae106c7b9e3d8
use to fix segmentation fault issue by checking dst_object->bo
is NULL and VA_STATUS_ERROR_UNIMPLEMENTED in i965_proc_picture_fast
function will causing GPU hung in ring.

By disable the PPGTT, no more GPU hang issue.

If return VA_STATUS_ERROR_INVALID_SURFACE for checking only
dst_obj->bo is NULL, it is working fine without purposely to
disable PPGTT.

End up decided to use VA_STATUS_ERROR_INVALID_SURFACE instead
VA_STATUS_ERROR_UNIMPLEMENTED for dst_obj->bo checking in
i965_proc_picture_fast.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Kelley, Sean V" <sean.v.kelley@intel.com>
8 years agoHEVC ENC:add CBR feature.
Pengfei Qu [Mon, 9 Nov 2015 04:04:27 +0000 (12:04 +0800)]
HEVC ENC:add CBR feature.

Signed-off-by: Pengfei Qu <pengfei.qu@intel.com>
[Haihao: Fix build warning]
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoUpdate README
Xiang, Haihao [Mon, 2 Nov 2015 01:52:58 +0000 (09:52 +0800)]
Update README

It adds platform definitions and the supported codecs, fixes the required
libva version.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoFix correct coordinate dst_rect->x with 4 alignment
Lim Siew Hoon [Mon, 16 Nov 2015 06:16:35 +0000 (14:16 +0800)]
Fix correct coordinate dst_rect->x with 4 alignment

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoFix the segmentation fault causing by NULL buffer object
Lim Siew Hoon [Fri, 13 Nov 2015 13:05:33 +0000 (21:05 +0800)]
Fix the segmentation fault causing by NULL buffer object

Add if checking for dst_obj_surface->bo is NULL in
i965_proc_picture_fast function.

https://bugs.freedesktop.org/show_bug.cgi?id=92811

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoshaders: vpp: gen8/9: use yuv to rgb matrix to compute rgb values
Lionel Landwerlin [Tue, 3 Nov 2015 14:50:21 +0000 (14:50 +0000)]
shaders: vpp: gen8/9: use yuv to rgb matrix to compute rgb values

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agoshaders: vpp: gen7: use yuv to rgb matrix to compute rgb values
Lionel Landwerlin [Thu, 22 Oct 2015 15:27:15 +0000 (16:27 +0100)]
shaders: vpp: gen7: use yuv to rgb matrix to compute rgb values

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agovpp: gen8/9: send yuv to rgb coefs
Lionel Landwerlin [Tue, 3 Nov 2015 15:05:26 +0000 (15:05 +0000)]
vpp: gen8/9: send yuv to rgb coefs

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agovpp: gen7: send yuv to rgb coefs
Lionel Landwerlin [Thu, 22 Oct 2015 15:13:36 +0000 (16:13 +0100)]
vpp: gen7: send yuv to rgb coefs

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agovpp: gen7/8/9: add yuv to rgb conversion matrix to registers send to EUs
Lionel Landwerlin [Tue, 3 Nov 2015 15:10:08 +0000 (15:10 +0000)]
vpp: gen7/8/9: add yuv to rgb conversion matrix to registers send to EUs

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agorender: extract out yuv->rgb coefs
Lionel Landwerlin [Thu, 22 Oct 2015 14:50:49 +0000 (15:50 +0100)]
render: extract out yuv->rgb coefs

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
8 years agovaDeriveImage: properly set VAImage format
Julien Isorce [Tue, 13 Oct 2015 08:10:46 +0000 (09:10 +0100)]
vaDeriveImage: properly set VAImage format

This is required to allow gstvaapipostproc
outputing RGBx va surfaces.

https://bugs.freedesktop.org/show_bug.cgi?id=92088

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
8 years agoFix YUY2/UYVY info
Xiang, Haihao [Tue, 13 Oct 2015 05:45:39 +0000 (13:45 +0800)]
Fix YUY2/UYVY info

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agovpp/gen9: Use 48 bit address relocation for STATE_BASE_ADDRESS
Sreerenj Balachandran [Mon, 12 Oct 2015 08:38:00 +0000 (11:38 +0300)]
vpp/gen9: Use 48 bit address relocation for STATE_BASE_ADDRESS

Use 48 bit address relocation for Surface state address, Dynamic state address
and Instruction base address.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agovpp/gen8: Use 48 bit address relocation for STATE_BASE_ADDRESS
Sreerenj Balachandran [Mon, 12 Oct 2015 08:37:59 +0000 (11:37 +0300)]
vpp/gen8: Use 48 bit address relocation for STATE_BASE_ADDRESS

Use 48 bit address relocation for Surface state address, Dynamic state address
and Instruction base address.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agointel_batchbuffer: Add utility fuction for supporting 48-bit address relocations...
Sreerenj Balachandran [Mon, 12 Oct 2015 08:37:58 +0000 (11:37 +0300)]
intel_batchbuffer: Add utility fuction for supporting 48-bit address relocations in Gen8+

There are Gen8+ instruction which requires 48bit address relocation
(eg: Surface State Address in STATE_BASE_ADDRESS instruction). Add the batchbuffer
utility funcation for the relocation based on Mesa's batch buffer implementation.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agovpp/gen9: Fix the incorrect loading of kernel module.
Sreerenj Balachandran [Mon, 12 Oct 2015 08:37:57 +0000 (11:37 +0300)]
vpp/gen9: Fix the incorrect loading of kernel module.

The correct i965_kernel interace index for pp_pl3_load_save_pl3_gen9 is PP_PL3_LOAD_SAVE_PL3.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
8 years agovpp/gen8: Fix the incorrect loading of kernel module.
Sreerenj Balachandran [Mon, 12 Oct 2015 08:37:56 +0000 (11:37 +0300)]
vpp/gen8: Fix the incorrect loading of kernel module.

The correct i965 kernel interface index for pp_pl3_load_save_pl3_gen8 is PP_PL3_LOAD_SAVE_PL3.

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
8 years agoAvoid NULL ptr deref in i965_decoder_wrapper_picture()
Lim Siew Hoon [Wed, 30 Sep 2015 11:07:13 +0000 (19:07 +0800)]
Avoid NULL ptr deref in i965_decoder_wrapper_picture()

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoAVS: avs has more phases for sharp filter on SKL
Xiang, Haihao [Mon, 28 Sep 2015 08:45:38 +0000 (16:45 +0800)]
AVS: avs has more phases for sharp filter on SKL

It fixes the broken VA_FILTER_SCALING_HQ on SKL

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
8 years agoFIX: Follow user's setting on filter flag
Qu,Pengfei [Tue, 29 Sep 2015 03:29:30 +0000 (11:29 +0800)]
FIX: Follow user's setting on filter flag

Signed-off-by: Qu,Pengfei <Pengfei.Qu@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoUse the right function to release allocated resources
Xiang, Haihao [Fri, 25 Sep 2015 01:06:19 +0000 (09:06 +0800)]
Use the right function to release allocated resources

Otherwise it might result in memory leak

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Liu, YangbinX <yangbinx.liu@intel.com>
8 years agoEncode: Update all used flag register channels in VME shader on GEN8+
Xiang, Haihao [Wed, 23 Sep 2015 05:40:41 +0000 (13:40 +0800)]
Encode: Update all used flag register channels in VME shader on GEN8+

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
8 years agoMake sure the pointer is valid before dereferencing it
Xiang, Haihao [Mon, 21 Sep 2015 00:54:11 +0000 (08:54 +0800)]
Make sure the pointer is valid before dereferencing it

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
8 years agoUpdate the NEWS
Xiang, Haihao [Fri, 18 Sep 2015 04:12:03 +0000 (12:12 +0800)]
Update the NEWS

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoSilence compiler warning
Xiang, Haihao [Tue, 8 Sep 2015 01:18:14 +0000 (09:18 +0800)]
Silence compiler warning

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoCheck pointer returned from calloc()
Xiang, Haihao [Mon, 7 Sep 2015 07:21:49 +0000 (15:21 +0800)]
Check pointer returned from calloc()

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoCheck pointer against NULL first before dereferencing it
Xiang, Haihao [Mon, 7 Sep 2015 01:29:38 +0000 (09:29 +0800)]
Check pointer against NULL first before dereferencing it

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
8 years agoi965: Remove duplicate check on platform in hybrid codec proxy
Sean V Kelley [Fri, 11 Sep 2015 01:21:22 +0000 (18:21 -0700)]
i965: Remove duplicate check on platform in hybrid codec proxy

Check is made in hybrid driver for respectve platforms.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years ago1.6.2.pre1 for development
Xiang, Haihao [Thu, 10 Sep 2015 02:57:32 +0000 (10:57 +0800)]
1.6.2.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoMerge branch 'v1.6-branch' into fdo--master
Xiang, Haihao [Thu, 10 Sep 2015 02:56:28 +0000 (10:56 +0800)]
Merge branch 'v1.6-branch' into fdo--master

Conflicts:
configure.ac

8 years agolibva-intel-driver 1.6.1
Xiang, Haihao [Wed, 9 Sep 2015 08:51:36 +0000 (16:51 +0800)]
libva-intel-driver 1.6.1

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoFix if issue of SLICE_TYPE_I statement in vme_pipeline_programing
Lim Siew Hoon [Wed, 9 Sep 2015 02:10:58 +0000 (10:10 +0800)]
Fix if issue of SLICE_TYPE_I statement in vme_pipeline_programing

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
8 years agoReplace --enable-wrapper with --enable-hybrid-codec
Xiang, Haihao [Wed, 9 Sep 2015 04:19:21 +0000 (12:19 +0800)]
Replace --enable-wrapper with --enable-hybrid-codec

hybrid-codec is more meaningful.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 2d42512bd6b7382c5effe21a5f9999742d98db88)

8 years agoReplace --enable-wrapper with --enable-hybrid-codec
Xiang, Haihao [Wed, 9 Sep 2015 04:19:21 +0000 (12:19 +0800)]
Replace --enable-wrapper with --enable-hybrid-codec

hybrid-codec is more meaningful.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agoUpdate NEWS
Xiang, Haihao [Sun, 6 Sep 2015 07:49:46 +0000 (15:49 +0800)]
Update NEWS

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoRemove file access check in loading wrapper
Sameer Kibey [Sun, 6 Sep 2015 01:39:16 +0000 (09:39 +0800)]
Remove file access check in loading wrapper

Remove the check for file access in the wrapper.
Otherwise this call will fail on Chrome OS with sandboxing
enabled.

Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit b63c28904e2568c0c50b5047b5a90d32d02b9fca)

8 years agoExport the profile/entrypoints for the wrapped backend drivers
Zhao Yakui [Sun, 6 Sep 2015 01:39:15 +0000 (09:39 +0800)]
Export the profile/entrypoints for the wrapped backend drivers

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit ad7b5a0233d8ead9a2ca141f3fa75f4bda1045c1)

8 years agoCall the wrapped backend driver for the given decoding
Zhao Yakui [Sun, 6 Sep 2015 01:39:14 +0000 (09:39 +0800)]
Call the wrapped backend driver for the given decoding

The wrapped vaBeginPicture/vaRenderPicture/vaEndPicture are called.
Currently the wrapper is for the VP9 decoding.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 12a09a2efe213af350f29f342da6842d66dab63e)

8 years agoAdd the support of wrapper the VA Buffer to the backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:13 +0000 (09:39 +0800)]
Add the support of wrapper the VA Buffer to the backend driver

The obj_context is passed when calling vaCreateBuffer, which can be
used to check whether it belongs to the wrapped context. If one VA buffer
belongs to wrapped buffer, the callback function of backend driver will
be called for the corresponding VA buffer.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit f75ddc58b16cb93e85e737792c431415288cafb1)

8 years agoAdd one function to wrapper VA surface into backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:12 +0000 (09:39 +0800)]
Add one function to wrapper VA surface into backend driver

Currently only NV12 surface is supported as the decoding uses the NV12 format.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 44e3ec2a98e99ccd839bd05cba45f0b8c9afe437)

8 years agoCall the wrapped function to free wrapped surface/buffer
Zhao Yakui [Sun, 6 Sep 2015 01:39:11 +0000 (09:39 +0800)]
Call the wrapped function to free wrapped surface/buffer

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 464ebff117df40b04c4f8da560c311e470d5a112)

8 years agoCall wrapped driver to handle config/context related with VP9 decoding
Zhao Yakui [Sun, 6 Sep 2015 01:39:10 +0000 (09:39 +0800)]
Call wrapped driver to handle config/context related with VP9 decoding

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 815d17f944b13ebc1eca62572dbec0c49ea01999)

8 years agoWrapper the DriverContextP of backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:09 +0000 (09:39 +0800)]
Wrapper the DriverContextP of backend driver

The default directory of backend driver is used.(LIBVA_DRIVERS_PATH).
Only when the backend driver exists, the wrapper is initialized and added.
Otherwise it won't be initialized.

And the option of "enable-wrapper" is added, which is used to determine whether
the wrapper of backend driver is supported.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 3bbaff8b4180d2510c8c77d9e4d19bf84853f31a)

8 years agoAdd one field for Config/Context/Surface/Buffer to store the wrapper content
Zhao Yakui [Sun, 6 Sep 2015 01:39:08 +0000 (09:39 +0800)]
Add one field for Config/Context/Surface/Buffer to store the wrapper content

This is to do the preparation that the libva-intel-driver can be the user of
other backend driver.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 2f254ecd154d59553a1e3949f66161bade6ca2b7)

8 years agoClean up unused local variable 'i965'
Lim Siew Hoon [Wed, 26 Aug 2015 11:43:34 +0000 (19:43 +0800)]
Clean up unused local variable 'i965'

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 020b341cf959c7ae10a233972fcbe29c47d86e68)

8 years agoClean up the duplicate extra two line of code
Lim Siew Hoon [Wed, 26 Aug 2015 09:20:34 +0000 (17:20 +0800)]
Clean up the duplicate extra two line of code

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit cec8f05596a4bf11070fffeec1b4c7e5b7d44323)

8 years agoFix if statement checking sampling factor for YUV422V_4Y
Lim Siew Hoon [Wed, 26 Aug 2015 08:27:59 +0000 (16:27 +0800)]
Fix if statement checking sampling factor for YUV422V_4Y

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit d7c2ba36a1bce5d4bd2e40fd161eae160946bd76)

8 years agoFix suspiciously placed semicolon at if statement.
Lim Siew Hoon [Wed, 26 Aug 2015 04:31:21 +0000 (12:31 +0800)]
Fix suspiciously placed semicolon at if statement.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit eb06298ecadf53a752abbb99208a37bda3e90c30)

8 years agoFix memset initialize for huff_co_table and huff_si_table array
Lim Siew Hoon [Wed, 26 Aug 2015 03:13:44 +0000 (11:13 +0800)]
Fix memset initialize for huff_co_table and huff_si_table array

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit e12ddd354454a6491b24be202f0f56d401ab0a1b)

8 years agoFix memset initialize value for huff_size_table and huff_code_table
Lim Siew Hoon [Wed, 26 Aug 2015 02:55:18 +0000 (10:55 +0800)]
Fix memset initialize value for huff_size_table and huff_code_table

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit d69346b33e31efac0e7338bc24718eef76f329da)

8 years agoFix klockwork critical message hit on calloc function usage
Lim Siew Hoon [Thu, 20 Aug 2015 10:29:09 +0000 (18:29 +0800)]
Fix klockwork critical message hit on calloc function usage

The calloc function maybe return NULL, it will causing
memory access violation if continue using NULL C structure.
Add assert function to do checking on its.

bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=91699

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit d117b9d30a00c811eb7e636c772979de846d30c8)

8 years agoencode/hevc: Check slice type first in case user passes wrong parameters to driver
Xiang, Haihao [Mon, 3 Aug 2015 06:32:48 +0000 (14:32 +0800)]
encode/hevc: Check slice type first in case user passes wrong parameters to driver

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 9170fed321780f394e8eae4a789c31120c4e957c)

8 years agoencode/hevc: Check the correct BO before unreferencing it
Xiang, Haihao [Mon, 3 Aug 2015 06:32:34 +0000 (14:32 +0800)]
encode/hevc: Check the correct BO before unreferencing it

v2: Change the log message per Emil's suggestion

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 1c5a8431e581eb26240c765d28f89e06138ca879)

8 years agoAdded LIBVA_DRIVERS_PATH configure argument
Joel Holdsworth [Wed, 26 Aug 2015 23:21:12 +0000 (00:21 +0100)]
Added LIBVA_DRIVERS_PATH configure argument
(cherry picked from commit c1f6411d3e0337226e157a51f8aab6a9c4e8b434)

8 years agoDecoding: Export the attribute of slice mode for decoding
Zhao Yakui [Tue, 25 Aug 2015 05:35:21 +0000 (13:35 +0800)]
Decoding: Export the attribute of slice mode for decoding

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
(cherry picked from commit 29f4234504fd99299997a3fc2f01393fb77030b7)

8 years agoRemove the redundant check in vaBeginPicture call
Zhao Yakui [Tue, 25 Aug 2015 05:35:16 +0000 (13:35 +0800)]
Remove the redundant check in vaBeginPicture call

The corresponding check is already executed when calling vaCreateConfig.
So the redundant check is removed.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
(cherry picked from commit e751897e64d1d37d6c592b71a8cc7ea8bc8a0b7f)

8 years agoAdd one field to store the expected VA_RT_FORMAT for surface
Zhao Yakui [Tue, 25 Aug 2015 05:35:08 +0000 (13:35 +0800)]
Add one field to store the expected VA_RT_FORMAT for surface

The VA_RT_FORMAT_XXX is also used to derive the corresponding layout of
VA SURFACE.For example: VA_RT_FORMAT_YUV420/422, RGB32 and so on.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
(cherry picked from commit 02a2d4cb26e9a651b33a6e35c665b287155bbb83)

8 years agoVPP: Initialize the uninitialed surface to avoid NULL GPU buffer
Zhao Yakui [Fri, 14 Aug 2015 04:13:13 +0000 (12:13 +0800)]
VPP: Initialize the uninitialed surface to avoid NULL GPU buffer

Sometimes the surface allocation is deferred. In such case it should be
checked correctly before it is using. Otherwise the corresponding
GPU buffer is NULL.
This is to fix the regression issue reported by XBMC.

Tested-by: Zaverel <zaverel@free.fr>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 7c47a8f74878904e0d2fbb5da966552f783d74ab)

8 years agoVPP: Flush batch buffer to assure that previous GPU operation is submitted
Zhao Yakui [Fri, 14 Aug 2015 04:13:08 +0000 (12:13 +0800)]
VPP: Flush batch buffer to assure that previous GPU operation is submitted

Tested-by: Zaverel <zaverel@free.fr>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 67e122a4b100365d5d8bb6377c73e39f6c44abf9)

8 years agoencode/hevc: fix HEVC encode on SKL GT3
Xiang, Haihao [Thu, 23 Jul 2015 02:05:37 +0000 (10:05 +0800)]
encode/hevc: fix HEVC encode on SKL GT3

GT3 has 2 BSD rings, but HEVC commands can be only dispatched to BSD ring 0.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 611d8ea9d75dc026c203e3ebe53b434769d4587c)

8 years agoVPP: Combine the CSC/Scaling together to optimize the performance
Zhao Yakui [Wed, 15 Jul 2015 21:16:41 +0000 (17:16 -0400)]
VPP: Combine the CSC/Scaling together to optimize the performance

Currently it is divided into two steps when the video format is invovled.
In such case it is not efficient.

V1->V2: Follow Haihao's comment to call back the missing operation of
handle background color

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 4bda4667fd635df5bd27ce01353a3b6d6bf85508)

8 years agoCreateSurfaces2: forward function return to caller
Xu Guangxin [Wed, 1 Jul 2015 01:49:11 +0000 (09:49 +0800)]
CreateSurfaces2: forward function return to caller

we did not check following function's return:
i965_surface_native_memory
i965_suface_external_memory
i965_check_alloc_surface_bo
It will be in trouble if underlay buffer allocation is failed.
(cherry picked from commit 12b3d9ef379e6159e30c2aafc040f1137cd4141a)

8 years ago1.6.1.pre1 for development
Xiang, Haihao [Wed, 8 Jul 2015 01:33:22 +0000 (09:33 +0800)]
1.6.1.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit d06c17e9c0d4a11a3efaead7da63765148bf938e)

8 years agovpp/avs: fix license terms (MIT).
Gwenole Beauchesne [Tue, 7 Jul 2015 08:04:37 +0000 (10:04 +0200)]
vpp/avs: fix license terms (MIT).

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit fb5e1cd86047e2683f169cd52cc27861447321cf)

8 years agoH264: Use macroblock pair to calculate H264 decoding parameter under MBAFF flag
Zhao Yakui [Mon, 6 Jul 2015 17:45:47 +0000 (01:45 +0800)]
H264: Use macroblock pair to calculate H264 decoding parameter under MBAFF flag

Based on the H264 spec the macroblock pair should be used to calculate
the corresponding parameters under MBAFF.(mb-adaptive frame-field).
Otherwise the wrong parameter is sent to GPU HW.

Fix the GPU hang issue in https://bugs.freedesktop.org/show_bug.cgi?id=91207

Tested-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 7bb3658212f49a6f8d3d61b0b5d161aca73c2a11)

8 years agodec/hevc: Use a different equation for metadata tile column buffer on BSW
Xiang, Haihao [Mon, 29 Jun 2015 05:05:51 +0000 (13:05 +0800)]
dec/hevc: Use a different equation for metadata tile column buffer on BSW

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 8d11fd7dd7952551b2d57f900ce1f408a35616a1)

8 years agodec/hevc: Use the same equation for each metadata buffer no matter slice type
Xiang, Haihao [Mon, 29 Jun 2015 05:00:57 +0000 (13:00 +0800)]
dec/hevc: Use the same equation for each metadata buffer no matter slice type

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 6ff572fb94fce0b941d56eb7c0f45d82c1672ea3)

8 years agoGen75_vpp: Don't assert on BGRA input and output
fritsch [Wed, 24 Jun 2015 08:18:11 +0000 (10:18 +0200)]
Gen75_vpp: Don't assert on BGRA input and output
(cherry picked from commit e49960198a4c53ad96e36e0952db514764af06f6)

8 years agoRemove file access check in loading wrapper
Sameer Kibey [Sun, 6 Sep 2015 01:39:16 +0000 (09:39 +0800)]
Remove file access check in loading wrapper

Remove the check for file access in the wrapper.
Otherwise this call will fail on Chrome OS with sandboxing
enabled.

Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoExport the profile/entrypoints for the wrapped backend drivers
Zhao Yakui [Sun, 6 Sep 2015 01:39:15 +0000 (09:39 +0800)]
Export the profile/entrypoints for the wrapped backend drivers

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoCall the wrapped backend driver for the given decoding
Zhao Yakui [Sun, 6 Sep 2015 01:39:14 +0000 (09:39 +0800)]
Call the wrapped backend driver for the given decoding

The wrapped vaBeginPicture/vaRenderPicture/vaEndPicture are called.
Currently the wrapper is for the VP9 decoding.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoAdd the support of wrapper the VA Buffer to the backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:13 +0000 (09:39 +0800)]
Add the support of wrapper the VA Buffer to the backend driver

The obj_context is passed when calling vaCreateBuffer, which can be
used to check whether it belongs to the wrapped context. If one VA buffer
belongs to wrapped buffer, the callback function of backend driver will
be called for the corresponding VA buffer.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoAdd one function to wrapper VA surface into backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:12 +0000 (09:39 +0800)]
Add one function to wrapper VA surface into backend driver

Currently only NV12 surface is supported as the decoding uses the NV12 format.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoCall the wrapped function to free wrapped surface/buffer
Zhao Yakui [Sun, 6 Sep 2015 01:39:11 +0000 (09:39 +0800)]
Call the wrapped function to free wrapped surface/buffer

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoCall wrapped driver to handle config/context related with VP9 decoding
Zhao Yakui [Sun, 6 Sep 2015 01:39:10 +0000 (09:39 +0800)]
Call wrapped driver to handle config/context related with VP9 decoding

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoWrapper the DriverContextP of backend driver
Zhao Yakui [Sun, 6 Sep 2015 01:39:09 +0000 (09:39 +0800)]
Wrapper the DriverContextP of backend driver

The default directory of backend driver is used.(LIBVA_DRIVERS_PATH).
Only when the backend driver exists, the wrapper is initialized and added.
Otherwise it won't be initialized.

And the option of "enable-wrapper" is added, which is used to determine whether
the wrapper of backend driver is supported.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoAdd one field for Config/Context/Surface/Buffer to store the wrapper content
Zhao Yakui [Sun, 6 Sep 2015 01:39:08 +0000 (09:39 +0800)]
Add one field for Config/Context/Surface/Buffer to store the wrapper content

This is to do the preparation that the libva-intel-driver can be the user of
other backend driver.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
8 years agoClean up unused local variable 'i965'
Lim Siew Hoon [Wed, 26 Aug 2015 11:43:34 +0000 (19:43 +0800)]
Clean up unused local variable 'i965'

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoClean up the duplicate extra two line of code
Lim Siew Hoon [Wed, 26 Aug 2015 09:20:34 +0000 (17:20 +0800)]
Clean up the duplicate extra two line of code

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoFix if statement checking sampling factor for YUV422V_4Y
Lim Siew Hoon [Wed, 26 Aug 2015 08:27:59 +0000 (16:27 +0800)]
Fix if statement checking sampling factor for YUV422V_4Y

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoFix suspiciously placed semicolon at if statement.
Lim Siew Hoon [Wed, 26 Aug 2015 04:31:21 +0000 (12:31 +0800)]
Fix suspiciously placed semicolon at if statement.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoFix memset initialize for huff_co_table and huff_si_table array
Lim Siew Hoon [Wed, 26 Aug 2015 03:13:44 +0000 (11:13 +0800)]
Fix memset initialize for huff_co_table and huff_si_table array

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoFix memset initialize value for huff_size_table and huff_code_table
Lim Siew Hoon [Wed, 26 Aug 2015 02:55:18 +0000 (10:55 +0800)]
Fix memset initialize value for huff_size_table and huff_code_table

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoFix klockwork critical message hit on calloc function usage
Lim Siew Hoon [Thu, 20 Aug 2015 10:29:09 +0000 (18:29 +0800)]
Fix klockwork critical message hit on calloc function usage

The calloc function maybe return NULL, it will causing
memory access violation if continue using NULL C structure.
Add assert function to do checking on its.

bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=91699

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8 years agoencode/hevc: Check slice type first in case user passes wrong parameters to driver
Xiang, Haihao [Mon, 3 Aug 2015 06:32:48 +0000 (14:32 +0800)]
encode/hevc: Check slice type first in case user passes wrong parameters to driver

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoencode/hevc: Check the correct BO before unreferencing it
Xiang, Haihao [Mon, 3 Aug 2015 06:32:34 +0000 (14:32 +0800)]
encode/hevc: Check the correct BO before unreferencing it

v2: Change the log message per Emil's suggestion

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoAdded LIBVA_DRIVERS_PATH configure argument
Joel Holdsworth [Wed, 26 Aug 2015 23:21:12 +0000 (00:21 +0100)]
Added LIBVA_DRIVERS_PATH configure argument

8 years agoDecoding: Export the attribute of slice mode for decoding
Zhao Yakui [Tue, 25 Aug 2015 05:35:21 +0000 (13:35 +0800)]
Decoding: Export the attribute of slice mode for decoding

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
8 years agoRemove the redundant check in vaBeginPicture call
Zhao Yakui [Tue, 25 Aug 2015 05:35:16 +0000 (13:35 +0800)]
Remove the redundant check in vaBeginPicture call

The corresponding check is already executed when calling vaCreateConfig.
So the redundant check is removed.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
8 years agoAdd one field to store the expected VA_RT_FORMAT for surface
Zhao Yakui [Tue, 25 Aug 2015 05:35:08 +0000 (13:35 +0800)]
Add one field to store the expected VA_RT_FORMAT for surface

The VA_RT_FORMAT_XXX is also used to derive the corresponding layout of
VA SURFACE.For example: VA_RT_FORMAT_YUV420/422, RGB32 and so on.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>