[meta-intel] [PATCH 3/3] libva-intel-driver: Upgrade to 1.6.0 (v2)

Lim Siew Hoon siew.hoon.lim at intel.com
Tue Aug 11 03:49:36 PDT 2015


For Gen9 platform support.
Tested with running some H264, H265, MPEG2, JPEG, VC1, VP8, MJPEG decode
in CHV and SKL platform.

Clean up:
Remove wayland-include.patch, code already exist in 1.6.0 version.

Add in patch:
Fix GPU hung issue patch causing by running H264 video clip with MBAFF.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim at intel.com>
---
 ...croblock-pair-to-calculate-H264-decoding-.patch | 141 +++++++++++++++++++++
 .../libva/libva-intel-driver/wayland-include.patch |  30 -----
 ...driver_1.5.0.bb => libva-intel-driver_1.6.0.bb} |   9 +-
 3 files changed, 146 insertions(+), 34 deletions(-)
 create mode 100644 common/recipes-multimedia/libva/libva-intel-driver/0001-H264-Use-macroblock-pair-to-calculate-H264-decoding-.patch
 delete mode 100644 common/recipes-multimedia/libva/libva-intel-driver/wayland-include.patch
 rename common/recipes-multimedia/libva/{libva-intel-driver_1.5.0.bb => libva-intel-driver_1.6.0.bb} (78%)
 mode change 100644 => 100755

