mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] mesalib: enable VA support
@ 2022-02-28 13:42 Philipp Zabel
  2022-03-11  9:25 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2022-02-28 13:42 UTC (permalink / raw)
  To: ptxdist

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


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

end of thread, other threads:[~2022-03-11  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 13:42 [ptxdist] [PATCH v2] mesalib: enable VA support Philipp Zabel
2022-03-11  9:25 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox