From 26bafc063fcc50ab4fb08e829dd3c17c0bdba290 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 9 Nov 2014 02:19:53 +0100 Subject: [PATCH] move vaapi / vdpau support to config/graphic Signed-off-by: Stephan Raue --- config/functions | 7 +++++-- config/graphic | 8 +++++++- packages/graphics/Mesa/package.mk | 2 +- packages/mediacenter/kodi/package.mk | 10 +++++----- packages/multimedia/ffmpeg/package.mk | 4 ++-- packages/virtual/debug/package.mk | 2 +- .../x11/driver/xf86-video-nvidia-legacy/package.mk | 10 ++++------ packages/x11/driver/xf86-video-nvidia/package.mk | 14 ++++---------- projects/Generic/options | 6 ------ projects/RPi/options | 6 ------ projects/imx6/options | 6 ------ 11 files changed, 29 insertions(+), 46 deletions(-) diff --git a/config/functions b/config/functions index 486f537411..fc348e581e 100644 --- a/config/functions +++ b/config/functions @@ -277,6 +277,9 @@ dashes="===========================" } show_config() { + # load graphic configuration + get_graphicdrivers + dashes="===========================" config_message="$config_message\n $dashes$dashes$dashes" config_message="$config_message\n Configuration for $DISTRONAME ($([ "$OFFICIAL" = "yes" ] && echo "official" || echo "unofficial"))" @@ -319,8 +322,8 @@ show_config() { config_message="$config_message\n $dashes$dashes" config_message="$config_message\n - Kodi Player driver:\t\t\t $KODIPLAYER_DRIVER" - config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI" - config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU" + config_message="$config_message\n - VAAPI Support:\t\t\t $VAAPI_SUPPORT" + config_message="$config_message\n - VDPAU Support:\t\t\t $VDPAU_SUPPORT" # Input device configuration diff --git a/config/graphic b/config/graphic index fae4e4a948..ada126a893 100644 --- a/config/graphic +++ b/config/graphic @@ -40,12 +40,14 @@ get_graphicdrivers() { DRI_DRIVERS="$DRI_DRIVERS,i915" XORG_DRIVERS="$XORG_DRIVERS intel" COMPOSITE_SUPPORT="yes" + VAAPI_SUPPORT="yes" fi if [ "$drv" = "i965" ]; then DRI_DRIVERS="$DRI_DRIVERS,i965" XORG_DRIVERS="$XORG_DRIVERS intel" COMPOSITE_SUPPORT="yes" + VAAPI_SUPPORT="yes" fi if [ "$drv" = "nouveau" ]; then @@ -56,15 +58,16 @@ get_graphicdrivers() { GALLIUM_DRIVERS="$GALLIUM_DRIVERS,nouveau" XORG_DRIVERS="$XORG_DRIVERS nouveau" COMPOSITE_SUPPORT="yes" -# LLVM_SUPPORT="yes" fi if [ "$drv" = "nvidia" ]; then XORG_DRIVERS="$XORG_DRIVERS nvidia" + VDPAU_SUPPORT="yes" fi if [ "$drv" = "nvidia-legacy" ]; then XORG_DRIVERS="$XORG_DRIVERS nvidia-legacy" + VDPAU_SUPPORT="yes" fi if [ "$drv" = "r200" ]; then @@ -78,6 +81,7 @@ get_graphicdrivers() { XORG_DRIVERS="$XORG_DRIVERS ati" LLVM_SUPPORT="yes" COMPOSITE_SUPPORT="yes" + VDPAU_SUPPORT="yes" fi if [ "$drv" = "r600" ]; then @@ -85,6 +89,7 @@ get_graphicdrivers() { XORG_DRIVERS="$XORG_DRIVERS ati" LLVM_SUPPORT="yes" COMPOSITE_SUPPORT="yes" + VDPAU_SUPPORT="yes" fi if [ "$drv" = "radeonsi" ]; then @@ -92,6 +97,7 @@ get_graphicdrivers() { XORG_DRIVERS="$XORG_DRIVERS ati" LLVM_SUPPORT="yes" COMPOSITE_SUPPORT="yes" + VDPAU_SUPPORT="yes" fi done diff --git a/packages/graphics/Mesa/package.mk b/packages/graphics/Mesa/package.mk index dc5ab8ace2..eee18088ed 100644 --- a/packages/graphics/Mesa/package.mk +++ b/packages/graphics/Mesa/package.mk @@ -43,7 +43,7 @@ else MESA_GALLIUM_LLVM="--disable-gallium-llvm" fi -if [ "$VDPAU" = "yes" ]; then +if [ "$VDPAU_SUPPORT" = "yes" ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau" MESA_VDPAU="--enable-vdpau" else diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk index 0359992c96..4a526d0117 100644 --- a/packages/mediacenter/kodi/package.mk +++ b/packages/mediacenter/kodi/package.mk @@ -33,6 +33,9 @@ PKG_LONGDESC="Kodi Media Center (which was formerly named Xbox Media Center or X PKG_IS_ADDON="no" PKG_AUTORECONF="no" +# configure GPU drivers and dependencies: + get_graphicdrivers + # for dbus support PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET dbus" @@ -271,17 +274,14 @@ if [ ! "$KODIPLAYER_DRIVER" = default ]; then fi fi -if [ "$VDPAU" = yes ]; then +if [ "$VDPAU_SUPPORT" = yes ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau" KODI_VDPAU="--enable-vdpau" else KODI_VDPAU="--disable-vdpau" fi -if [ "$VAAPI" = yes ]; then -# configure GPU drivers and dependencies: - get_graphicdrivers - +if [ "$VAAPI_SUPPORT" = yes ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver" KODI_VAAPI="--enable-vaapi" else diff --git a/packages/multimedia/ffmpeg/package.mk b/packages/multimedia/ffmpeg/package.mk index c86d833c3e..c2a36780cc 100644 --- a/packages/multimedia/ffmpeg/package.mk +++ b/packages/multimedia/ffmpeg/package.mk @@ -32,17 +32,17 @@ PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert a PKG_IS_ADDON="no" PKG_AUTORECONF="no" -if [ "$VAAPI" = yes ]; then # configure GPU drivers and dependencies: get_graphicdrivers +if [ "$VAAPI_SUPPORT" = yes ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver" FFMPEG_VAAPI="--enable-vaapi" else FFMPEG_VAAPI="--disable-vaapi" fi -if [ "$VDPAU" = yes ]; then +if [ "$VDPAU_SUPPORT" = yes ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau" FFMPEG_VDPAU="--enable-vdpau" else diff --git a/packages/virtual/debug/package.mk b/packages/virtual/debug/package.mk index 7f5b34253e..4c36193049 100644 --- a/packages/virtual/debug/package.mk +++ b/packages/virtual/debug/package.mk @@ -32,7 +32,7 @@ PKG_LONGDESC="debug is a Metapackage for installing debugging tools" PKG_IS_ADDON="no" PKG_AUTORECONF="no" -if [ "$VDPAU" = "yes" ]; then +if [ "$VDPAU_SUPPORT" = "yes" ]; then PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET vdpauinfo" fi diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/package.mk b/packages/x11/driver/xf86-video-nvidia-legacy/package.mk index 5cc1ab8c9a..1087fc359d 100644 --- a/packages/x11/driver/xf86-video-nvidia-legacy/package.mk +++ b/packages/x11/driver/xf86-video-nvidia-legacy/package.mk @@ -24,7 +24,7 @@ PKG_LICENSE="nonfree" PKG_SITE="http://www.nvidia.com/" [ "$TARGET_ARCH" = "i386" ] && PKG_URL="http://us.download.nvidia.com/XFree86/Linux-x86/$PKG_VERSION/NVIDIA-Linux-x86-$PKG_VERSION.run" [ "$TARGET_ARCH" = "x86_64" ] && PKG_URL="http://us.download.nvidia.com/XFree86/Linux-x86_64/$PKG_VERSION/NVIDIA-Linux-x86_64-$PKG_VERSION-no-compat32.run" -PKG_DEPENDS_TARGET="toolchain util-macros linux xorg-server" +PKG_DEPENDS_TARGET="toolchain util-macros linux xorg-server libvdpau" PKG_NEED_UNPACK="$LINUX_DEPENDS" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" @@ -74,9 +74,7 @@ makeinstall_target() { mkdir -p $INSTALL/usr/bin cp nvidia-smi $INSTALL/usr/bin - if [ "$VDPAU" = yes ]; then - mkdir -p $INSTALL/usr/lib/vdpau - cp libvdpau_nvidia.so* $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so.1 - ln -sf libvdpau_nvidia.so.1 $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so - fi + mkdir -p $INSTALL/usr/lib/vdpau + cp libvdpau_nvidia.so* $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so.1 + ln -sf libvdpau_nvidia.so.1 $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so } diff --git a/packages/x11/driver/xf86-video-nvidia/package.mk b/packages/x11/driver/xf86-video-nvidia/package.mk index b864252b66..6c71ad5856 100644 --- a/packages/x11/driver/xf86-video-nvidia/package.mk +++ b/packages/x11/driver/xf86-video-nvidia/package.mk @@ -24,7 +24,7 @@ PKG_LICENSE="nonfree" PKG_SITE="http://www.nvidia.com/" [ "$TARGET_ARCH" = "i386" ] && PKG_URL="http://us.download.nvidia.com/XFree86/Linux-x86/$PKG_VERSION/NVIDIA-Linux-x86-$PKG_VERSION.run" [ "$TARGET_ARCH" = "x86_64" ] && PKG_URL="http://us.download.nvidia.com/XFree86/Linux-x86_64/$PKG_VERSION/NVIDIA-Linux-x86_64-$PKG_VERSION-no-compat32.run" -PKG_DEPENDS_TARGET="toolchain util-macros linux xorg-server" +PKG_DEPENDS_TARGET="toolchain util-macros linux xorg-server libvdpau" PKG_NEED_UNPACK="$LINUX_DEPENDS" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" @@ -34,10 +34,6 @@ PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of Op PKG_IS_ADDON="no" PKG_AUTORECONF="no" -if [ "$VDPAU" = yes ]; then - PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau" -fi - unpack() { NV_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`" [ -d $PKG_BUILD ] && rm -rf $PKG_BUILD @@ -78,9 +74,7 @@ makeinstall_target() { mkdir -p $INSTALL/usr/bin cp nvidia-smi $INSTALL/usr/bin - if [ "$VDPAU" = yes ]; then - mkdir -p $INSTALL/usr/lib/vdpau - cp libvdpau_nvidia.so* $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so.1 - ln -sf libvdpau_nvidia.so.1 $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so - fi + mkdir -p $INSTALL/usr/lib/vdpau + cp libvdpau_nvidia.so* $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so.1 + ln -sf libvdpau_nvidia.so.1 $INSTALL/usr/lib/vdpau/libvdpau_nvidia.so } diff --git a/projects/Generic/options b/projects/Generic/options index 5ce948a30a..6e439e8747 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -276,12 +276,6 @@ # KODI Player implementation to use (default / bcm2835-driver) KODIPLAYER_DRIVER="default" -# Use VDPAU video acceleration (needs nVidia driver and a supported card) - VDPAU="yes" - -# Use VAAPI video acceleration (needs intel i965 driver and a supported card) - VAAPI="yes" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes" diff --git a/projects/RPi/options b/projects/RPi/options index c19cf4ffba..fc86f6060b 100644 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -271,12 +271,6 @@ # KODI Player implementation to use (default / bcm2835-driver) KODIPLAYER_DRIVER="bcm2835-driver" -# Use VDPAU video acceleration (needs nVidia driver and a supported card) - VDPAU="no" - -# Use VAAPI video acceleration (needs intel i965 driver and a supported card) - VAAPI="no" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes" diff --git a/projects/imx6/options b/projects/imx6/options index de6261b3b2..ce237c32b8 100644 --- a/projects/imx6/options +++ b/projects/imx6/options @@ -272,12 +272,6 @@ # KODI Player implementation to use (default / bcm2835-driver) KODIPLAYER_DRIVER="libfslvpuwrap" -# Use VDPAU video acceleration (needs nVidia driver and a supported card) - VDPAU="no" - -# Use VAAPI video acceleration (needs intel i965 driver and a supported card) - VAAPI="no" - # build and install remote support (yes / no) REMOTE_SUPPORT="yes"