diff --git a/common/recipes-multimedia/libva/libva-intel-driver/0001-H264-Use-macroblock-pair-to-calculate-H264-decoding-.patch b/common/recipes-multimedia/libva/libva-intel-driver/0001-H264-Use-macroblock-pair-to-calculate-H264-decoding-.patch
new file mode 100644
index 0000000..fd5da79
--- /dev/null
+++ b/common/recipes-multimedia/libva/libva-intel-driver/0001-H264-Use-macroblock-pair-to-calculate-H264-decoding-.patch
@@ -0,0 +1,141 @@
+From bdda6233e212e74f6d348b55906433126324130b Mon Sep 17 00:00:00 2001
+From: Zhao Yakui <yakui.zhao at intel.com>
+Date: Tue, 7 Jul 2015 01:45:47 +0800
+Subject: [PATCH] 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 at intel.com>
+Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
+
+Upstream-status: backport from upstream
+This patch was imported from the Intel VA Driver git server
+(git://anongit.freedesktop.org/vaapi/intel-driver) as of commit id
+7bb3658212f49a6f8d3d61b0b5d161aca73c2a11.
+
+This issue caught by running some H264 video under MBAFF flag, it happen in
+HSW, IVY, CHV, SKL platform as well.
+
+Signed-off-by: Lim, Siew Hoon <siew.hoon.lim at intel.com>
+---
+ src/gen6_mfd.c  | 10 ++++++++--
+ src/gen75_mfd.c | 10 ++++++++--
+ src/gen7_mfd.c  | 10 ++++++++--
+ src/gen8_mfd.c  |  9 +++++++--
+ 4 files changed, 31 insertions(+), 8 deletions(-)
+
+diff --git a/src/gen6_mfd.c b/src/gen6_mfd.c
+index 95a8e92..2dd05a1 100755
+--- a/src/gen6_mfd.c
++++ b/src/gen6_mfd.c
+@@ -551,14 +551,20 @@ gen6_mfd_avc_slice_state(VADriverContextP ctx,
+         }
+     }
+ 
+-    first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
++    first_mb_in_slice = slice_param->first_mb_in_slice;
+     slice_hor_pos = first_mb_in_slice % width_in_mbs; 
+     slice_ver_pos = first_mb_in_slice / width_in_mbs;
+ 
++    if (mbaff_picture)
++        slice_ver_pos = slice_ver_pos << 1;
++
+     if (next_slice_param) {
+-        first_mb_in_next_slice = next_slice_param->first_mb_in_slice << mbaff_picture;
++        first_mb_in_next_slice = next_slice_param->first_mb_in_slice;
+         next_slice_hor_pos = first_mb_in_next_slice % width_in_mbs; 
+         next_slice_ver_pos = first_mb_in_next_slice / width_in_mbs;
++
++        if (mbaff_picture)
++            next_slice_ver_pos = next_slice_ver_pos << 1;
+     } else {
+         next_slice_hor_pos = 0;
+         next_slice_ver_pos = height_in_mbs;
+diff --git a/src/gen75_mfd.c b/src/gen75_mfd.c
+index 5171bd9..11cde1f 100644
+--- a/src/gen75_mfd.c
++++ b/src/gen75_mfd.c
+@@ -862,14 +862,20 @@ gen75_mfd_avc_slice_state(VADriverContextP ctx,
+         num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1;
+     }
+ 
+-    first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
++    first_mb_in_slice = slice_param->first_mb_in_slice;
+     slice_hor_pos = first_mb_in_slice % width_in_mbs; 
+     slice_ver_pos = first_mb_in_slice / width_in_mbs;
+ 
++    if (mbaff_picture)
++        slice_ver_pos = slice_ver_pos << 1;
++
+     if (next_slice_param) {
+-        first_mb_in_next_slice = next_slice_param->first_mb_in_slice << mbaff_picture;
++        first_mb_in_next_slice = next_slice_param->first_mb_in_slice;
+         next_slice_hor_pos = first_mb_in_next_slice % width_in_mbs; 
+         next_slice_ver_pos = first_mb_in_next_slice / width_in_mbs;
++
++        if (mbaff_picture)
++            next_slice_ver_pos = next_slice_ver_pos << 1;
+     } else {
+         next_slice_hor_pos = 0;
+         next_slice_ver_pos = height_in_mbs / (1 + !!pic_param->pic_fields.bits.field_pic_flag);
+diff --git a/src/gen7_mfd.c b/src/gen7_mfd.c
+index 40a6db4..1d04ed4 100755
+--- a/src/gen7_mfd.c
++++ b/src/gen7_mfd.c
+@@ -556,14 +556,20 @@ gen7_mfd_avc_slice_state(VADriverContextP ctx,
+         num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1;
+     }
+ 
+-    first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
++    first_mb_in_slice = slice_param->first_mb_in_slice;
+     slice_hor_pos = first_mb_in_slice % width_in_mbs; 
+     slice_ver_pos = first_mb_in_slice / width_in_mbs;
+ 
++    if (mbaff_picture)
++        slice_ver_pos = slice_ver_pos << 1;
++
+     if (next_slice_param) {
+-        first_mb_in_next_slice = next_slice_param->first_mb_in_slice << mbaff_picture;
++        first_mb_in_next_slice = next_slice_param->first_mb_in_slice;
+         next_slice_hor_pos = first_mb_in_next_slice % width_in_mbs; 
+         next_slice_ver_pos = first_mb_in_next_slice / width_in_mbs;
++
++        if (mbaff_picture)
++            next_slice_ver_pos = next_slice_ver_pos << 1;
+     } else {
+         next_slice_hor_pos = 0;
+         next_slice_ver_pos = height_in_mbs / (1 + !!pic_param->pic_fields.bits.field_pic_flag);
+diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c
+index c15184d..c55cb4e 100644
+--- a/src/gen8_mfd.c
++++ b/src/gen8_mfd.c
+@@ -625,14 +625,19 @@ gen8_mfd_avc_slice_state(VADriverContextP ctx,
+         num_ref_idx_l1 = slice_param->num_ref_idx_l1_active_minus1 + 1;
+     }
+ 
+-    first_mb_in_slice = slice_param->first_mb_in_slice << mbaff_picture;
++    first_mb_in_slice = slice_param->first_mb_in_slice;
+     slice_hor_pos = first_mb_in_slice % width_in_mbs; 
+     slice_ver_pos = first_mb_in_slice / width_in_mbs;
+ 
++    if (mbaff_picture)
++        slice_ver_pos = slice_ver_pos << 1;
+     if (next_slice_param) {
+-        first_mb_in_next_slice = next_slice_param->first_mb_in_slice << mbaff_picture;
++        first_mb_in_next_slice = next_slice_param->first_mb_in_slice;
+         next_slice_hor_pos = first_mb_in_next_slice % width_in_mbs; 
+         next_slice_ver_pos = first_mb_in_next_slice / width_in_mbs;
++
++        if (mbaff_picture)
++            next_slice_ver_pos = next_slice_ver_pos << 1;
+     } else {
+         next_slice_hor_pos = 0;
+         next_slice_ver_pos = height_in_mbs / (1 + !!pic_param->pic_fields.bits.field_pic_flag);
+-- 
+2.1.0
+
diff --git a/common/recipes-multimedia/libva/libva-intel-driver/wayland-include.patch b/common/recipes-multimedia/libva/libva-intel-driver/wayland-include.patch
deleted file mode 100644
index 4a46773..0000000
--- a/common/recipes-multimedia/libva/libva-intel-driver/wayland-include.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix a compile error when building without X11.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton at intel.com>
-
-From a5c44e48dc73b2892f161bd21591c7ee0a3b7842 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton at intel.com>
-Date: Mon, 21 Oct 2013 16:25:18 +0100
-Subject: [PATCH] i965_output_wayland: add missing include
-
-Signed-off-by: Ross Burton <ross.burton at intel.com>
----
- src/i965_output_wayland.h |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/i965_output_wayland.h b/src/i965_output_wayland.h
-index 61ca39f..acea8d9 100644
---- a/src/i965_output_wayland.h
-+++ b/src/i965_output_wayland.h
-@@ -26,6 +26,7 @@
- #define I965_OUTPUT_WAYLAND_H
- 
- #include <stdbool.h>
-+#include <va/va_backend.h>
- 
- bool
- i965_output_wayland_init(VADriverContextP ctx);
--- 
-1.7.10.4
-
diff --git a/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb b/common/recipes-multimedia/libva/libva-intel-driver_1.6.0.bb
old mode 100644
new mode 100755
similarity index 78%
rename from common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb
rename to common/recipes-multimedia/libva/libva-intel-driver_1.6.0.bb
index ba09c2c..30032bb
--- a/common/recipes-multimedia/libva/libva-intel-driver_1.5.0.bb
+++ b/common/recipes-multimedia/libva/libva-intel-driver_1.6.0.bb
@@ -13,11 +13,12 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
 DEPENDS = "libva libdrm"
 
-SRC_URI = "http://www.freedesktop.org/software/vaapi/releases/${BPN}/${BPN}-${PV}.tar.bz2"
-SRC_URI += "file://wayland-include.patch"
+SRC_URI = "http://www.freedesktop.org/software/vaapi/releases/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://0001-H264-Use-macroblock-pair-to-calculate-H264-decoding-.patch \
+          "
 
-SRC_URI[md5sum] = "16752f1584398265072129553b7907ce"
-SRC_URI[sha256sum] = "d0b448193ab34b622cd14e4db8ca29991a4038b4eb459a8fbbcbd7db843da3dc"
+SRC_URI[md5sum] = "d7678f7c66cbb135cced82ee2af6d8e8"
+SRC_URI[sha256sum] = "9876afe4610c01a8ee5ba9348266515fce4dd031139d580ad97984d06afa08d4"
 
 inherit autotools pkgconfig
 
-- 
2.1.0



More information about the meta-intel mailing list