Linux Kernel 4.10 vs Intensity Pro 4K

Getting started with a Blackmagic product? Ask questions here about setup and installation.
  • Author
  • Message
Offline
User avatar

Michael Reilly

  • Posts: 7
  • Joined: Mon Apr 17, 2017 11:19 pm
  • Location: Atlanta, GA

Linux Kernel 4.10 vs Intensity Pro 4K

PostMon Apr 17, 2017 11:28 pm

Hello,

I get the following error in the DKMS log when installing the deb packages via dpkg under Kubuntu 17.04:

Code: Select all
/var/lib/dkms/blackmagic/10.8.6a3/build/blackmagic_lib.c: In function 'dl_get_user_pages':
/var/lib/dkms/blackmagic/10.8.6a3/build/blackmagic_lib.c:669:10: error: too few arguments to function 'get_user_pages_remote'
    ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
          ^~~~~~~~~~~~~~~~~~~~~


There seems to be another few drivers such as nvidia's that were also broken by the API change in 4.10 (apparently.)

Is this a known issue with a patch I can apply or an updated .deb I can download? Or should I construct one? I do have a coding background, but only a little experience with linux drivers. And rebuilding .deb files is a minor pain in the neck. :)
Offline
User avatar

Michael Reilly

  • Posts: 7
  • Joined: Mon Apr 17, 2017 11:19 pm
  • Location: Atlanta, GA

Re: Linux Kernel 4.10 vs Intensity Pro 4K

PostSat Apr 22, 2017 6:15 pm

I looked into it and the patch seems to be as simple as:

Code: Select all
--- blackmagic_lib.c   2017-04-22 14:14:48.083501520 -0400
+++ blackmagic_lib.c.new   2017-04-22 14:14:32.055688065 -0400
@@ -662,7 +662,12 @@
       write = 0;

    down_read(&current_task->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(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
+         ret = get_user_pages_remote(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL, NULL);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
       if (current_task == current)
          ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
       else


Can I get someone to confirm that this works for them as well?
Offline
User avatar

Michael Reilly

  • Posts: 7
  • Joined: Mon Apr 17, 2017 11:19 pm
  • Location: Atlanta, GA

Re: Linux Kernel 4.10 vs Intensity Pro 4K

PostSat Apr 22, 2017 6:53 pm

My post hasn't been approved yet, so I cannot update it, so I apologize about the double post. A similar patch must also be made to the blackmagic-io driver in bm_mm.c

Here is the .deb package updated with these changes. It works on my machine, which is a fresh install of Kubuntu 17.04 running kernel 4.10.0-19-generic

Standard disclaimers apply, this is a best effort on my part, don't come crying to me if your computer catches on fire or something.

Also, you shouldn't trust strange software on the internet.

Sha256sum:
450f7d86d2d3a2a760bb5729fd6fafc803de6079d06608e6fd047ee912b28cae desktopvideo_10.8.6a2_amd64.deb

Link:
fixed.space/files/desktopvideo_10.8.6a2_amd64.deb

Return to Getting Started

Who is online

Users browsing this forum: No registered users and 7 guests