mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2] mesalib: enable VA support
Date: Mon, 28 Feb 2022 14:42:03 +0100	[thread overview]
Message-ID: <20220228134203.1956719-1-p.zabel@pengutronix.de> (raw)

Enable VA support for radeonsi, r600, and nouveau.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
Changes since v1:
 - Fix typo: MESALIB_DIR_NOUVEAU -> MESALIB_DRI_NOUVEAU
 - Do not build r600 and radeonsi VA drivers on ARM,
   update bugzilla link to gitlab
 - Check for missing VA drivers in targetinstall
---
 rules/mesalib.in   |  6 ++++++
 rules/mesalib.make | 23 +++++++++++++++++++++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/rules/mesalib.in b/rules/mesalib.in
index 6737828c72eb..6b3410b40999 100644
--- a/rules/mesalib.in
+++ b/rules/mesalib.in
@@ -12,6 +12,7 @@ menuconfig MESALIB
 	select GCCLIBS
 	select GCCLIBS_CXX
 	select LIBDRM
+	select LIBVA			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_DRI_NOUVEAU
+	prompt "VA"
+
 comment "Platforms"
 
 config MESALIB_EGL_X11
diff --git a/rules/mesalib.make b/rules/mesalib.make
index 3dd45667fbdd..f5c0c99b0b4b 100644
--- a/rules/mesalib.make
+++ b/rules/mesalib.make
@@ -38,7 +38,7 @@ MESALIB_DRI_DRIVERS-$(PTXCONF_MESALIB_DRI_NOUVEAU_VIEUX)+= nouveau
 MESALIB_DRI_DRIVERS-$(PTXCONF_MESALIB_DRI_R200)		+= r200
 
 MESALIB_GALLIUM_DRIVERS-$(PTXCONF_MESALIB_DRI_VIRGL)	+= virgl
-ifndef PTXCONF_ARCH_ARM # broken: https://bugs.freedesktop.org/show_bug.cgi?id=72064
+ifndef PTXCONF_ARCH_ARM # broken: https://gitlab.freedesktop.org/mesa/mesa/-/issues/473
 ifndef PTXCONF_ARCH_X86 # needs llvm
 MESALIB_GALLIUM_DRIVERS-$(PTXCONF_MESALIB_DRI_R300)	+= r300
 endif
@@ -127,6 +127,14 @@ 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
+ifndef PTXCONF_ARCH_ARM # broken: https://gitlab.freedesktop.org/mesa/mesa/-/issues/473
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_R600)		+= r600
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_RADEONSI)	+= radeonsi
+endif
+MESALIB_DRI_VA_LIBS-$(PTXCONF_MESALIB_DRI_NOUVEAU)	+= nouveau
+endif
+
 MESALIB_CONF_TOOL	:= meson
 MESALIB_CONF_OPT	:= \
 	$(CROSS_MESON_USR) \
@@ -152,7 +160,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 +261,17 @@ 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), \
+		test -f $(MESALIB_PKGDIR)/usr/lib/dri/$(lib)_drv_video.so || \
+			ptxd_bailout "missing va driver $(lib)_drv_video.so"$(ptx/nl) \
+		$(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


             reply	other threads:[~2022-02-28 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 13:42 Philipp Zabel [this message]
2022-03-11  9:25 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228134203.1956719-1-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox