* [ptxdist] [RFC 2/2] mesalib: enable VA support
2022-02-23 13:53 [ptxdist] [RFC 1/2] libva-headers: new package Philipp Zabel
@ 2022-02-23 13:53 ` Philipp Zabel
2022-02-24 16:02 ` [ptxdist] [RFC 1/2] libva-headers: new package Roland Hieber
2022-02-25 8:23 ` Michael Olbrich
2 siblings, 0 replies; 4+ messages in thread
From: Philipp Zabel @ 2022-02-23 13:53 UTC (permalink / raw)
To: ptxdist
Enable VA support for radeonsi, r600, and nouveau.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
rules/mesalib.in | 6 ++++++
rules/mesalib.make | 17 ++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/rules/mesalib.in b/rules/mesalib.in
index 6737828c72eb..d2e349b8c4d3 100644
--- a/rules/mesalib.in
+++ b/rules/mesalib.in
@@ -12,6 +12,7 @@ menuconfig MESALIB
select GCCLIBS
select GCCLIBS_CXX
select LIBDRM
+ select LIBVA_HEADERS if MESALIB_VA
select LIBDRM_INTEL if MESALIB_DRI_I915 || MESALIB_DRI_I965
select WAYLAND if MESALIB_EGL_WAYLAND
select WAYLAND_PROTOCOLS if MESALIB_EGL_WAYLAND
@@ -172,6 +173,11 @@ config MESALIB_GBM
bool
prompt "GBM"
+config MESALIB_VA
+ bool
+ depends on MESALIB_DRI_RADEONSI || MESALIB_DRI_R600 || MESALIB_DIR_NOUVEAU
+ prompt "VA"
+
comment "Platforms"
config MESALIB_EGL_X11
diff --git a/rules/mesalib.make b/rules/mesalib.make
index ba87e3819c2b..d333583ba7ab 100644
--- a/rules/mesalib.make
+++ b/rules/mesalib.make
@@ -127,6 +127,12 @@ MESALIB_LIBS-$(PTXCONF_MESALIB_GBM) += libgbm
MESALIBS_EGL_PLATFORMS-$(PTXCONF_MESALIB_EGL_WAYLAND) += wayland
MESALIBS_EGL_PLATFORMS-$(PTXCONF_MESALIB_EGL_X11) += x11
+ifdef PTXCONF_MESALIB_VA
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_R600) += r600
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_RADEONSI) += radeonsi
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_NOUVEAU) += nouveau
+endif
+
MESALIB_CONF_TOOL := meson
MESALIB_CONF_OPT := \
$(CROSS_MESON_USR) \
@@ -152,7 +158,7 @@ MESALIB_CONF_OPT := \
-Dgallium-nine=false \
-Dgallium-omx=disabled \
-Dgallium-opencl=disabled \
- -Dgallium-va=disabled \
+ -Dgallium-va=$(call ptx/endis, PTXCONF_MESALIB_VA)d \
-Dgallium-vdpau=disabled \
-Dgallium-xa=disabled \
-Dgallium-xvmc=disabled \
@@ -253,6 +259,15 @@ ifneq ($(strip $(MESALIB_DRI_GALLIUM_LIBS-y)),)
$(call install_link, mesalib, gallium_dri.so, \
/usr/lib/dri/$(lib)_dri.so)$(ptx/nl))
endif
+ifneq ($(strip $(MESALIB_DRI_VA_LIBS-y)),)
+ @$(call install_copy, mesalib, 0, 0, 0644, \
+ $(MESALIB_PKGDIR)/usr/lib/dri/$(firstword $(MESALIB_DRI_VA_LIBS-y))_drv_video.so, \
+ /usr/lib/dri/va_dri.so)
+
+ @$(foreach lib, $(MESALIB_DRI_VA_LIBS-y), \
+ $(call install_link, mesalib, va_dri.so, \
+ /usr/lib/dri/$(lib)_drv_video.so)$(ptx/nl))
+endif
ifneq ($(strip $(MESALIB_VULKAN_LIBS-y)),)
@$(foreach lib, $(MESALIB_VULKAN_LIBS-y), \
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [RFC 1/2] libva-headers: new package
2022-02-23 13:53 [ptxdist] [RFC 1/2] libva-headers: new package Philipp Zabel
2022-02-23 13:53 ` [ptxdist] [RFC 2/2] mesalib: enable VA support Philipp Zabel
@ 2022-02-24 16:02 ` Roland Hieber
2022-02-25 8:23 ` Michael Olbrich
2 siblings, 0 replies; 4+ messages in thread
From: Roland Hieber @ 2022-02-24 16:02 UTC (permalink / raw)
To: Philipp Zabel; +Cc: ptxdist
On Wed, Feb 23, 2022 at 02:53:51PM +0100, Philipp Zabel wrote:
> Add a stripped down version of the libva package that installs only the
> headers and pkgconfig file required by Mesa.
> This avoids a circular dependency between Mesa, which requries libva
> headers, and libva, which may require Mesa to build GLX support.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> rules/libva-headers.in | 9 +++++++
> rules/libva-headers.make | 53 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 62 insertions(+)
> create mode 100644 rules/libva-headers.in
> create mode 100644 rules/libva-headers.make
>
> diff --git a/rules/libva-headers.in b/rules/libva-headers.in
> new file mode 100644
> index 000000000000..a611b483fdb4
> --- /dev/null
> +++ b/rules/libva-headers.in
> @@ -0,0 +1,9 @@
> +## SECTION=multimedia_vaapi
> +
> +config LIBVA_HEADERS
> + tristate
> + select HOST_MESON
> + select LIBDRM
> + prompt "libva-headers"
> + help
> + VA-API header files for mesalib
> diff --git a/rules/libva-headers.make b/rules/libva-headers.make
> new file mode 100644
> index 000000000000..5f80eead4c79
> --- /dev/null
> +++ b/rules/libva-headers.make
> @@ -0,0 +1,53 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBVA_HEADERS) += libva-headers
> +
> +#
> +# Paths and names
> +#
> +LIBVA_HEADERS_VERSION = $(LIBVA_VERSION)
> +LIBVA_HEADERS_MD5 = $(LIBVA_MD5)
> +LIBVA_HEADERS = libva-headers-$(LIBVA_VERSION)
> +LIBVA_HEADERS_SUFFIX = tar.bz2
> +LIBVA_HEADERS_URL = $(LIBVA_URL)
> +LIBVA_HEADERS_SOURCE = $(LIBVA_SOURCE)
> +LIBVA_HEADERS_DIR = $(BUILDDIR)/$(LIBVA_HEADERS)
> +LIBVA_HEADERS_LICENSE = $(LIBVA_LICENSE)
LIBVA_HEADERS_LICENSE_FILES shuold also be the same as
$(LIBVA_LICENSE_FILES), no?
- Roland
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LIBVA_HEADERS_CONF_TOOL := meson
> +LIBVA_HEADERS_CONF_OPT := \
> + $(CROSS_MESON_USR) \
> + -Ddisable_drm=false \
> + -Ddriverdir='' \
> + -Denable_docs=false \
> + -Denable_va_messaging=true \
> + -Dwith_glx=no \
> + -Dwith_wayland=no \
> + -Dwith_x11=no \
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libva-headers.install.post:
> + @$(call targetinfo)
> + # only install headers and libva.pc
> + @rm -f $(LIBVA_HEADERS_PKGDIR)/usr/lib/libva*
> + @rm -f $(LIBVA_HEADERS_PKGDIR)/usr/lib/pkgconfig/libva-drm.pc
> + @$(call world/install.post, LIBVA_HEADERS)
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 2.30.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [RFC 1/2] libva-headers: new package
2022-02-23 13:53 [ptxdist] [RFC 1/2] libva-headers: new package Philipp Zabel
2022-02-23 13:53 ` [ptxdist] [RFC 2/2] mesalib: enable VA support Philipp Zabel
2022-02-24 16:02 ` [ptxdist] [RFC 1/2] libva-headers: new package Roland Hieber
@ 2022-02-25 8:23 ` Michael Olbrich
2 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2022-02-25 8:23 UTC (permalink / raw)
To: Philipp Zabel; +Cc: ptxdist
On Wed, Feb 23, 2022 at 02:53:51PM +0100, Philipp Zabel wrote:
> Add a stripped down version of the libva package that installs only the
> headers and pkgconfig file required by Mesa.
> This avoids a circular dependency between Mesa, which requries libva
> headers, and libva, which may require Mesa to build GLX support.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> rules/libva-headers.in | 9 +++++++
> rules/libva-headers.make | 53 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 62 insertions(+)
> create mode 100644 rules/libva-headers.in
> create mode 100644 rules/libva-headers.make
>
> diff --git a/rules/libva-headers.in b/rules/libva-headers.in
> new file mode 100644
> index 000000000000..a611b483fdb4
> --- /dev/null
> +++ b/rules/libva-headers.in
> @@ -0,0 +1,9 @@
> +## SECTION=multimedia_vaapi
> +
> +config LIBVA_HEADERS
> + tristate
> + select HOST_MESON
> + select LIBDRM
> + prompt "libva-headers"
> + help
> + VA-API header files for mesalib
> diff --git a/rules/libva-headers.make b/rules/libva-headers.make
> new file mode 100644
> index 000000000000..5f80eead4c79
> --- /dev/null
> +++ b/rules/libva-headers.make
> @@ -0,0 +1,53 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2020 by Philipp Zabel <p.zabel@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBVA_HEADERS) += libva-headers
> +
> +#
> +# Paths and names
> +#
> +LIBVA_HEADERS_VERSION = $(LIBVA_VERSION)
> +LIBVA_HEADERS_MD5 = $(LIBVA_MD5)
> +LIBVA_HEADERS = libva-headers-$(LIBVA_VERSION)
> +LIBVA_HEADERS_SUFFIX = tar.bz2
> +LIBVA_HEADERS_URL = $(LIBVA_URL)
> +LIBVA_HEADERS_SOURCE = $(LIBVA_SOURCE)
> +LIBVA_HEADERS_DIR = $(BUILDDIR)/$(LIBVA_HEADERS)
> +LIBVA_HEADERS_LICENSE = $(LIBVA_LICENSE)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +LIBVA_HEADERS_CONF_TOOL := meson
> +LIBVA_HEADERS_CONF_OPT := \
> + $(CROSS_MESON_USR) \
> + -Ddisable_drm=false \
> + -Ddriverdir='' \
> + -Denable_docs=false \
> + -Denable_va_messaging=true \
> + -Dwith_glx=no \
> + -Dwith_wayland=no \
> + -Dwith_x11=no \
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libva-headers.install.post:
> + @$(call targetinfo)
> + # only install headers and libva.pc
> + @rm -f $(LIBVA_HEADERS_PKGDIR)/usr/lib/libva*
> + @rm -f $(LIBVA_HEADERS_PKGDIR)/usr/lib/pkgconfig/libva-drm.pc
I think this should be done at the end of 'install' instead.
And you need to do the reverse in libva and add a dependency there.
Otherwise a 'ptxdist clean libva' will delete the header files and if mesa
is rebuilt then that will fail.
Michael
> + @$(call world/install.post, LIBVA_HEADERS)
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 2.30.2
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread