Github messages for voidlinux
 help / color / mirror / Atom feed
From: zlice <zlice@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Intel packages
Date: Thu, 23 Mar 2023 14:32:51 +0100	[thread overview]
Message-ID: <20230323133251.hGHZt0sitIzEjk0DiW_lUO5G4ucyJ68s90ZoL5L9mEk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41132@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]

There is an updated pull request by zlice against master on the void-packages repository

https://github.com/zlice/void-packages intel_packages
https://github.com/void-linux/void-packages/pull/41132

Intel packages
#### Testing the changes
- I tested the changes in this PR: **yes**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, **x86_64**


#### Comments

Packages for Intel DG2/Alchemist/Arc support. Still pending ffmpeg5 largely https://github.com/void-linux/void-packages/pull/36315.

Able to use ffmpeg ~~5.1.2~~ ~~git~~ 4.4 with a A770 encode and these libraries. (ffmpeg5 doesn't install, LD_LIBRARY_PATH and untaring the xbps's to do this)

OneVPL is the successor to IntelMediaSDK (libmfx), but only one of these can be enabled in ffmpeg. Furthermore only latest ffmpeg has OneVPL support.

- igt-gpu-tools
- intel-media-drivers (needed for vaapi on dg2. 22.6.4 works, 22.6.6 does not seem to)
- intel-gmmlib (needed for new intel-media-drivers to compile)
- onevpl (replaces intel-media-sdk - but only available in ffmpeg git)
- onevpl-intel-gpu
- intel-media-sdk
- libmfx (part of intel-media-sdk)
- ffmpeg with mfx for Intel vaapi support

#### Concerns/Questions

- ~~mlt/7 - just prep work for ffmpeg5~~ mlt6 & 7 updated
- onevpl naming ? `intel-onevpl` ? `lib` ?
- libmfx naming ? `intel-libmfx` ?
- mesa 22.3.1 pretty much required for new Intel GPUs https://github.com/void-linux/void-packages/pull/41084

A patch file from https://github.com/void-linux/void-packages/pull/41132.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intel_packages-41132.patch --]
[-- Type: text/x-diff, Size: 28197 bytes --]

From 2a9e7b2d1d4f694dda42e0917872cbed8dc2e037 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 16 Dec 2022 09:25:22 -0500
Subject: [PATCH 1/7] intel-gmmlib: update to 22.3.3

---
 srcpkgs/intel-gmmlib/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intel-gmmlib/template b/srcpkgs/intel-gmmlib/template
index 8ed6ed3cf56c..2605226152e5 100644
--- a/srcpkgs/intel-gmmlib/template
+++ b/srcpkgs/intel-gmmlib/template
@@ -1,6 +1,6 @@
 # Template file for 'intel-gmmlib'
 pkgname=intel-gmmlib
-version=22.2.0
+version=22.3.3
 revision=1
 archs="i686* x86_64*"
 build_style=cmake
@@ -18,7 +18,7 @@ maintainer="Stefano Ragni <st3r4g@protonmail.com>"
 license="MIT"
 homepage="https://github.com/intel/gmmlib"
 distfiles="https://github.com/intel/gmmlib/archive/intel-gmmlib-${version}.tar.gz"
-checksum=0b2253894c6fc8455b6d7c5e87e6504a76d6f60ea192e1445c2f93164bf529c0
+checksum=86651bd2803c9f0afd82471bec784e65d2b418dee315a053d22215eb2a679be7
 
 lib32disabled=yes
 

From 3f81bea4f82a0f9e08f2603fb931ae25c59641d2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 16 Dec 2022 09:25:47 -0500
Subject: [PATCH 2/7] intel-media-driver: update to 22.6.4

---
 ...mmon-Enable-MMC-in-free-kernel-build.patch | 125 ++++++++++++++++++
 .../intel-media-driver/patches/execinfo.patch |  58 --------
 srcpkgs/intel-media-driver/template           |   4 +-
 3 files changed, 127 insertions(+), 60 deletions(-)
 create mode 100644 srcpkgs/intel-media-driver/patches/0001-Media-Common-Enable-MMC-in-free-kernel-build.patch
 delete mode 100644 srcpkgs/intel-media-driver/patches/execinfo.patch

