mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [RFC 2/2] mesalib: enable VA support
Date: Wed, 23 Feb 2022 14:53:52 +0100	[thread overview]
Message-ID: <20220223135352.604965-2-p.zabel@pengutronix.de> (raw)
In-Reply-To: <20220223135352.604965-1-p.zabel@pengutronix.de>

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


  reply	other threads:[~2022-02-23 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 13:53 [ptxdist] [RFC 1/2] libva-headers: new package Philipp Zabel
2022-02-23 13:53 ` Philipp Zabel [this message]
2022-02-24 16:02 ` Roland Hieber
2022-02-25  8:23 ` 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=20220223135352.604965-2-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