All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa
@ 2020-02-27  5:24 Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 1/4] libva: Factor out base parts into an include file Böszörményi Zoltán
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Böszörményi Zoltán @ 2020-02-27  5:24 UTC (permalink / raw)
  To: openembedded-core

Mesa needs libva to enable VAAPI state tracker and drivers.
libva needs Mesa to enable its GLX part.

This is a circular dependency that can be solved by introducing
a new libva recipe variant that doesn't enable GLX.

Actually, the presence of Mesa/OpenGL headers is autodetected
in libva so it's enough to leave out Mesa from DEPENDS in the
new libva recipe variant.

With magic already existing in sstate.bbclass and staging.bbclass,
naming the new libva recipe variant "libva-initial" avoids an
error for every other recipe that pulls in libva as dependency,
including libva-utils and intel-vaapi-driver.

The error (if not naming the recipe as "*-initial") is that
the prepare-sysroot phase of a package would pull in the files 
rom both libva build variants that would obviously install identical
files.

Enabling the VDPAU state tracker and libraries is trivial,
it was just missing from the recipe.

[PATCH v2 1/4] libva: Factor out base parts into an include file
[PATCH v2 2/4] libva-initial: New bootstrap recipe
[PATCH v2 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI
[PATCH v2 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/4] libva: Factor out base parts into an include file
  2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
@ 2020-02-27  5:24 ` Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 2/4] libva-initial: New bootstrap recipe Böszörményi Zoltán
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Böszörményi Zoltán @ 2020-02-27  5:24 UTC (permalink / raw)
  To: openembedded-core

To enable the VAAPI state tracker and drivers in mesa, it needs
libva.pc and the libva headers. At the recipe level, this would
create a circular dependency between libva and mesa.

This is a preparation step before introducing a new libva recipe
variant to break the circular dependency.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: The include file is not versioned, verbose commit message

 meta/recipes-graphics/libva/libva.inc      | 27 ++++++++++++++++++++++
 meta/recipes-graphics/libva/libva_2.6.1.bb | 27 ++--------------------
 2 files changed, 29 insertions(+), 25 deletions(-)
 create mode 100644 meta/recipes-graphics/libva/libva.inc

diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc
new file mode 100644
index 0000000000..058581f7d1
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva.inc
@@ -0,0 +1,27 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
+
+DEPENDS = "libdrm"
+
+inherit meson pkgconfig features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
diff --git a/meta/recipes-graphics/libva/libva_2.6.1.bb b/meta/recipes-graphics/libva/libva_2.6.1.bb
index 92cea83bc1..b68fb27136 100644
--- a/meta/recipes-graphics/libva/libva_2.6.1.bb
+++ b/meta/recipes-graphics/libva/libva_2.6.1.bb
@@ -1,33 +1,10 @@
-SUMMARY = "Video Acceleration (VA) API for Linux"
-DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
-and API specification which enables and provides access to graphics \
-hardware (GPU) acceleration for video processing on Linux and UNIX \
-based operating systems. Accelerated processing includes video \
-decoding, video encoding, subpicture blending and rendering. The \
-specification was originally designed by Intel for its GMA (Graphics \
-Media Accelerator) series of GPU hardware, the API is however not \
-limited to GPUs or Intel specific hardware, as other hardware and \
-manufacturers can also freely use this API for hardware accelerated \
-video decoding."
+require libva.inc
 
-HOMEPAGE = "https://01.org/linuxmedia/vaapi"
-BUGTRACKER = "https://github.com/intel/libva/issues"
-
-SECTION = "x11"
-LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
-
-SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
 SRC_URI[md5sum] = "aef13eb48e01a47d1416d97462a22a11"
 SRC_URI[sha256sum] = "6c57eb642d828af2411aa38f55dc10111e8c98976dbab8fd62e48629401eaea5"
 
-UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
-
-DEPENDS = "libdrm virtual/mesa"
-
-inherit meson pkgconfig features_check
-
-REQUIRED_DISTRO_FEATURES = "opengl"
+DEPENDS += "virtual/mesa"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
 PACKAGECONFIG[x11] = "-Dwith_x11=yes, -Dwith_x11=no,virtual/libx11 libxext libxfixes"
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/4] libva-initial: New bootstrap recipe
  2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 1/4] libva: Factor out base parts into an include file Böszörményi Zoltán
@ 2020-02-27  5:24 ` Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Böszörményi Zoltán
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Böszörményi Zoltán @ 2020-02-27  5:24 UTC (permalink / raw)
  To: openembedded-core

Mesa needs libva.pc and libva headers to enable the VAAPI
state tracker and drivers.

This recipe is a variant of the full libva package build as in:
* it only depends on libdrm to build so it doesn't introduce
  the circular dependency between mesa and libva, and
* it doesn't include the libraries in the final package.

However, there is another issue with build dependency handling
in Yocto. libva depends on mesa and mesa depends on this package.
Any package that depends on libva therefore would pull in libva
and this package resulting in an error in the prepare-sysroot
phase because they would install identical files into the
per-recipe sysroot.

Using the package name "*-initial" avoids this because of the
interaction between sstate.bbclass and staging.bbclass: any
package with the pattern "*-initial" in the name is excluded
from the dependency list unless explicitly added to DEPENDS.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: The include file is not versioned, more verbose commit message

 meta/recipes-graphics/libva/libva-initial_2.6.1.bb | 9 +++++++++
 meta/recipes-graphics/libva/libva.inc              | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/libva/libva-initial_2.6.1.bb

diff --git a/meta/recipes-graphics/libva/libva-initial_2.6.1.bb b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
new file mode 100644
index 0000000000..a3b04eb02a
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
@@ -0,0 +1,9 @@
+require libva.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+SRC_URI[md5sum] = "aef13eb48e01a47d1416d97462a22a11"
+SRC_URI[sha256sum] = "6c57eb642d828af2411aa38f55dc10111e8c98976dbab8fd62e48629401eaea5"
+
+do_install_append () {
+	rm -f ${D}${libdir}/*.so*
+}
diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc
index 058581f7d1..6a3427b5b1 100644
--- a/meta/recipes-graphics/libva/libva.inc
+++ b/meta/recipes-graphics/libva/libva.inc
@@ -16,7 +16,9 @@ BUGTRACKER = "https://github.com/intel/libva/issues"
 SECTION = "x11"
 LICENSE = "MIT"
 
-SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2"
+
+S = "${WORKDIR}/libva-${PV}"
 
 UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
 
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI
  2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 1/4] libva: Factor out base parts into an include file Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 2/4] libva-initial: New bootstrap recipe Böszörményi Zoltán
@ 2020-02-27  5:24 ` Böszörményi Zoltán
  2020-02-27  5:24 ` [PATCH v2 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Böszörményi Zoltán
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
  4 siblings, 0 replies; 11+ messages in thread
From: Böszörményi Zoltán @ 2020-02-27  5:24 UTC (permalink / raw)
  To: openembedded-core

The previously added libva-initial recipe makes it possible and
trivial.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Small explanation in the commit message

 meta/recipes-graphics/mesa/mesa.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 87f167c507..479d3223fa 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -142,6 +142,7 @@ PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers
 PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
+PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial"
 
 PACKAGECONFIG[lima] = ""
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers
  2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
                   ` (2 preceding siblings ...)
  2020-02-27  5:24 ` [PATCH v2 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Böszörményi Zoltán
@ 2020-02-27  5:24 ` Böszörményi Zoltán
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
  4 siblings, 0 replies; 11+ messages in thread
From: Böszörményi Zoltán @ 2020-02-27  5:24 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Replaced FILES_${PN}-vdpau-drivers with FILES_mesa-vdpau-drivers
    to match the name in PACKAGES.

 meta/recipes-graphics/mesa/mesa.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 479d3223fa..800e8813c7 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -144,6 +144,8 @@ PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llv
 PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
 PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial"
 
+PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=true,-Dgallium-vdpau=false,libvdpau"
+
 PACKAGECONFIG[lima] = ""
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
 
@@ -179,6 +181,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libgles3-mesa libgles3-mesa-dev \
              libxatracker libxatracker-dev \
              mesa-megadriver mesa-vulkan-drivers \
+             mesa-vdpau-drivers \
             "
 
 do_install_append () {
@@ -256,6 +259,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*"
 
 FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf"
 FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
+FILES_mesa-vdpau-drivers = "${libdir}/vdpau/*.so.*"
 FILES_libegl-mesa = "${libdir}/libEGL.so.*"
 FILES_libgbm = "${libdir}/libgbm.so.*"
 FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
@@ -265,7 +269,7 @@ FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
 FILES_libxatracker = "${libdir}/libxatracker.so.*"
 
-FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
+FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
 FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
 FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
 FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
-- 
2.24.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa
  2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
                   ` (3 preceding siblings ...)
  2020-02-27  5:24 ` [PATCH v2 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Böszörményi Zoltán
@ 2020-05-07 13:32 ` Zoltan Boszormenyi
  2020-05-07 13:32   ` [PATCH v3 1/4] libva: Factor out base parts into an include file Zoltan Boszormenyi
                     ` (3 more replies)
  4 siblings, 4 replies; 11+ messages in thread
From: Zoltan Boszormenyi @ 2020-05-07 13:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Böszörményi Zoltán

Mesa needs libva to enable VAAPI state tracker and drivers.
libva needs Mesa to enable its GLX part.

This is a circular dependency that can be solved by introducing
a new libva recipe variant that doesn't enable GLX.

Actually, the presence of Mesa/OpenGL headers is autodetected
in libva so it's enough to leave out Mesa from DEPENDS in the
new libva recipe variant.

With magic already existing in sstate.bbclass and staging.bbclass,
naming the new libva recipe variant "libva-initial" avoids an
error for every other recipe that pulls in libva as dependency,
including libva-utils and intel-vaapi-driver.

The error (if not naming the recipe as "*-initial") is that
the prepare-sysroot phase of a package would pull in the files 
rom both libva build variants that would obviously install identical
files.

Enabling the VDPAU state tracker and libraries is trivial,
it was just missing from the recipe.

[PATCH v3 1/4] libva: Factor out base parts into an include file
[PATCH v3 2/4] libva-initial: New bootstrap recipe
[PATCH v3 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI
[PATCH v3 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3 1/4] libva: Factor out base parts into an include file
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
@ 2020-05-07 13:32   ` Zoltan Boszormenyi
  2020-05-07 13:32   ` [PATCH v3 2/4] libva-initial: New bootstrap recipe Zoltan Boszormenyi
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Zoltan Boszormenyi @ 2020-05-07 13:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Böszörményi Zoltán

To enable the VAAPI state tracker and drivers in mesa, it needs
libva.pc and the libva headers. To enable GLX support in libva,
it needs mesa to be compiled first. At the recipe level, this
would create a circular dependency between libva and mesa.

This is a preparation step before introducing a new libva recipe
variant to break the circular dependency.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: The include file is not versioned, verbose commit message
v3: Rebased to current master

 meta/recipes-graphics/libva/libva.inc      | 25 ++++++++++++++++++++++
 meta/recipes-graphics/libva/libva_2.6.1.bb | 25 +---------------------
 2 files changed, 26 insertions(+), 24 deletions(-)
 create mode 100644 meta/recipes-graphics/libva/libva.inc

diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc
new file mode 100644
index 0000000000..e03451240c
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva.inc
@@ -0,0 +1,25 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/intel/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
+
+DEPENDS = "libdrm"
+
+inherit meson pkgconfig features_check
diff --git a/meta/recipes-graphics/libva/libva_2.6.1.bb b/meta/recipes-graphics/libva/libva_2.6.1.bb
index 071be345d2..e8cb8678bc 100644
--- a/meta/recipes-graphics/libva/libva_2.6.1.bb
+++ b/meta/recipes-graphics/libva/libva_2.6.1.bb
@@ -1,32 +1,9 @@
-SUMMARY = "Video Acceleration (VA) API for Linux"
-DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
-and API specification which enables and provides access to graphics \
-hardware (GPU) acceleration for video processing on Linux and UNIX \
-based operating systems. Accelerated processing includes video \
-decoding, video encoding, subpicture blending and rendering. The \
-specification was originally designed by Intel for its GMA (Graphics \
-Media Accelerator) series of GPU hardware, the API is however not \
-limited to GPUs or Intel specific hardware, as other hardware and \
-manufacturers can also freely use this API for hardware accelerated \
-video decoding."
+require libva.inc
 
-HOMEPAGE = "https://01.org/linuxmedia/vaapi"
-BUGTRACKER = "https://github.com/intel/libva/issues"
-
-SECTION = "x11"
-LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
-
-SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
 SRC_URI[md5sum] = "aef13eb48e01a47d1416d97462a22a11"
 SRC_URI[sha256sum] = "6c57eb642d828af2411aa38f55dc10111e8c98976dbab8fd62e48629401eaea5"
 
-UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
-
-DEPENDS = "libdrm"
-
-inherit meson pkgconfig features_check
-
 PACKAGECONFIG ??= " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', '', d)} \
     ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)} \
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 2/4] libva-initial: New bootstrap recipe
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
  2020-05-07 13:32   ` [PATCH v3 1/4] libva: Factor out base parts into an include file Zoltan Boszormenyi
@ 2020-05-07 13:32   ` Zoltan Boszormenyi
  2020-05-07 19:02     ` [OE-core] " Khem Raj
  2020-05-07 13:33   ` [PATCH v3 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Zoltan Boszormenyi
  2020-05-07 13:33   ` [PATCH v3 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Zoltan Boszormenyi
  3 siblings, 1 reply; 11+ messages in thread
From: Zoltan Boszormenyi @ 2020-05-07 13:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Böszörményi Zoltán

Mesa needs libva.pc and libva headers to enable the VAAPI
state tracker and drivers.

This recipe is a variant of the full libva package build as in:
* it only depends on libdrm to build so it doesn't introduce
  the circular dependency between mesa and libva, and
* it doesn't include the libraries in the final package.

However, there is another issue with build dependency handling
in Yocto. libva depends on mesa and mesa depends on this package.
Any package that depends on libva therefore would pull in libva
and this package resulting in an error in the prepare-sysroot
phase because they would install identical files into the
per-recipe sysroot.

Using the package name "*-initial" avoids this because of the
interaction between sstate.bbclass and staging.bbclass: any
package with the pattern "*-initial" in the name is excluded
from the dependency list unless explicitly added to DEPENDS.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: The include file is not versioned, more verbose commit message
v3: Rebased to current master

 meta/recipes-graphics/libva/libva-initial_2.6.1.bb | 9 +++++++++
 meta/recipes-graphics/libva/libva.inc              | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/libva/libva-initial_2.6.1.bb

diff --git a/meta/recipes-graphics/libva/libva-initial_2.6.1.bb b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
new file mode 100644
index 0000000000..a3b04eb02a
--- /dev/null
+++ b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
@@ -0,0 +1,9 @@
+require libva-${PV}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+SRC_URI[md5sum] = "aef13eb48e01a47d1416d97462a22a11"
+SRC_URI[sha256sum] = "6c57eb642d828af2411aa38f55dc10111e8c98976dbab8fd62e48629401eaea5"
+
+do_install_append () {
+	rm -f ${D}${libdir}/*.so*
+}
diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc
index e03451240c..ac39e92de7 100644
--- a/meta/recipes-graphics/libva/libva.inc
+++ b/meta/recipes-graphics/libva/libva.inc
@@ -16,7 +16,9 @@ BUGTRACKER = "https://github.com/intel/libva/issues"
 SECTION = "x11"
 LICENSE = "MIT"
 
-SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
+SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2"
+
+S = "${WORKDIR}/libva-${PV}"
 
 UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
  2020-05-07 13:32   ` [PATCH v3 1/4] libva: Factor out base parts into an include file Zoltan Boszormenyi
  2020-05-07 13:32   ` [PATCH v3 2/4] libva-initial: New bootstrap recipe Zoltan Boszormenyi
@ 2020-05-07 13:33   ` Zoltan Boszormenyi
  2020-05-07 13:33   ` [PATCH v3 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Zoltan Boszormenyi
  3 siblings, 0 replies; 11+ messages in thread
From: Zoltan Boszormenyi @ 2020-05-07 13:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: Böszörményi Zoltán

The previously added libva-initial recipe makes it possible and
trivial.

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Small explanation in the commit message
v3: Rebased to current master

 meta/recipes-graphics/mesa/mesa.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index f59503bf14..7a889a5b11 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -142,6 +142,7 @@ PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers
 PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
+PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial"
 
 PACKAGECONFIG[lima] = ""
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers
  2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
                     ` (2 preceding siblings ...)
  2020-05-07 13:33   ` [PATCH v3 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Zoltan Boszormenyi
@ 2020-05-07 13:33   ` Zoltan Boszormenyi
  3 siblings, 0 replies; 11+ messages in thread
From: Zoltan Boszormenyi @ 2020-05-07 13:33 UTC (permalink / raw)
  To: openembedded-core; +Cc: Böszörményi Zoltán

Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
---
v2: Replaced FILES_${PN}-vdpau-drivers with FILES_mesa-vdpau-drivers
    to match the name in PACKAGES.
v3: Rebased to current master

 meta/recipes-graphics/mesa/mesa.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 7a889a5b11..fede691d6f 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -144,6 +144,8 @@ PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llv
 PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
 PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva-initial"
 
+PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=true,-Dgallium-vdpau=false,libvdpau"
+
 PACKAGECONFIG[lima] = ""
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
 
@@ -180,6 +182,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libgles3-mesa libgles3-mesa-dev \
              libxatracker libxatracker-dev \
              mesa-megadriver mesa-vulkan-drivers \
+             mesa-vdpau-drivers \
             "
 
 do_install_append () {
@@ -257,6 +260,7 @@ PACKAGES_DYNAMIC += "^mesa-driver-.*"
 
 FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf"
 FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
+FILES_${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
 FILES_libegl-mesa = "${libdir}/libEGL.so.*"
 FILES_libgbm = "${libdir}/libgbm.so.*"
 FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
@@ -266,7 +270,7 @@ FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
 FILES_libxatracker = "${libdir}/libxatracker.so.*"
 
-FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
+FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
 FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
 FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
 FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH v3 2/4] libva-initial: New bootstrap recipe
  2020-05-07 13:32   ` [PATCH v3 2/4] libva-initial: New bootstrap recipe Zoltan Boszormenyi
@ 2020-05-07 19:02     ` Khem Raj
  0 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2020-05-07 19:02 UTC (permalink / raw)
  To: zboszor, openembedded-core



On 5/7/20 6:32 AM, Zoltan Boszormenyi via lists.openembedded.org wrote:
> Mesa needs libva.pc and libva headers to enable the VAAPI
> state tracker and drivers.
> 
> This recipe is a variant of the full libva package build as in:
> * it only depends on libdrm to build so it doesn't introduce
>   the circular dependency between mesa and libva, and
> * it doesn't include the libraries in the final package.
> 
> However, there is another issue with build dependency handling
> in Yocto. libva depends on mesa and mesa depends on this package.
> Any package that depends on libva therefore would pull in libva
> and this package resulting in an error in the prepare-sysroot
> phase because they would install identical files into the
> per-recipe sysroot.
> 
> Using the package name "*-initial" avoids this because of the
> interaction between sstate.bbclass and staging.bbclass: any
> package with the pattern "*-initial" in the name is excluded
> from the dependency list unless explicitly added to DEPENDS.
> 
> Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
> ---
> v2: The include file is not versioned, more verbose commit message
> v3: Rebased to current master
> 
>  meta/recipes-graphics/libva/libva-initial_2.6.1.bb | 9 +++++++++
>  meta/recipes-graphics/libva/libva.inc              | 4 +++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-graphics/libva/libva-initial_2.6.1.bb
> 
> diff --git a/meta/recipes-graphics/libva/libva-initial_2.6.1.bb b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
> new file mode 100644
> index 0000000000..a3b04eb02a
> --- /dev/null
> +++ b/meta/recipes-graphics/libva/libva-initial_2.6.1.bb
> @@ -0,0 +1,9 @@
> +require libva-${PV}.inc

this require seems should be just libva.inc

> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
> +SRC_URI[md5sum] = "aef13eb48e01a47d1416d97462a22a11"
> +SRC_URI[sha256sum] = "6c57eb642d828af2411aa38f55dc10111e8c98976dbab8fd62e48629401eaea5"
> +
> +do_install_append () {
> +	rm -f ${D}${libdir}/*.so*
> +}
> diff --git a/meta/recipes-graphics/libva/libva.inc b/meta/recipes-graphics/libva/libva.inc
> index e03451240c..ac39e92de7 100644
> --- a/meta/recipes-graphics/libva/libva.inc
> +++ b/meta/recipes-graphics/libva/libva.inc
> @@ -16,7 +16,9 @@ BUGTRACKER = "https://github.com/intel/libva/issues"
>  SECTION = "x11"
>  LICENSE = "MIT"
>  
> -SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BP}.tar.bz2"
> +SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2"
> +
> +S = "${WORKDIR}/libva-${PV}"
>  
>  UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
>  
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-07 19:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27  5:24 [PATCH v2 0/4] Enable VAAPI and VDPAU video drivers in Mesa Böszörményi Zoltán
2020-02-27  5:24 ` [PATCH v2 1/4] libva: Factor out base parts into an include file Böszörményi Zoltán
2020-02-27  5:24 ` [PATCH v2 2/4] libva-initial: New bootstrap recipe Böszörményi Zoltán
2020-02-27  5:24 ` [PATCH v2 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Böszörményi Zoltán
2020-02-27  5:24 ` [PATCH v2 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Böszörményi Zoltán
2020-05-07 13:32 ` [PATCH v3 0/4] Enable VAAPI and VDPAU video drivers in Mesa Zoltan Boszormenyi
2020-05-07 13:32   ` [PATCH v3 1/4] libva: Factor out base parts into an include file Zoltan Boszormenyi
2020-05-07 13:32   ` [PATCH v3 2/4] libva-initial: New bootstrap recipe Zoltan Boszormenyi
2020-05-07 19:02     ` [OE-core] " Khem Raj
2020-05-07 13:33   ` [PATCH v3 3/4] mesa: Add PACKAGECONFIG knob to enable VAAPI Zoltan Boszormenyi
2020-05-07 13:33   ` [PATCH v3 4/4] mesa: Add PACKAGECONFIG knob to enable VDPAU state tracker and drivers Zoltan Boszormenyi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.