summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--01-fix-makefile.patch (renamed from fix-makefile.patch)0
-rw-r--r--02-fix-get_user_pages-and-mmap_lock.patch37
-rw-r--r--03-fix-have_unlocked_ioctl.patch17
-rw-r--r--PKGBUILD10
-rw-r--r--fix-mmap-lock.patch28
6 files changed, 66 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1066237a16b4..fe107f1d5002 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = decklink
pkgdesc = Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards
pkgver = 11.6
- pkgrel = 2
+ pkgrel = 3
url = https://www.blackmagicdesign.com/support/family/capture-and-playback
arch = i686
arch = x86_64
@@ -10,11 +10,13 @@ pkgbase = decklink
options = !strip
options = staticlibs
source = decklink-11.6.tar.gz::https://www.blackmagicdesign.com/api/register/us/download/6b9e675965fc4c3b9ece9e040dff5358
- source = fix-makefile.patch
- source = fix-mmap-lock.patch
+ source = 01-fix-makefile.patch
+ source = 02-fix-get_user_pages-and-mmap_lock.patch
+ source = 03-fix-have_unlocked_ioctl.patch
sha256sums = 008dcbaa019efd69c802e9caa497d719a2774ee6bccf1a57906702ffc60a9563
sha256sums = c5590e0d80a01cf1b232145f43ac7993e924d7552375f747d31169dd934265fd
- sha256sums = 824c3fcfd79196301a4274e51b026945ed72db0d24b8ce272ccef3567b014493
+ sha256sums = 036b1adddc00d217c6a251c829551065cd20bb1f7f7437e378555fd4aa547457
+ sha256sums = 15956507d4bb6b59b6b6cff3c7d9771cd7e653789ea6b3ce686d26bd563d5c0f
pkgname = decklink
install = decklink.install
diff --git a/fix-makefile.patch b/01-fix-makefile.patch
index 8e5f7a8fb4a7..8e5f7a8fb4a7 100644
--- a/fix-makefile.patch
+++ b/01-fix-makefile.patch
diff --git a/02-fix-get_user_pages-and-mmap_lock.patch b/02-fix-get_user_pages-and-mmap_lock.patch
new file mode 100644
index 000000000000..68b378bef3d2
--- /dev/null
+++ b/02-fix-get_user_pages-and-mmap_lock.patch
@@ -0,0 +1,37 @@
+diff --git a/blackmagic-11.6a26/blackmagic_lib.c.orig b/blackmagic-11.6a26/blackmagic_lib.c
+index 83fab89..35b54b5 100644
+--- a/blackmagic-11.6a26/blackmagic_lib.c.orig
++++ b/blackmagic-11.6a26/blackmagic_lib.c
+@@ -670,9 +670,17 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
+ write = 1;
+ else
+ write = 0;
+-
++#if KERNEL_VERSION_OR_LATER(5, 8, 0)
++ down_read(&current_task->mm->mmap_lock);
++#else
+ down_read(&current_task->mm->mmap_sem);
+-#if KERNEL_VERSION_OR_LATER(4, 10, 0)
++#endif
++#if KERNEL_VERSION_OR_LATER(5, 9, 0)
++ if (current_task == current)
++ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
++ else
++ ret = get_user_pages_remote(current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL, NULL);
++#elif KERNEL_VERSION_OR_LATER(4, 10, 0)
+ if (current_task == current)
+ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
+ else
+@@ -692,7 +700,12 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
+ #else
+ ret = get_user_pages(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
+ #endif
++
++#if KERNEL_VERSION_OR_LATER(5, 8, 0)
++ up_read(&current_task->mm->mmap_lock);
++#else
+ up_read(&current_task->mm->mmap_sem);
++#endif
+
+ if (ret < (long)*nr_pages)
+ {
diff --git a/03-fix-have_unlocked_ioctl.patch b/03-fix-have_unlocked_ioctl.patch
new file mode 100644
index 000000000000..edd6b578c009
--- /dev/null
+++ b/03-fix-have_unlocked_ioctl.patch
@@ -0,0 +1,17 @@
+diff --git a/blackmagic-11.6a26/blackmagic_core.c b/blackmagic-11.6a26/blackmagic_core.c
+index 2acbdd6..8d4f332 100644
+--- a/blackmagic-11.6a26/blackmagic_core.c
++++ b/blackmagic-11.6a26/blackmagic_core.c
+@@ -41,6 +41,12 @@
+
+ #include "blackmagic_core.h"
+
++
++/* HAVE_UNLOCKED_IOCTL has been removed in kernel 5.9 */
++#if KERNEL_VERSION_OR_LATER(5, 9, 0)
++# define HAVE_UNLOCKED_IOCTL 1
++#endif
++
+ unsigned long blackmagic_flags = 0;
+ module_param(blackmagic_flags, ulong, S_IRUGO | S_IWUSR);
+
diff --git a/PKGBUILD b/PKGBUILD
index bee37fda188c..469f9d8059b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@ pkgbase=decklink
pkgname=(decklink mediaexpress)
_pkgname=decklink
pkgver=11.6
-pkgrel=2
+pkgrel=3
pkgdesc="Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards"
arch=('i686' 'x86_64')
url="https://www.blackmagicdesign.com/support/family/capture-and-playback"
@@ -30,11 +30,13 @@ DLAGENTS=("https::/usr/bin/curl \
)
source=("${_pkgsrc_file}"::"${_pkgsrc_url}"
- "fix-makefile.patch"
- "fix-mmap-lock.patch")
+ "01-fix-makefile.patch"
+ "02-fix-get_user_pages-and-mmap_lock.patch"
+ "03-fix-have_unlocked_ioctl.patch")
sha256sums=('008dcbaa019efd69c802e9caa497d719a2774ee6bccf1a57906702ffc60a9563'
'c5590e0d80a01cf1b232145f43ac7993e924d7552375f747d31169dd934265fd'
- '824c3fcfd79196301a4274e51b026945ed72db0d24b8ce272ccef3567b014493')
+ '036b1adddc00d217c6a251c829551065cd20bb1f7f7437e378555fd4aa547457'
+ '15956507d4bb6b59b6b6cff3c7d9771cd7e653789ea6b3ce686d26bd563d5c0f')
prepare() {
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch}
diff --git a/fix-mmap-lock.patch b/fix-mmap-lock.patch
deleted file mode 100644
index 3c1780da47da..000000000000
--- a/fix-mmap-lock.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/blackmagic-11.6a26/blackmagic_lib.c b/blackmagic-11.6a26/blackmagic_lib.c
-index 83fab89..95f7c44 100644
---- a/blackmagic-11.6a26/blackmagic_lib.c
-+++ b/blackmagic-11.6a26/blackmagic_lib.c
-@@ -671,7 +671,11 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
- else
- write = 0;
-
-+#if KERNEL_VERSION_OR_LATER(5, 8, 0)
-+ down_read(&current_task->mm->mmap_lock);
-+#else
- down_read(&current_task->mm->mmap_sem);
-+#endif
- #if KERNEL_VERSION_OR_LATER(4, 10, 0)
- if (current_task == current)
- ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
-@@ -692,7 +696,11 @@ dl_get_user_pages(void *task_ptr, void *ptr, unsigned long size, unsigned long *
- #else
- ret = get_user_pages(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
- #endif
-+#if KERNEL_VERSION_OR_LATER(5, 8, 0)
-+ up_read(&current_task->mm->mmap_lock);
-+#else
- up_read(&current_task->mm->mmap_sem);
-+#endif
-
- if (ret < (long)*nr_pages)
- {