diff --git a/srcpkgs/intel-media-driver/patches/0001-Media-Common-Enable-MMC-in-free-kernel-build.patch b/srcpkgs/intel-media-driver/patches/0001-Media-Common-Enable-MMC-in-free-kernel-build.patch
new file mode 100644
index 000000000000..525fb688722c
--- /dev/null
+++ b/srcpkgs/intel-media-driver/patches/0001-Media-Common-Enable-MMC-in-free-kernel-build.patch
@@ -0,0 +1,125 @@
+From e68feab7db036838d9521ba3b9f00717c37c024c Mon Sep 17 00:00:00 2001
+From: JayYang <jay.yang@intel.com>
+Date: Tue, 21 Mar 2023 17:17:55 +0800
+Subject: [PATCH] [Media Common] Enable MMC in free kernel build
+
+Add mmc build definition in free kernel build
+---
+ media_driver/agnostic/gen9/codec/hal/media_srcs.cmake          | 2 +-
+ media_driver/cmake/linux/media_feature_flags_linux.cmake       | 3 +--
+ .../media_interfaces_m9_bxt/media_interfaces_g9_bxt.cpp        | 2 +-
+ .../media_interfaces_m9_cfl/media_interfaces_g9_cfl.cpp        | 2 +-
+ .../media_interfaces_m9_glk/media_interfaces_g9_glk.cpp        | 2 +-
+ .../media_interfaces_m9_kbl/media_interfaces_g9_kbl.cpp        | 2 +-
+ .../media_interfaces_m9_skl/media_interfaces_g9_skl.cpp        | 2 +-
+ 7 files changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/media_driver/agnostic/gen9/codec/hal/media_srcs.cmake b/media_driver/agnostic/gen9/codec/hal/media_srcs.cmake
+index 8bb36bafe..78902a22d 100644
+--- a/media_driver/agnostic/gen9/codec/hal/media_srcs.cmake
++++ b/media_driver/agnostic/gen9/codec/hal/media_srcs.cmake
+@@ -27,7 +27,7 @@ set(TMP_1_HEADERS_
+     ${CMAKE_CURRENT_LIST_DIR}/codechal_hw_g9_X.h
+ )
+ 
+-if(${MMC_Supported} STREQUAL "yes")
++if(${MMC_Supported} STREQUAL "yes" AND ENABLE_NONFREE_KERNELS AND ENABLE_KERNELS)
+     set(TMP_1_SOURCES_
+         ${TMP_1_SOURCES_}
+         ${CMAKE_CURRENT_LIST_DIR}/codechal_memdecomp_g9.cpp
+diff --git a/media_driver/cmake/linux/media_feature_flags_linux.cmake b/media_driver/cmake/linux/media_feature_flags_linux.cmake
+index de0ca853f..8121ea60c 100644
+--- a/media_driver/cmake/linux/media_feature_flags_linux.cmake
++++ b/media_driver/cmake/linux/media_feature_flags_linux.cmake
+@@ -35,7 +35,6 @@ if(NOT ENABLE_KERNELS OR NOT ENABLE_NONFREE_KERNELS)
+     bs_set_if_undefined(HEVC_Encode_VME_Supported "no")
+     bs_set_if_undefined(MPEG2_Encode_VME_Supported "no")
+     bs_set_if_undefined(CMRT_HEVC_ENC_FEI_Supported "no")
+-    bs_set_if_undefined(MMC_Supported "no")
+     bs_set_if_undefined(VC1_Decode_Supported "no")
+     bs_set_if_undefined(Decode_Processing_Supported "no")
+     bs_set_if_undefined(Kernel_Auto_Denoise_Supported "no")
+@@ -46,7 +45,6 @@ else()
+     bs_set_if_undefined(HEVC_Encode_VME_Supported "${Encode_VME_Supported}")
+     bs_set_if_undefined(MPEG2_Encode_VME_Supported "${Encode_VME_Supported}")
+     bs_set_if_undefined(CMRT_HEVC_ENC_FEI_Supported "yes")
+-    bs_set_if_undefined(MMC_Supported "yes")
+     bs_set_if_undefined(VC1_Decode_Supported "yes")
+     bs_set_if_undefined(Decode_Processing_Supported "yes")
+     bs_set_if_undefined(Kernel_Auto_Denoise_Supported "yes")
+@@ -64,6 +62,7 @@ bs_set_if_undefined(VP9_Decode_Supported "yes")
+ bs_set_if_undefined(VP_SFC_Supported "yes")
+ bs_set_if_undefined(Common_Encode_Supported "yes")
+ bs_set_if_undefined(Media_Scalability_Supported "yes")
++bs_set_if_undefined(MMC_Supported "yes")
+ 
+ # features controlled by global flag Encode_VDEnc_Supported
+ bs_set_if_undefined(AVC_Encode_VDEnc_Supported "${Encode_VDEnc_Supported}")
+diff --git a/media_driver/media_interface/media_interfaces_m9_bxt/media_interfaces_g9_bxt.cpp b/media_driver/media_interface/media_interfaces_m9_bxt/media_interfaces_g9_bxt.cpp
+index 3f306ee2a..8e4c0f532 100644
+--- a/media_driver/media_interface/media_interfaces_m9_bxt/media_interfaces_g9_bxt.cpp
++++ b/media_driver/media_interface/media_interfaces_m9_bxt/media_interfaces_g9_bxt.cpp
+@@ -135,7 +135,7 @@ MOS_STATUS MhwInterfacesG9Bxt::Initialize(
+ 
+     return MOS_STATUS_SUCCESS;
+ }
+-#ifdef _MMC_SUPPORTED
++#if defined(_MMC_SUPPORTED) && defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE)
+ static bool bxtRegisteredMmd =
+     MediaFactory<uint32_t, MmdDevice>::
+     Register<MmdDeviceG9Bxt>((uint32_t)IGFX_BROXTON);
+diff --git a/media_driver/media_interface/media_interfaces_m9_cfl/media_interfaces_g9_cfl.cpp b/media_driver/media_interface/media_interfaces_m9_cfl/media_interfaces_g9_cfl.cpp
+index b8fa1eec0..84e0fad1d 100644
+--- a/media_driver/media_interface/media_interfaces_m9_cfl/media_interfaces_g9_cfl.cpp
++++ b/media_driver/media_interface/media_interfaces_m9_cfl/media_interfaces_g9_cfl.cpp
+@@ -44,7 +44,7 @@ static bool cflRegisteredMhw =
+     MediaFactory<uint32_t, MhwInterfaces>::
+     Register<MhwInterfacesG9Kbl>((uint32_t)IGFX_COFFEELAKE);
+ 
+-#ifdef _MMC_SUPPORTED
++#if defined(_MMC_SUPPORTED) && defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE)
+ static bool cflRegisteredMmd =
+     MediaFactory<uint32_t, MmdDevice>::
+     Register<MmdDeviceG9Kbl>((uint32_t)IGFX_COFFEELAKE);
+diff --git a/media_driver/media_interface/media_interfaces_m9_glk/media_interfaces_g9_glk.cpp b/media_driver/media_interface/media_interfaces_m9_glk/media_interfaces_g9_glk.cpp
+index de81e6091..2638cb3a6 100644
+--- a/media_driver/media_interface/media_interfaces_m9_glk/media_interfaces_g9_glk.cpp
++++ b/media_driver/media_interface/media_interfaces_m9_glk/media_interfaces_g9_glk.cpp
+@@ -65,7 +65,7 @@ static bool glkRegisteredMhw =
+     MediaFactory<uint32_t, MhwInterfaces>::
+     Register<MhwInterfacesG9Kbl>((uint32_t)IGFX_GEMINILAKE);
+ 
+-#ifdef _MMC_SUPPORTED
++#if defined(_MMC_SUPPORTED) && defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE)
+ static bool glkRegisteredMmd =
+     MediaFactory<uint32_t, MmdDevice>::
+     Register<MmdDeviceG9Kbl>((uint32_t)IGFX_GEMINILAKE);
+diff --git a/media_driver/media_interface/media_interfaces_m9_kbl/media_interfaces_g9_kbl.cpp b/media_driver/media_interface/media_interfaces_m9_kbl/media_interfaces_g9_kbl.cpp
+index 99d786185..4e9c6e7f1 100644
+--- a/media_driver/media_interface/media_interfaces_m9_kbl/media_interfaces_g9_kbl.cpp
++++ b/media_driver/media_interface/media_interfaces_m9_kbl/media_interfaces_g9_kbl.cpp
+@@ -131,7 +131,7 @@ MOS_STATUS MhwInterfacesG9Kbl::Initialize(
+ 
+     return MOS_STATUS_SUCCESS;
+ }
+-#ifdef _MMC_SUPPORTED
++#if defined(_MMC_SUPPORTED) && defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE)
+ static bool kblRegisteredMmd =
+     MediaFactory<uint32_t, MmdDevice>::
+     Register<MmdDeviceG9Kbl>((uint32_t)IGFX_KABYLAKE);
+diff --git a/media_driver/media_interface/media_interfaces_m9_skl/media_interfaces_g9_skl.cpp b/media_driver/media_interface/media_interfaces_m9_skl/media_interfaces_g9_skl.cpp
+index e2520edf7..4b0012c64 100644
+--- a/media_driver/media_interface/media_interfaces_m9_skl/media_interfaces_g9_skl.cpp
++++ b/media_driver/media_interface/media_interfaces_m9_skl/media_interfaces_g9_skl.cpp
+@@ -139,7 +139,7 @@ MOS_STATUS MhwInterfacesG9Skl::Initialize(
+ 
+     return MOS_STATUS_SUCCESS;
+ }
+-#ifdef _MMC_SUPPORTED
++#if defined(_MMC_SUPPORTED) && defined(ENABLE_KERNELS) && !defined(_FULL_OPEN_SOURCE)
+ static bool sklRegisteredMmd =
+     MediaFactory<uint32_t, MmdDevice>::
+     Register<MmdDeviceG9Skl>((uint32_t)IGFX_SKYLAKE);
+-- 
+2.40.0
+
diff --git a/srcpkgs/intel-media-driver/patches/execinfo.patch b/srcpkgs/intel-media-driver/patches/execinfo.patch
deleted file mode 100644
index 25d21192d5a1..000000000000
--- a/srcpkgs/intel-media-driver/patches/execinfo.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From b17354142563b45e0ebf427485591426481368fd Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd.kuhls@t-online.de>
-Date: Fri, 29 Jul 2022 19:51:39 +0200
-Subject: [PATCH] Fix uClibc build
-
-uClibc does not provide execinfo.h
----
- CMakeLists.txt                                              | 6 ++++++
- .../linux/common/os/osservice/mos_utilities_specific.cpp    | 4 ++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 053904748..4a3f0869e 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -53,6 +53,12 @@ option (BUILD_CMRTLIB "Build and Install cmrtlib together with media driver" ON)
- 
- option (ENABLE_PRODUCTION_KMD "Enable Production KMD header files" OFF)
- 
-+include(CheckIncludeFileCXX)
-+check_include_file_cxx("execinfo.h" HAVE_EXECINFO)
-+if (HAVE_EXECINFO)
-+    add_definitions(-DHAVE_EXECINFO)
-+endif()
-+
- include(GNUInstallDirs)
- 
- if (BUILD_CMRTLIB AND NOT CMAKE_WDDM_LINUX)
-diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
-index bde216b83..120b02d55 100644
---- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
-+++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
-@@ -34,7 +34,9 @@
- #include <signal.h>
- #include <unistd.h>  // fork
- #include <algorithm>
-+#ifdef HAVE_EXECINFO
- #include <execinfo.h> // backtrace
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>  // fstat
- #include <sys/ipc.h>  // System V IPC
-@@ -2473,6 +2475,7 @@ void MosUtilities::MosTraceEvent(
-                 MOS_FreeMemory(pTraceBuf);
-             }
-         }
-+#ifdef HAVE_EXECINFO
-         if (m_mosTraceFilter & (1ULL << TR_KEY_CALL_STACK))
-         {
-             // reserve space for header and stack size field.
-@@ -2492,6 +2495,7 @@ void MosUtilities::MosTraceEvent(
-                 size_t ret = write(MosUtilitiesSpecificNext::m_mosTraceFd, traceBuf, nLen);
-             }
-         }
-+#endif
-     }
-     return;
- }
diff --git a/srcpkgs/intel-media-driver/template b/srcpkgs/intel-media-driver/template
index 1ca94569e117..1735b90c65ce 100644
--- a/srcpkgs/intel-media-driver/template
+++ b/srcpkgs/intel-media-driver/template
@@ -1,6 +1,6 @@
 # Template file for 'intel-media-driver'
 pkgname=intel-media-driver
