GNU bug report logs - #36814
[PATCH 0/2] Add VA-API Intel back-end and utilities

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Fri, 26 Jul 2019 03:28:01 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36814 in the body.
You can then email your comments to 36814 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 03:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 26 Jul 2019 03:28:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Guix-patches <guix-patches <at> gnu.org>
Subject: [PATCH 0/2] Add VA-API Intel back-end and utilities
Date: Fri, 26 Jul 2019 05:27:36 +0200
[Message part 1 (text/plain, inline)]
Guix,

The following patches add the VA-API back end for Intel GEN chips 
as well as libva-utils (which provides vainfo amongst many other 
things).  I've tested them on my Ivy Bridge laptop and they work 
wonderfully.

However.

libva (I guess) searches for the back end in mesa's store output 
by default:

--8<---------------cut here---------------start------------->8---
vainfo 
libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns 0
libva info: Trying to open 
/gnu/store/clhrbkacyrclwzkzdj2ql8y572whwjzi-mesa-19.1.1/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
--8<---------------cut here---------------end--------------->8---

I don't know enough about libva or mesa to know how all this can 
be made to compose nicely.

I just tested and enjoyed VA-API acceleration by (icky icky boo 
boo) copying intel-vaapi-driver's library to the mesa store 
directory, so I need help in more ways than one.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 03:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36814 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: Add intel-vaapi-driver.
Date: Fri, 26 Jul 2019 05:30:36 +0200
* gnu/packages/video.scm (intel-vaapi-driver): New public variable.
---
 gnu/packages/video.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 4b9e05edfe..f068c5df65 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2695,6 +2695,44 @@ of modern, widely supported codecs.")
     ;; Combination under GPLv2.  See LICENSE.
     (license license:gpl2)))
 
