Skip to contentSkip to conversation

meta-intel: refactor VAAPI_IMPL

PATCH New [email protected] 1 participant 3 messages Aug 30, 2012

lore
Share & tools
lore
#0 lore raw

cover meta-intel: refactor VAAPI_IMPL

From: Tom Zanussi <[email protected]>

The current code assumes intel va as the default fallthrough, which it shouldn't be - the current shortcoming came up when adding pvr va for cedatrail.

This patchset fixes things up to make it more extensible, and usable by cedartrail.

The following changes since commit 1ef6cd26cabe46d9ceaa0d257bf7d690a0592e7c:

meta-emenlow: unset preferred providers for virtual/libgles[12] (2012-08-30 09:48:18 -0500)

are available in the git repository at:
git://git.yoctoproject.org/meta-intel.git tzanussi/va-impl-changes
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/log/?h=tzanussi/va-impl-changes

Tom Zanussi (2):
meta-intel: add va-impl-intel MACHINE_FEATURE
meta-intel: use va-impl-intel MACHINE_FEATURE

 .../recipes-multimedia/gstreamer/gst-va-intel.bb   |   16 +++++++++++++---
 common/recipes-multimedia/libva/va-intel.bb        |   16 ++++++++++++----
 meta-chiefriver/conf/machine/chiefriver.conf       |    1 +
 meta-crownbay/conf/machine/crownbay.conf           |    2 +-
 meta-fri2/conf/machine/fri2.conf                   |    2 +-
 meta-sugarbay/conf/machine/sugarbay.conf           |    2 ++
 6 files changed, 30 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/2 meta-intel: add va-impl-intel MACHINE_FEATURE

From: Tom Zanussi <[email protected]>

Add a new va-impl-intel MACHINE_FEATURE to explicitly choose intel video acceleration, rather than have it as the fallthrough default, so that anything that wants to specify something different locally doesn't get unwanted components.

Also rename the gst-va-mixvideo feature to va-impl-mixvideo match and since it isn't only concerned with gst.

---
 .../recipes-multimedia/gstreamer/gst-va-intel.bb   |   16 +++++++++++++---
 common/recipes-multimedia/libva/va-intel.bb        |   16 ++++++++++++----
 2 files changed, 25 insertions(+), 7 deletions(-)
common/recipes-multimedia/gstreamer/gst-va-intel.bb +13 -3
index 17cb7c8..516e5f1 100644
@@ -4,10 +4,16 @@ DEPENDS = "gst-meta-base"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PR = "r0"
+PR = "r1"
 
-VAAPI_IMPL = "${@base_contains('MACHINE_FEATURES', 'gst-va-mixvideo', 'gst-va-mixvideo-vaapi', \
-             'gst-va-intel-vaapi', d)}"
+def map_gst_vaapi(d):
+    if base_contains('MACHINE_FEATURES', 'va-impl-mixvideo', "1", "0", d) == "1":
+       return "gst-va-mixvideo-vaapi"
+    if base_contains('MACHINE_FEATURES', 'va-impl-intel', "1", "0", d) == "1":
+       return "gst-va-intel-vaapi"
+    return ""
+
+VAAPI_IMPL = "${@map_gst_vaapi(d)}"
 
 PACKAGES = "\
     gst-va-intel \
@@ -32,10 +38,14 @@ RDEPENDS_gst-va-intel-video = "\
     gst-plugins-good-isomp4 \
     "
 
+# The gstreamer-vaapi package contains the vaapi implementation
+#
 RDEPENDS_gst-va-intel-vaapi = "\
     gstreamer-vaapi \
     "
 
+# The emgd driver contains the vaapi implementation
+#
 RDEPENDS_gst-va-mixvideo-vaapi = "\
     emgd-driver-bin \
     "
common/recipes-multimedia/libva/va-intel.bb +12 -4
index fc4a28e..ce642fe 100644
@@ -3,11 +3,19 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PR = "r0"
+PR = "r1"
 
-VA_IMPL = "${@base_contains('MACHINE_FEATURES', 'gst-va-mixvideo', \
-          'libva libva-x11 libva-tpi libva-glx libva-egl', \
-          'libva libva-intel-driver', d)}"
+def map_valibs(d):
+    # The emgd mixvideo implementation requires libva-x11/tpi/glx/egl
+    if base_contains('MACHINE_FEATURES', 'va-impl-mixvideo', "1", "0", d) == "1":
+       return "libva libva-x11 libva-tpi libva-glx libva-egl"
+    # The intel implementation requires the libva-intel-driver package
+    if base_contains('MACHINE_FEATURES', 'va-impl-intel', "1", "0", d) == "1":
+       return "libva libva-intel-driver"
+    # All meta-intel video acceleration requires libva
+    return "libva"
+
+VA_IMPL = "${@map_valibs(d)}"
 
 PACKAGES = "\
     va-intel \
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/2 meta-intel: use va-impl-intel MACHINE_FEATURE

From: Tom Zanussi <[email protected]>

Explicitly specify the va-impl-intel MACHINE_FEATURE, and update the mixvideo uses with the feature rename.

---
 meta-chiefriver/conf/machine/chiefriver.conf |    1 +
 meta-crownbay/conf/machine/crownbay.conf     |    2 +-
 meta-fri2/conf/machine/fri2.conf             |    2 +-
 meta-sugarbay/conf/machine/sugarbay.conf     |    2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)
meta-chiefriver/conf/machine/chiefriver.conf +1 -0
index b644119..6d8d3a5 100644
@@ -5,6 +5,7 @@
 # i.e. Ivy Bridge + Panther Point
 
 PREFERRED_VERSION_linux-yocto ?= "3.4%"
+MACHINE_FEATURES += "va-impl-intel"
 
 require conf/machine/include/tune-x86_64.inc
 require conf/machine/include/ia32-base.inc
meta-crownbay/conf/machine/crownbay.conf +1 -1
index dba735a..c4b7682 100644
@@ -10,7 +10,7 @@ require conf/machine/include/tune-atom.inc
 require conf/machine/include/ia32-base.inc
 require conf/machine/include/meta-intel.inc
 
-MACHINE_FEATURES += "gst-va-mixvideo"
+MACHINE_FEATURES += "va-impl-mixvideo"
 
 XSERVER ?= "${XSERVER_IA32_BASE} \
            ${XSERVER_IA32_EXT} \
meta-fri2/conf/machine/fri2.conf +1 -1
index a928f0f..56408f7 100644
@@ -10,7 +10,7 @@ require conf/machine/include/meta-intel.inc
 
 VA_FEATURES ?= "gst-va-intel va-intel"
 
-MACHINE_FEATURES += "wifi 3g pcbios efi gst-va-mixvideo"
+MACHINE_FEATURES += "wifi 3g pcbios efi va-impl-mixvideo"
 MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-iwlwifi-6000g2a-5 ${VA_FEATURES}"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
meta-sugarbay/conf/machine/sugarbay.conf +2 -0
index a80c938..616c2c5 100644
@@ -4,6 +4,8 @@
 #@DESCRIPTION: Machine configuration for Sugar Bay systems
 # i.e. Sandy Bridge + Cougar Point
 
+MACHINE_FEATURES += "va-impl-intel"
+
 PREFERRED_VERSION_linux-yocto ?= "3.4%"
 
 require conf/machine/include/tune-x86_64.inc
Signature · 1 line
1.7.4.1