-version=22.5.3
+version=22.6.4
 revision=1
 archs="x86_64*"
 build_style=cmake
@@ -12,7 +12,7 @@ maintainer="Stefano Ragni <st3r4g@protonmail.com>"
 license="MIT, BSD-3-Clause"
 homepage="https://github.com/intel/media-driver"
 distfiles="https://github.com/intel/media-driver/archive/intel-media-${version}.tar.gz"
-checksum=65652b365d48be3c9f0b3c561502952b92ee5fcc587520b88d0d752cf2a6a3b5
+checksum=0c04b9d74b92de41fd409b62913ce4afd799236c0b6bc1983a496990764e5d90
 
 build_options="nonfree"
 desc_option_nonfree="Enable nonfree kernels"

From b21a2f6c2c542f64728b65510c54ffd868368abc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 16 Dec 2022 09:31:43 -0500
Subject: [PATCH 3/7] New package: onevpl-2023.1.2

---
 srcpkgs/onevpl-devel    |  1 +
 srcpkgs/onevpl/template | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 120000 srcpkgs/onevpl-devel
 create mode 100644 srcpkgs/onevpl/template

diff --git a/srcpkgs/onevpl-devel b/srcpkgs/onevpl-devel
new file mode 120000
index 000000000000..e2306500b487
--- /dev/null
+++ b/srcpkgs/onevpl-devel
@@ -0,0 +1 @@
+onevpl
\ No newline at end of file
diff --git a/srcpkgs/onevpl/template b/srcpkgs/onevpl/template
new file mode 100644
index 000000000000..85c7c2da85ce
--- /dev/null
+++ b/srcpkgs/onevpl/template
@@ -0,0 +1,34 @@
+# Template file for 'onevpl'
+pkgname=onevpl
+version=2023.1.2
+revision=1
+archs="x86_64*"
+build_style=cmake
+configure_args="
+	-DCMAKE_BUILD_TYPE=Release -Wno-dev
+	-DBUILD_PYTHON_BINDING:BOOL='OFF'
+	-DBUILD_EXAMPLES:BOOL='OFF'
+	-DBUILD_TESTS:BOOL='ON'
+	-DINSTALL_EXAMPLE_CODE:BOOL='OFF'"
+hostmakedepends="cmake libX11 python wayland-protocols pkg-config"
+makedepends="libva-devel libX11-devel wayland-devel"
+short_desc="Intel oneAPI Video Processing library"
+maintainer="zlice <zlice555@gmail.com>"
+license="MIT"
+homepage="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html"
+distfiles="https://github.com/oneapi-src/oneVPL/archive/v${version}/${pkgname}-${version}.tar.gz"
+checksum=b2261cca174ce1815f3d47c647921ab17f68267c69c1e2444ff27aab7d199cbb
+
+post_install() {
+	vlicense LICENSE
+}
+
+onevpl-devel_package() {
+	depends="${makedepends} ${sourcepkg}-${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+		vmove "usr/lib/*.so"
+	}
+}

From bbc3d07574f6dd0a1606caa734fda121f139efc0 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 16 Dec 2022 15:27:04 -0500
Subject: [PATCH 4/7] New package: onevpl-intel-gpu-22.6.4

---
 srcpkgs/onevpl-intel-gpu-devel    |  1 +
 srcpkgs/onevpl-intel-gpu/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/onevpl-intel-gpu-devel
 create mode 100644 srcpkgs/onevpl-intel-gpu/template

diff --git a/srcpkgs/onevpl-intel-gpu-devel b/srcpkgs/onevpl-intel-gpu-devel
new file mode 120000
index 000000000000..47920ceecf91
--- /dev/null
+++ b/srcpkgs/onevpl-intel-gpu-devel
@@ -0,0 +1 @@
+onevpl-intel-gpu
\ No newline at end of file
diff --git a/srcpkgs/onevpl-intel-gpu/template b/srcpkgs/onevpl-intel-gpu/template
new file mode 100644
index 000000000000..f14acb728a54
--- /dev/null
+++ b/srcpkgs/onevpl-intel-gpu/template
@@ -0,0 +1,27 @@
+# Template file for 'onevpl-intel-gpu'
+pkgname=onevpl-intel-gpu
+version=22.6.4
+revision=1
+archs="x86_64*"
+build_style=cmake
+configure_args="-Wno-dev -DCMAKE_BUILD_TYPE=Release"
+hostmakedepends="cmake pkg-config"
+makedepends="libdrm-devel libva-devel onevpl-devel"
+short_desc="Runtime implementation of oneVPL API for Intel Gen GPUs"
+maintainer="zlice <zlice555@gmail.com>"
+license="MIT"
+homepage="https://github.com/oneapi-src/oneVPL-intel-gpu"
+changelog="https://github.com/oneapi-src/oneVPL-intel-gpu/blob/main/CHANGELOG.md"
+distfiles="https://github.com/oneapi-src/oneVPL-intel-gpu/archive/refs/tags/intel-onevpl-${version}.tar.gz"
+checksum=74b0979dcb2af1b7c68edb8cbcb02d539de511090b12fac50652cbacd707c4e6
+
+post_install() {
+	vlicense LICENSE
+}
+
+onevpl-intel-gpu-devel_package() {
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/lib/pkgconfig
+	}
+}

From 0632d1816629632d4ba27ddaf5b7257726794e15 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 18 Dec 2022 01:18:17 -0500
Subject: [PATCH 5/7] New package: intel-media-sdk-22.6.4

---
 common/shlibs                              |  1 +
 srcpkgs/intel-media-sdk/patches/musl.patch | 14 ++++++++
 srcpkgs/intel-media-sdk/template           | 37 ++++++++++++++++++++++
 srcpkgs/intel-media-sdk/update             |  1 +
 srcpkgs/libmfx                             |  1 +
 srcpkgs/libmfx-devel                       |  1 +
 6 files changed, 55 insertions(+)
 create mode 100644 srcpkgs/intel-media-sdk/patches/musl.patch
 create mode 100644 srcpkgs/intel-media-sdk/template
 create mode 100644 srcpkgs/intel-media-sdk/update
 create mode 120000 srcpkgs/libmfx
 create mode 120000 srcpkgs/libmfx-devel

diff --git a/common/shlibs b/common/shlibs
index b8d161c2d932..b3c67d287158 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4238,3 +4238,4 @@ libdate-tz.so.3 chrono-date-3.0.1_1
 libayatana-ido3-0.4.so.0 ayatana-ido-0.9.2_1
 libayatana-indicator3.so.7 libayatana-indicator-0.9.3_1
 libayatana-appindicator3.so.1 libayatana-appindicator-0.5.91_1
+libmfx.so.1 libmfx-22.6.4_1
diff --git a/srcpkgs/intel-media-sdk/patches/musl.patch b/srcpkgs/intel-media-sdk/patches/musl.patch
new file mode 100644
index 000000000000..4ae70924b744
--- /dev/null
+++ b/srcpkgs/intel-media-sdk/patches/musl.patch
@@ -0,0 +1,14 @@
+--- a/tools/tracer/tracer/tracer_linux.cpp	2022-11-18 03:02:59.000000000 -0500
++++ b/tools/tracer/tracer/tracer_linux.cpp	2022-12-18 01:44:51.341542572 -0500
+@@ -32,6 +32,11 @@
+ #include <dlfcn.h>
+ #include "tracer.h"
+
++#ifndef RTLD_DEEPBIND
++// musl neither defines nor can use RTLD_DEEPBIND
++#define RTLD_DEEPBIND 0
++#endif
++
+ #if defined(__i386__)
+     #define LIBMFXHW "libmfxhw32.so.1"
+ #elif defined(__x86_64__)
diff --git a/srcpkgs/intel-media-sdk/template b/srcpkgs/intel-media-sdk/template
new file mode 100644
index 000000000000..7aeab51802f8
--- /dev/null
+++ b/srcpkgs/intel-media-sdk/template
@@ -0,0 +1,37 @@
+# Template file for 'intel-media-sdk'
+pkgname=intel-media-sdk
+version=22.6.4
+revision=1
+archs="x86_64*"
+build_style=cmake
+configure_args="-Wno-dev -DBUILD_SAMPLES=OFF -DBUILD_TESTS=ON"
+hostmakedepends="pkg-config"
+makedepends="libva-devel libdrm-devel intel-gmmlib-devel"
+short_desc="Intel Media SDK"
+maintainer="Stefano Ragni <st3r4g@protonmail.com>"
+license="MIT, BSD-3-Clause"
+homepage="https://github.com/Intel-Media-SDK/MediaSDK"
+distfiles="https://github.com/Intel-Media-SDK/MediaSDK/archive/refs/tags/intel-mediasdk-${version}.tar.gz"
+checksum=197acd056f81e9ff1c27068d50e8c84c2014d94c7ac17cad69d5c2d61e445fd3
+
+post_install() {
+	vlicense LICENSE
+}
+
+libmfx_package() {
+	depends="${makedepends} ${sourcepkg}-${version}_${revision}"
+	short_desc="Intel MediaSDK mfx lib"
+	pkg_install() {
+		vmove usr/lib/mfx
+		vmove "usr/lib/libmfx*.so*"
+	}
+}
+
+libmfx-devel_package() {
+	depends="${makedepends} ${sourcepkg}-${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/pkgconfig
+	}
+}
diff --git a/srcpkgs/intel-media-sdk/update b/srcpkgs/intel-media-sdk/update
new file mode 100644
index 000000000000..434a2bc67f7a
--- /dev/null
+++ b/srcpkgs/intel-media-sdk/update
@@ -0,0 +1 @@
+pkgname=intel-media
diff --git a/srcpkgs/libmfx b/srcpkgs/libmfx
new file mode 120000
index 000000000000..8ffc7099c227
--- /dev/null
+++ b/srcpkgs/libmfx
@@ -0,0 +1 @@
+intel-media-sdk
\ No newline at end of file
diff --git a/srcpkgs/libmfx-devel b/srcpkgs/libmfx-devel
new file mode 120000
index 000000000000..8ffc7099c227
--- /dev/null
+++ b/srcpkgs/libmfx-devel
@@ -0,0 +1 @@
+intel-media-sdk
\ No newline at end of file

From 625cef9ef1b22c1494393d8dd681a09c9fcf26dd Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 18 Dec 2022 01:19:08 -0500
Subject: [PATCH 6/7] ffmpeg: update to 4.4.3_3

---
 srcpkgs/ffmpeg/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index 23a3d5c9967b..c15f70c122af 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
 version=4.4.3
-revision=2
+revision=3
 short_desc="Decoding, encoding and streaming software"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-3.0-or-later"
@@ -27,11 +27,12 @@ makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-deve
  $(vopt_if drm libdrm-devel) $(vopt_if svtav1 libsvt-av1-devel)
  $(vopt_if srt srt-devel) $(vopt_if rist librist-devel)
  $(vopt_if vulkan 'vulkan-loader Vulkan-Headers')
+ $(vopt_if mfx 'libmfx libmfx-devel')
  $(vopt_if nvenc nv-codec-headers) $(vopt_if nvdec nv-codec-headers)"
 depends="ffplay>=${version}_${revision}"
 
 build_options="x265 v4l2 vaapi vdpau vpx fdk_aac aom nvenc sndio pulseaudio
- dav1d zimg webp sofa vulkan drm svtav1 srt rist nvdec"
+ dav1d zimg webp sofa vulkan drm svtav1 srt rist nvdec mfx"
 build_options_default="x265 v4l2 vpx aom sndio pulseaudio dav1d webp vulkan drm srt rist"
 desc_option_srt="Enable support for SRT (Secure, Reliable, Transport)"
 desc_option_rist="Enable support for RIST (Reliable Internet Stream Transport)"
@@ -39,7 +40,8 @@ desc_option_sofa="Enable support for AES SOFA"
 desc_option_webp="Enable support for WebP"
 
 case "$XBPS_TARGET_MACHINE" in
-	i686*|x86_64*) build_options_default+=" vaapi vdpau nvenc nvdec";;
+	i686*) build_options_default+=" vaapi vdpau nvenc nvdec";;
+	x86_64*) build_options_default+=" vaapi vdpau mfx nvenc nvdec";;
 	ppc64*) build_options_default+=" vaapi vdpau";;
 	mips*) CFLAGS="-mnan=legacy";;
 esac
@@ -124,6 +126,7 @@ do_configure() {
 		$(vopt_enable svtav1 libsvtav1) \
 		$(vopt_enable srt libsrt) \
 		$(vopt_enable rist librist) \
+		$(vopt_enable mfx libmfx) \
 		$(vopt_if nvenc '--enable-nvenc') \
 		$(vopt_if nvdec '--enable-nvdec')
 }

From 9462033556302689f53c1bebf2e0aef03677a3bc Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Sun, 18 Dec 2022 01:40:15 -0500
Subject: [PATCH 7/7] igt-gpu-tools: update to version 1.26

---
 ...-loading-failure-in-resolve-function.patch | 63 -------------------
 ...t_edid-Allocate-raw-8-bytes-for-VSDB.patch | 42 -------------
 srcpkgs/igt-gpu-tools/patches/musl.patch      | 16 +++++
 srcpkgs/igt-gpu-tools/template                |  6 +-
 4 files changed, 19 insertions(+), 108 deletions(-)
 delete mode 100644 srcpkgs/igt-gpu-tools/patches/i-g-t-Fix-global-symbol-loading-failure-in-resolve-function.patch
 delete mode 100644 srcpkgs/igt-gpu-tools/patches/igt_edid-Allocate-raw-8-bytes-for-VSDB.patch

diff --git a/srcpkgs/igt-gpu-tools/patches/i-g-t-Fix-global-symbol-loading-failure-in-resolve-function.patch b/srcpkgs/igt-gpu-tools/patches/i-g-t-Fix-global-symbol-loading-failure-in-resolve-function.patch
deleted file mode 100644
index 0c3b554d9949..000000000000
--- a/srcpkgs/igt-gpu-tools/patches/i-g-t-Fix-global-symbol-loading-failure-in-resolve-function.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git lib/igt_halffloat.c lib/igt_halffloat.c
-index 08ab05fc..e5e8a5bd 100644
---- a/lib/igt_halffloat.c
-+++ b/lib/igt_halffloat.c
-@@ -24,6 +24,19 @@
- 
- #include <assert.h>
- #include <math.h>
-+#include <stdbool.h>
-+
-+#ifdef HAVE_CPUID_H
-+#include <cpuid.h>
-+#else
-+#define __get_cpuid_max(x, y) 0
-+#define __cpuid(level, a, b, c, d) a = b = c = d = 0
-+#define __cpuid_count(level, count, a, b, c, d) a = b = c = d = 0
-+#endif
-+
-+#ifndef bit_F16C
-+#define bit_F16C	(1 << 29)
-+#endif
- 
- #include "igt_halffloat.h"
- #include "igt_x86.h"
-@@ -182,6 +195,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
- 
- #pragma GCC pop_options
- 
-+static bool f16c_is_supported(void)
-+{
-+	unsigned max = __get_cpuid_max(0, NULL);
-+	unsigned eax, ebx, ecx, edx;
-+
-+	if (max >= 1) {
-+		__cpuid(1, eax, ebx, ecx, edx);
-+
-+		if (ecx & bit_F16C)
-+			return true;
-+	}
-+	return false;
-+}
-+
- static void float_to_half(const float *f, uint16_t *h, unsigned int num)
- {
- 	for (int i = 0; i < num; i++)
-@@ -196,7 +223,7 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
- 
- static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
- {
--	if (igt_x86_features() & F16C)
-+	if (f16c_is_supported())
- 		return float_to_half_f16c;
- 
- 	return float_to_half;
-@@ -207,7 +234,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
- 
- static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
- {
--	if (igt_x86_features() & F16C)
-+	if (f16c_is_supported())
- 		return half_to_float_f16c;
- 
- 	return half_to_float;
diff --git a/srcpkgs/igt-gpu-tools/patches/igt_edid-Allocate-raw-8-bytes-for-VSDB.patch b/srcpkgs/igt-gpu-tools/patches/igt_edid-Allocate-raw-8-bytes-for-VSDB.patch
deleted file mode 100644
index 7cc9e289305c..000000000000
--- a/srcpkgs/igt-gpu-tools/patches/igt_edid-Allocate-raw-8-bytes-for-VSDB.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 2107b0a53692fb329175bc16169c3699712187aa Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 27 Feb 2021 14:10:41 -0800
-Subject: [PATCH] lib/igt_edid: Allocate raw 8-bytes for VSDB
-
-hdmi_vsdb is an element of cea_vsdb which makes the size of cea_vsdb to
-be 8 ( 3bytes ieee_oui ) + ( 5bytes hdmi_vsdb struct), its true that we
-only use 7 bytes technically we can only allocate 7byte array but since
-we are writing to elements of hdmi_vsdb struct which is sitting at offet
-4-8 in cea_vsdb, compiler thinks we have an element which is out of
-array bounds since out allocated size is 7bytes
-
-This errors out
-../git/lib/igt_edid.c:365:13: error: array subscript 'struct hdmi_vsdb[0]' is partly outside array bounds of 'char[7]' [-Werror=array-bounds]
-  365 |         hdmi->src_phy_addr[0] = 0x10;
-      |             ^~
-
-allocating one extra byte matches with size of cea_vsdb and compiler is
-happy
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Reviewed-by: Martin Peres <martin.peres@mupuf.org>
----
- lib/igt_edid.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/igt_edid.c b/lib/igt_edid.c
-index 1c85486d..ce09cc47 100644
---- a/lib/igt_edid.c
-+++ b/lib/igt_edid.c
-@@ -351,7 +351,7 @@ void cea_sad_init_pcm(struct cea_sad *sad, int channels,
- const struct cea_vsdb *cea_vsdb_get_hdmi_default(size_t *size)
- {
- 	/* We'll generate a VSDB with 2 extension fields. */
--	static char raw[CEA_VSDB_HDMI_MIN_SIZE + 2] = {0};
-+	static char raw[CEA_VSDB_HDMI_MIN_SIZE + 3] = {0};
- 	struct cea_vsdb *vsdb;
- 	struct hdmi_vsdb *hdmi;
- 
--- 
-GitLab
-
diff --git a/srcpkgs/igt-gpu-tools/patches/musl.patch b/srcpkgs/igt-gpu-tools/patches/musl.patch
index 1c1335162e56..602c48625826 100644
--- a/srcpkgs/igt-gpu-tools/patches/musl.patch
+++ b/srcpkgs/igt-gpu-tools/patches/musl.patch
@@ -181,3 +181,19 @@ index 13ce85b..ceb2e6d 100644
          int i;
  
          fbo = bo->map;
+lib/ioctl_wrappers.c.new
+--- a/benchmarks/gem_exec_tracer.c	2022-12-18 10:32:15.742341964 -0500
++++ b/benchmarks/gem_exec_tracer.c	2022-12-18 10:32:09.862211372 -0500
+@@ -275,7 +275,11 @@
+     DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2)
+ 
+ int
++#if defined(__GLIBC__) || defined(__FreeBSD__)
+ ioctl(int fd, unsigned long request, ...)
++#else
++ioctl(int fd, int request, ...)
++#endif
+ {
+ 	struct trace *t, **p;
+ 	va_list args;
+
diff --git a/srcpkgs/igt-gpu-tools/template b/srcpkgs/igt-gpu-tools/template
index 02f6cc4bba66..159bfd0bdc21 100644
--- a/srcpkgs/igt-gpu-tools/template
+++ b/srcpkgs/igt-gpu-tools/template
@@ -1,7 +1,7 @@
 # Template file for 'igt-gpu-tools'
 pkgname=igt-gpu-tools
-version=1.25
-revision=6
+version=1.26
+revision=1
 build_style=meson
 configure_args="-Db_ndebug=false -Db_lto=false"
 # b_lto=true makes the build hang at a random point
@@ -14,7 +14,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://gitlab.freedesktop.org/drm/igt-gpu-tools"
 distfiles="${XORG_SITE}/app/${pkgname}-${version}.tar.xz"
-checksum=40454d8f0484ea2477862007398a08eef78a6c252c4defce1c934548593fdd11
+checksum=36d4193b9f22fbb4834ec97be3bb6322ec901e20f7be018f0a50d3eb03ec9bb7
 # tests don't behave in containers
 make_check=ci-skip
 

  parent reply	other threads:[~2023-03-23 13:32 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 14:40 [PR PATCH] [WIP] " zlice
2022-12-16 14:43 ` [PR PATCH] [Updated] " zlice
2022-12-16 14:45 ` zlice
2022-12-16 16:33 ` zlice
2022-12-16 17:27 ` zlice
2022-12-16 17:33 ` zlice
2022-12-16 18:11 ` zlice
2022-12-16 19:03 ` zlice
2022-12-16 21:37 ` zlice
2022-12-16 22:28 ` zlice
2022-12-18  5:29 ` [PR PATCH] [Updated] " zlice
2022-12-18  6:19 ` zlice
2022-12-18  6:25 ` zlice
2022-12-18  6:49 ` [PR PATCH] [Updated] " zlice
2022-12-18 11:31 ` classabbyamp
2022-12-18 15:41 ` [PR PATCH] [Updated] " zlice
2022-12-18 19:47 ` zlice
2022-12-19  3:02 ` zlice
2022-12-19  3:02 ` zlice
2022-12-20 15:10 ` zlice
2023-01-14  4:09 ` [PR PATCH] [Updated] " zlice
2023-01-14  4:15 ` zlice
2023-01-20 14:10 ` [PR PATCH] [Updated] " zlice
2023-01-20 15:48 ` icp1994
2023-01-20 16:00 ` zlice
2023-01-20 16:02 ` icp1994
2023-01-20 16:04 ` zlice
2023-01-25 11:29 ` Anachron
2023-01-25 12:50 ` icp1994
2023-01-26 11:05 ` Anachron
2023-02-08  9:08 ` Anachron
2023-02-08  9:10 ` Anachron
2023-02-08  9:11 ` Anachron
2023-02-08 12:25 ` zlice
2023-02-08 14:15 ` [PR PATCH] [Updated] " zlice
2023-02-08 14:21 ` zlice
2023-02-08 15:34 ` zlice
2023-02-08 15:54 ` zlice
2023-02-08 15:55 ` [PR PATCH] [Updated] " zlice
2023-02-08 15:57 ` zlice
2023-02-10  7:18 ` icp1994
2023-02-10  7:20 ` icp1994
2023-03-23 13:32 ` zlice [this message]
2023-03-23 13:33 ` zlice
2023-04-27 17:45 ` ja-cop
2023-04-27 18:01 ` zlice
2023-04-27 18:02 ` zlice
2023-04-27 22:10 ` ja-cop
2023-04-27 23:43 ` zlice
2023-04-27 23:54 ` ja-cop
2023-04-28 13:38 ` zlice
2023-04-28 15:56 ` ja-cop
2023-05-05 12:52 ` [PR PATCH] [Updated] " zlice
2023-05-05 12:53 ` zlice
2023-05-22 15:56 ` [PR PATCH] [Updated] " zlice
2023-05-22 15:58 ` zlice
2023-06-19 20:21 ` [PR PATCH] [Updated] " zlice
2023-06-20  6:52 ` Anachron
2023-06-20 10:43 ` zlice
2023-06-22 12:23 ` zlice
2023-06-22 12:23 ` [PR PATCH] [Updated] " zlice
2023-07-04 15:23 ` zlice
2023-07-04 15:24 ` zlice
2023-07-04 17:17 ` Anachron
2023-08-02 14:01 ` [PR PATCH] [Updated] " zlice
2023-11-01  1:46 ` github-actions
2023-11-15  1:46 ` [PR PATCH] [Closed]: " github-actions
2023-11-20 12:54 ` zlice
2024-01-10 22:49 ` mdkcore0

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=20230323133251.hGHZt0sitIzEjk0DiW_lUO5G4ucyJ68s90ZoL5L9mEk@z \
    --to=zlice@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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;
as well as URLs for NNTP newsgroup(s).