+(define-public intel-vaapi-driver
+  (package
+    (name "intel-vaapi-driver")
+    (version "2.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
+                           "releases/download/" version "/intel-vaapi-driver-"
+                           version ".tar.bz2"))
+       (sha256
+        (base32 "1qyzxh3p8cw4fv8bz9zd4kc8hajlaps7xryzh6pad814n3m5sbjw"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libdrm" ,libdrm)
+       ("libva" ,libva)
+       ("libx11" ,libx11)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'set-up-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
+               #t))))))
+    (home-page "https://01.org/linuxmedia/vaapi")
+    (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
+    (description
+     "This is the @acronym{VA-API, Video Acceleration API} back end required for
+for hardware-accelerated video processing on Intel GEN Graphics devices
+supported by the i915 driver, such as integrated Intel HD Graphics.  It provides
+access to both hardware and shader functionality for faster encoding, decoding,
+and post-processing video formats like MPEG2, H.264/AVC, and VC-1.")
+    (license (list license:bsd-2        ; src/gen9_vp9_const_def.c
+                   license:expat))))    ; the rest, excluding the test suite
+
 (define-public openh264
   (package
     (name "openh264")
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 03:31:02 GMT) Full text and rfc822 format available.

Message #11 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36814 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Add libva-utils.
Date: Fri, 26 Jul 2019 05:30:37 +0200
* gnu/packages/video.scm (libva-utils): New public variable.
---
 gnu/packages/video.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index f068c5df65..e16dd13765 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -753,6 +753,40 @@ entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
     (license license:expat)))
 
+(define-public libva-utils
+  (package
+    (name "libva-utils")
+    (version "2.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
+                           version "/libva-utils-" version ".tar.bz2"))
+       (sha256
+        (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--enable-wayland"
+             "--enable-x11")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libdrm" ,libdrm)
+       ("libva" ,libva)
+       ("libx11" ,libx11)
+       ("mesa" ,mesa)
+       ("wayland" ,wayland)))
+    (home-page "https://01.org/linuxmedia/vaapi")
+    (synopsis "Collection of testing utilities for VA-API")
+    (description
+     "This is a collection of utilities and examples to query and test the
+@acronym{VA-API, Video Acceleration API} implemented by the libva library.
+
+These tools require a supported graphics chip, driver, and VA-API back end to
+operate properly.")
+    (license license:expat)))
+
 (define-public ffmpeg
   (package
     (name "ffmpeg")
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 08:18:02 GMT) Full text and rfc822 format available.

Message #14 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities
Date: Fri, 26 Jul 2019 10:17:11 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches 写道:
> I don't know enough about libva or mesa to know how all this can 
> be
> made to compose nicely.

It's actually as simple as exporting 
LIBVA_DRIVERS_PATH="<intel-vaapi-driver>/lib/dri".

I guess making that a search-path for libva should work?

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 08:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities
Date: Fri, 26 Jul 2019 10:56:24 +0200
Hey Tobias,

Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> writes:

> Tobias Geerinckx-Rice via Guix-patches 写道:
>> I don't know enough about libva or mesa to know how all this can 
>> be
>> made to compose nicely.
>
> It's actually as simple as exporting 
> LIBVA_DRIVERS_PATH="<intel-vaapi-driver>/lib/dri".
A cursory check using the LIBVA_DRIVERS_PATH workaround on a youtube
video using mpv seems to indicate that your packages work wonderfully
(~16% cpu load normally -> ~5% cpu load with vaapi flags).

Thanks for working on this!
>
> I guess making that a search-path for libva should work?
I do not see why not.

>
> Kind regards,
>
> T G-R




Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 18:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Jelle Licht <jlicht <at> fsfe.org>
Cc: 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities
Date: Fri, 26 Jul 2019 19:58:53 +0200
[Message part 1 (text/plain, inline)]
Jelle,

Thank you for testing!

Jelle Licht 写道:
> A cursory check using the LIBVA_DRIVERS_PATH workaround on a 
> youtube
> video using mpv seems to indicate that your packages work 
> wonderfully
> (~16% cpu load normally -> ~5% cpu load with vaapi flags).

On my Intel Corporation 3rd Gen Core processor Graphics 
Controller, the results were even more exciting: from ~35% to ~7% 
CPU load while playing a 720p H.264 film.  That's a factor of 5.

Sadly, my hardware's too old to accelerate H.265 (HEVC) stream 
(they play just fine on the CPU), but even so: a significant 
majority of my media collection just got significantly 
accelerated…  for free!  \o/

I love this business,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Fri, 26 Jul 2019 18:41:02 GMT) Full text and rfc822 format available.

Message #23 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36814 <at> debbugs.gnu.org
Subject: [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide LIBVA_DRIVERS_PATH.
Date: Fri, 26 Jul 2019 20:40:40 +0200
* gnu/packages/video.scm (intel-vaapi-driver)[native-search-paths]:
Export LIBVA_DRIVERS_PATH when installed.
(libva-without-mesa)[native-search-paths]: Don't inherit any.
---

Guix,

This ties the two together.

I'm leaving the enormocomment in so I don't have to repeat it here, but I'm less sure about it now than when I wrote it.  I thought this was a filthy hack, but maybe it's just mildly unconventional ;-)  The documentation is very sparse indeed.

I don't see any acceptable alternative.

Stormy regards,

T G-R

 gnu/packages/gl.scm    |  3 ++-
 gnu/packages/video.scm | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 9ed043c7ae..9495e8ee24 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -219,7 +219,8 @@ also known as DXTn or DXTC) for Mesa.")
         '(#:make-flags)
         (substitute-keyword-arguments (package-arguments libva)
           ((#:configure-flags flags)
-           '(list "--disable-glx" "--disable-egl"))))))))
+           '(list "--disable-glx" "--disable-egl")))))
+      (native-search-paths '()))))
 
 (define-public mesa
   (package
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b441c5e311..5e26b4c2dc 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2756,6 +2756,19 @@ of modern, widely supported codecs.")
              (let ((out (assoc-ref outputs "out")))
                (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
                #t))))))
+    ;; XXX This variable is actually respected by libva, and in a perfect world
+    ;; would be found there instead.  Unfortunately, native-search-paths are set
+    ;; up only if the package using them is installed directly into the profile.
+    ;; This means that users would need to install libva into their profile for
+    ;; no good reason other than convincing Guix to export the right paths, or
+    ;; that every single one of libva's many dependents would would need to be
+    ;; modified instead (and would still be semantically dubious).  Moving it
+    ;; here is logically (almost) equivalent, and keeps this hack confined to a
+    ;; tiny handful of back-end packages.
+    (native-search-paths
+     (list (search-path-specification
+            (variable "LIBVA_DRIVERS_PATH")
+            (files '("lib/dri")))))
     (home-page "https://01.org/linuxmedia/vaapi")
     (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
     (description
-- 
2.22.0





Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 18:27:01 GMT) Full text and rfc822 format available.

Message #26 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide
 LIBVA_DRIVERS_PATH.
Date: Sat, 27 Jul 2019 20:26:16 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> writes:

> * gnu/packages/video.scm (intel-vaapi-driver)[native-search-paths]:
> Export LIBVA_DRIVERS_PATH when installed.

Can this be squashed into patch 1/2 in this series?

> (libva-without-mesa)[native-search-paths]: Don't inherit any.

...and this added in a separate patch, so that the intel-vaapi-driver
change does not have to go through 'staging'?

> I'm leaving the enormocomment in so I don't have to repeat it here, but I'm less sure about it now than when I wrote it.  I thought this was a filthy hack, but maybe it's just mildly unconventional ;-)  The documentation is very sparse indeed.

The comment could perhaps be shortened by including a link to
<https://issues.guix.gnu.org/issue/22138>.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 18:36:02 GMT) Full text and rfc822 format available.

Message #29 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 1/2] gnu: Add intel-vaapi-driver.
Date: Sat, 27 Jul 2019 20:35:38 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> writes:

> * gnu/packages/video.scm (intel-vaapi-driver): New public variable.
> ---
>  gnu/packages/video.scm | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 4b9e05edfe..f068c5df65 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -2695,6 +2695,44 @@ of modern, widely supported codecs.")
>      ;; Combination under GPLv2.  See LICENSE.
>      (license license:gpl2)))
>  
> +(define-public intel-vaapi-driver
> +  (package
> +    (name "intel-vaapi-driver")
> +    (version "2.3.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
> +                           "releases/download/" version "/intel-vaapi-driver-"
> +                           version ".tar.bz2"))
> +       (sha256
> +        (base32 "1qyzxh3p8cw4fv8bz9zd4kc8hajlaps7xryzh6pad814n3m5sbjw"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("libdrm" ,libdrm)
> +       ("libva" ,libva)
> +       ("libx11" ,libx11)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'configure 'set-up-directories
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
> +               #t))))))

Can this be passed in #:configure-flags?  What does it do, anyway?  :-)

> +    (home-page "https://01.org/linuxmedia/vaapi")
> +    (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
> +    (description
> +     "This is the @acronym{VA-API, Video Acceleration API} back end required for
> +for hardware-accelerated video processing on Intel GEN Graphics devices
> +supported by the i915 driver, such as integrated Intel HD Graphics.  It provides
> +access to both hardware and shader functionality for faster encoding, decoding,
> +and post-processing video formats like MPEG2, H.264/AVC, and VC-1.")

I suppose we should limit this driver to i686-linux and x86_64-linux only.

LGTM, looking forward to try it!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 18:38:02 GMT) Full text and rfc822 format available.

Message #32 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 2/2] gnu: Add libva-utils.
Date: Sat, 27 Jul 2019 20:37:46 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> writes:

> * gnu/packages/video.scm (libva-utils): New public variable.
> ---
>  gnu/packages/video.scm | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index f068c5df65..e16dd13765 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -753,6 +753,40 @@ entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
>  standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
>      (license license:expat)))
>  
> +(define-public libva-utils
> +  (package
> +    (name "libva-utils")
> +    (version "2.5.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
> +                           version "/libva-utils-" version ".tar.bz2"))
> +       (sha256
> +        (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:configure-flags
> +       (list "--enable-wayland"
> +             "--enable-x11")))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("libdrm" ,libdrm)
> +       ("libva" ,libva)
> +       ("libx11" ,libx11)
> +       ("mesa" ,mesa)
> +       ("wayland" ,wayland)))
> +    (home-page "https://01.org/linuxmedia/vaapi")
> +    (synopsis "Collection of testing utilities for VA-API")
> +    (description
> +     "This is a collection of utilities and examples to query and test the
> +@acronym{VA-API, Video Acceleration API} implemented by the libva library.
> +
> +These tools require a supported graphics chip, driver, and VA-API back end to
> +operate properly.")
> +    (license license:expat)))

LGTM.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 18:51:01 GMT) Full text and rfc822 format available.

Message #35 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide
 LIBVA_DRIVERS_PATH.
Date: Sat, 27 Jul 2019 20:50:30 +0200
[Message part 1 (text/plain, inline)]
Marius Bakke 写道:
> Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> 
> writes:
>
>> * gnu/packages/video.scm 
>> (intel-vaapi-driver)[native-search-paths]:
>> Export LIBVA_DRIVERS_PATH when installed.
>
> Can this be squashed into patch 1/2 in this series?

Sure.  I wasn't really going to merge this as FREE BONUS PATCH, 
don't worry.

>> (libva-without-mesa)[native-search-paths]: Don't inherit any.
>
> ..and this added in a separate patch, so that the 
> intel-vaapi-driver
> change does not have to go through 'staging'?

Are you sure?  This hunk is here to keep the mesa derivation 
unchanged.  Removing (or delaying) it *will* cause all of mesa's 
1436 dependents to be rebuilt.  I don't think we want that.

>> I'm leaving the enormocomment in so I don't have to repeat it 
>> here, but I'm less sure about it now than when I wrote it.  I 
>> thought this was a filthy hack, but maybe it's just mildly 
>> unconventional ;-)  The documentation is very sparse indeed.
>
> The comment could perhaps be shortened by including a link to
> <https://issues.guix.gnu.org/issue/22138>.

Oh thank gods yes.  I missed that bug.  I'm glad this is 
considered important.  For now, this workaround + a link seems 
acceptable to me.

Thanks!

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 19:02:01 GMT) Full text and rfc822 format available.

Message #38 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 1/2] gnu: Add intel-vaapi-driver.
Date: Sat, 27 Jul 2019 21:00:56 +0200
[Message part 1 (text/plain, inline)]
Marius,

Marius Bakke 写道:
> Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> 
> writes:
>
>> * gnu/packages/video.scm (intel-vaapi-driver): New public 
>> variable.
>> ---
>>  gnu/packages/video.scm | 38 
>>  ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 38 insertions(+)
>>
>> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
>> index 4b9e05edfe..f068c5df65 100644
>> --- a/gnu/packages/video.scm
>> +++ b/gnu/packages/video.scm
>> @@ -2695,6 +2695,44 @@ of modern, widely supported codecs.")
>>      ;; Combination under GPLv2.  See LICENSE.
>>      (license license:gpl2)))
>>  
>> +(define-public intel-vaapi-driver
>> +  (package
>> +    (name "intel-vaapi-driver")
>> +    (version "2.3.0")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (string-append 
>> "https://github.com/intel/intel-vaapi-driver/"
>> +                           "releases/download/" version 
>> "/intel-vaapi-driver-"
>> +                           version ".tar.bz2"))
>> +       (sha256
>> +        (base32 
>> "1qyzxh3p8cw4fv8bz9zd4kc8hajlaps7xryzh6pad814n3m5sbjw"))))
>> +    (build-system gnu-build-system)
>> +    (native-inputs
>> +     `(("pkg-config" ,pkg-config)))
>> +    (inputs
>> +     `(("libdrm" ,libdrm)
>> +       ("libva" ,libva)
>> +       ("libx11" ,libx11)))
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before 'configure 'set-up-directories
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out")))
>> +               (setenv "LIBVA_DRIVERS_PATH" (string-append out 
>> "/lib/dri"))
>> +               #t))))))
>
> Can this be passed in #:configure-flags?  What does it do, 
> anyway?  :-)
>
>> +    (home-page "https://01.org/linuxmedia/vaapi")
>> +    (synopsis "VA-API video acceleration driver for Intel GEN 
>> Graphics devices")
>> +    (description
>> +     "This is the @acronym{VA-API, Video Acceleration API} 
>> back end required for
>> +for hardware-accelerated video processing on Intel GEN 
>> Graphics devices
>> +supported by the i915 driver, such as integrated Intel HD 
>> Graphics.  It provides
>> +access to both hardware and shader functionality for faster 
>> encoding, decoding,
>> +and post-processing video formats like MPEG2, H.264/AVC, and 
>> VC-1.")
>
> I suppose we should limit this driver to i686-linux and 
> x86_64-linux only.

That is a very good point.

> LGTM, looking forward to try it!

Thanks!

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 19:09:02 GMT) Full text and rfc822 format available.

Message #41 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Marius Bakke <mbakke <at> fastmail.com>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide
 LIBVA_DRIVERS_PATH.
Date: Sat, 27 Jul 2019 21:08:01 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches 写道:
> Marius Bakke 写道:
>> Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org>
>> writes:
>>> (libva-without-mesa)[native-search-paths]: Don't inherit any.
>>
>> ..and this added in a separate patch, so that the 
>> intel-vaapi-driver
>> change does not have to go through 'staging'?
>
> Are you sure?  This hunk is here to keep the mesa derivation
> unchanged.  Removing (or delaying) it *will* cause all of mesa's 
> 1436
> dependents to be rebuilt.  I don't think we want that.

Actually, we're both wrong.  Yay!

This is a forgotten left-over from when the native-search-paths 
were in libva.  Now that they're not, it's useless & should just 
be dropped.

Right.  Right?

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 19:14:01 GMT) Full text and rfc822 format available.

Message #44 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide
 LIBVA_DRIVERS_PATH.
Date: Sat, 27 Jul 2019 21:13:31 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Marius Bakke 写道:
>> Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org> 
>> writes:
>>
>>> * gnu/packages/video.scm 
>>> (intel-vaapi-driver)[native-search-paths]:
>>> Export LIBVA_DRIVERS_PATH when installed.
>>
>> Can this be squashed into patch 1/2 in this series?
>
> Sure.  I wasn't really going to merge this as FREE BONUS PATCH, 
> don't worry.
>
>>> (libva-without-mesa)[native-search-paths]: Don't inherit any.
>>
>> ..and this added in a separate patch, so that the 
>> intel-vaapi-driver
>> change does not have to go through 'staging'?
>
> Are you sure?  This hunk is here to keep the mesa derivation 
> unchanged.  Removing (or delaying) it *will* cause all of mesa's 
> 1436 dependents to be rebuilt.  I don't think we want that.

I don't see 'libva' being changed anywhere in this series?  The search
path is added for intel-vaapi-driver only, no?

But then, it's 32 degrees here in Trondheim and I just returned from a
hike, so I have probably missed something.

Leaving libva-without-mesa unchanged was my intent too, so I think we
are all good.  :-)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36814; Package guix-patches. (Sat, 27 Jul 2019 19:18:01 GMT) Full text and rfc822 format available.

Message #47 received at 36814 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 36814 <at> debbugs.gnu.org
Subject: Re: [bug#36814] [BONUS PATCH 3/2] gnu: intel-vaapi-driver: Provide
 LIBVA_DRIVERS_PATH.
Date: Sat, 27 Jul 2019 21:16:58 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Tobias Geerinckx-Rice via Guix-patches 写道:
>> Marius Bakke 写道:
>>> Tobias Geerinckx-Rice via Guix-patches <guix-patches <at> gnu.org>
>>> writes:
>>>> (libva-without-mesa)[native-search-paths]: Don't inherit any.
>>>
>>> ..and this added in a separate patch, so that the 
>>> intel-vaapi-driver
>>> change does not have to go through 'staging'?
>>
>> Are you sure?  This hunk is here to keep the mesa derivation
>> unchanged.  Removing (or delaying) it *will* cause all of mesa's 
>> 1436
>> dependents to be rebuilt.  I don't think we want that.
>
> Actually, we're both wrong.  Yay!
>
> This is a forgotten left-over from when the native-search-paths 
> were in libva.  Now that they're not, it's useless & should just 
> be dropped.
>
> Right.  Right?

Right!  LGTM, thanks!

(...please disregard the other message...)
[signature.asc (application/pgp-signature, inline)]

Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Sat, 27 Jul 2019 21:30:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Sat, 27 Jul 2019 21:30:03 GMT) Full text and rfc822 format available.

Message #52 received at 36814-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36814-done <at> debbugs.gnu.org
Subject: Re: [bug#36814] [PATCH 0/2] Add VA-API Intel back-end and utilities
Date: Sat, 27 Jul 2019 23:29:35 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice via Guix-patches 写道:
> Guix,
>
> The following patches add the VA-API back end for Intel GEN 
> chips as
> well as libva-utils (which provides vainfo amongst many other 
> things).

Pushed atop master as 3563220e1e46b8a1b9af1e3a4c6cb3f9560c2460 &c.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 25 Aug 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.