[arch-commits] Commit in libdrm/repos (7 files)
Laurent Carlier
lcarlier at archlinux.org
Sun Sep 2 12:43:34 UTC 2018
Date: Sunday, September 2, 2018 @ 12:43:34
Author: lcarlier
Revision: 333201
archrelease: copy trunk to testing-x86_64
Added:
libdrm/repos/testing-x86_64/
libdrm/repos/testing-x86_64/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch
(from rev 333200, libdrm/trunk/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch)
libdrm/repos/testing-x86_64/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch
(from rev 333200, libdrm/trunk/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch)
libdrm/repos/testing-x86_64/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch
(from rev 333200, libdrm/trunk/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch)
libdrm/repos/testing-x86_64/COPYING
(from rev 333200, libdrm/trunk/COPYING)
libdrm/repos/testing-x86_64/PKGBUILD
(from rev 333200, libdrm/trunk/PKGBUILD)
libdrm/repos/testing-x86_64/no-drmdevice-test.diff
(from rev 333200, libdrm/trunk/no-drmdevice-test.diff)
-----------------------------------------------------------------+
0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch | 81 ++++++++++
0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch | 27 +++
0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch | 52 ++++++
COPYING | 48 +++++
PKGBUILD | 67 ++++++++
no-drmdevice-test.diff | 9 +
6 files changed, 284 insertions(+)
Copied: libdrm/repos/testing-x86_64/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch (from rev 333200, libdrm/trunk/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch)
===================================================================
--- testing-x86_64/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch (rev 0)
+++ testing-x86_64/0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,81 @@
+From bcb9d976cd91c018aa4eef13563813288984601f Mon Sep 17 00:00:00 2001
+From: Emil Velikov <emil.velikov at collabora.com>
+Date: Thu, 23 Aug 2018 10:49:54 +0100
+Subject: [PATCH 1/3] xf86drm: fallback to normal path when realpath fails
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Earlier commit reworked our sysfs handling to use realpath.
+Sadly that backfired since the Firefox sandboxing mechanism rejects
+that. Despite the files/folders being in the allowed list, of the
+sandboxing mechanism.
+
+Oddly enough, the Chromium sandboxing doesn't complain about any of
+this.
+
+Since there are no Firefox releases with the fix, add a temporary
+solution which falls back to the original handling.
+
+Sadly, this won't work for virgl.
+
+v2: drop return type - function cannot return NULL (Eric)
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107516
+Fixes: a02900133b3 ("xf86drm: introduce a get_real_pci_path() helper")
+Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
+Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
+Tested-by: Michel Dänzer <michel.daenzer at amd.com>
+Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
+Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
+---
+ xf86drm.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/xf86drm.c b/xf86drm.c
+index 336d64de..7807dce9 100644
+--- a/xf86drm.c
++++ b/xf86drm.c
+@@ -3014,6 +3014,12 @@ get_real_pci_path(int maj, int min, char *real_path)
+ return real_path;
+ }
+
++static void
++get_normal_pci_path(int maj, int min, char *normal_path)
++{
++ snprintf(normal_path, PATH_MAX, "/sys/dev/char/%d:%d/device", maj, min);
++}
++
+ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
+ {
+ #ifdef __linux__
+@@ -3022,7 +3028,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)
+ int num;
+
+ if (get_real_pci_path(maj, min, real_path) == NULL)
+- return -ENOENT;
++ get_normal_pci_path(maj, min, real_path);
+
+ value = sysfs_uevent_get(real_path, "PCI_SLOT_NAME");
+ if (!value)
+@@ -3143,7 +3149,7 @@ static int parse_separate_sysfs_files(int maj, int min,
+ int ret;
+
+ if (get_real_pci_path(maj, min, real_path) == NULL)
+- return -ENOENT;
++ get_normal_pci_path(maj, min, real_path);
+
+ for (unsigned i = ignore_revision ? 1 : 0; i < ARRAY_SIZE(attrs); i++) {
+ snprintf(path, PATH_MAX, "%s/%s", real_path, attrs[i]);
+@@ -3175,7 +3181,7 @@ static int parse_config_sysfs_file(int maj, int min,
+ int fd, ret;
+
+ if (get_real_pci_path(maj, min, real_path) == NULL)
+- return -ENOENT;
++ get_normal_pci_path(maj, min, real_path);
+
+ snprintf(path, PATH_MAX, "%s/config", real_path);
+ fd = open(path, O_RDONLY);
+--
+2.18.0
+
Copied: libdrm/repos/testing-x86_64/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch (from rev 333200, libdrm/trunk/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch)
===================================================================
--- testing-x86_64/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch (rev 0)
+++ testing-x86_64/0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,27 @@
+From f3d90e8db42d8d8a839558c0bc4c368c0107a4b9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer at amd.com>
+Date: Mon, 27 Aug 2018 11:48:48 +0200
+Subject: [PATCH 2/3] amdgpu-symbol-check: Add amdgpu_find_bo_by_cpu_mapping
+
+Fixes: 4d454424e1f2 ("amdgpu: add a function to find bo by cpu mapping
+ (v2)"
+Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
+---
+ amdgpu/amdgpu-symbol-check | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
+index 90b7a1d6..b5e4fe60 100755
+--- a/amdgpu/amdgpu-symbol-check
++++ b/amdgpu/amdgpu-symbol-check
+@@ -53,6 +53,7 @@ amdgpu_cs_wait_fences
+ amdgpu_cs_wait_semaphore
+ amdgpu_device_deinitialize
+ amdgpu_device_initialize
++amdgpu_find_bo_by_cpu_mapping
+ amdgpu_get_marketing_name
+ amdgpu_query_buffer_size_alignment
+ amdgpu_query_crtc_from_id
+--
+2.18.0
+
Copied: libdrm/repos/testing-x86_64/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch (from rev 333200, libdrm/trunk/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch)
===================================================================
--- testing-x86_64/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch (rev 0)
+++ testing-x86_64/0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,52 @@
+From f17725108809efaaf139f141808d537d14db3708 Mon Sep 17 00:00:00 2001
+From: Junwei Zhang <Jerry.Zhang at amd.com>
+Date: Thu, 30 Aug 2018 17:35:40 +0800
+Subject: [PATCH 3/3] amdgpu: add error return value for finding bo by cpu
+ mapping (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If nothing is found, error should be returned.
+
+v2: udpate the error value different from parameter check
+
+Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
+Reviewed-by: Christian König <christian.koenig at amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
+Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
+---
+ amdgpu/amdgpu_bo.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
+index 2f4f90f6..a2fc5250 100644
+--- a/amdgpu/amdgpu_bo.c
++++ b/amdgpu/amdgpu_bo.c
+@@ -549,8 +549,9 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
+ amdgpu_bo_handle *buf_handle,
+ uint64_t *offset_in_bo)
+ {
+- uint32_t i;
+ struct amdgpu_bo *bo;
++ uint32_t i;
++ int r = 0;
+
+ if (cpu == NULL || size == 0)
+ return -EINVAL;
+@@ -577,10 +578,11 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
+ } else {
+ *buf_handle = NULL;
+ *offset_in_bo = 0;
++ r = -ENXIO;
+ }
+ pthread_mutex_unlock(&dev->bo_table_mutex);
+
+- return 0;
++ return r;
+ }
+
+ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev,
+--
+2.18.0
+
Copied: libdrm/repos/testing-x86_64/COPYING (from rev 333200, libdrm/trunk/COPYING)
===================================================================
--- testing-x86_64/COPYING (rev 0)
+++ testing-x86_64/COPYING 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,48 @@
+ Copyright 2005 Adam Jackson.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation on the rights to use, copy, modify, merge,
+ publish, distribute, sub license, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NON-INFRINGEMENT. IN NO EVENT SHALL ADAM JACKSON BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------------------------------------------------------------------------
+
+ Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+ All Rights Reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice (including the
+ next paragraph) shall be included in all copies or substantial
+ portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS
+ SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
Copied: libdrm/repos/testing-x86_64/PKGBUILD (from rev 333200, libdrm/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,67 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=libdrm
+pkgver=2.4.94
+pkgrel=1
+pkgdesc="Userspace interface to kernel DRM services"
+url="https://dri.freedesktop.org/"
+arch=(x86_64)
+license=('custom')
+depends=('libpciaccess')
+makedepends=('valgrind' 'libxslt' 'docbook-xsl' 'meson')
+checkdepends=('cairo')
+replaces=('libdrm-new' 'libdrm-nouveau')
+source=(https://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.bz2 #{,.sig}
+ no-drmdevice-test.diff
+ 0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch
+ 0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch
+ 0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch
+ COPYING)
+sha512sums=('1a1699d6ea70b8759b37f3863e0802a99430b58f02e62632ad451356e2463eaf6faf4b810323f7dcc85ffdcca28f674b32caa5631ebd65b83e5b86bd59a35937'
+ 'f1dd5d8c2270c092ccb8e4f92a0da9ab27706dfa22dcedd3fb2414b968ced9333c8bf62baf0219b822e43dce0d804d1dd5cc27d09b0afe8c01967c1784d4a4bb'
+ 'abdbb6a53db4abb31c2884cfc8b753be112bff50f112f36adbd8179ad84dc2d706e27175ca9c12d0a5cc059367314850a496a3bf6083ee7ca6eae8fa6466a83c'
+ '1acb785be6dffad791945d56321d773d88584ec162983493e8cb66d80563bcbb4b2bb50ce223b5945b38dad0c4926e532bf3633676f15af3546b479372a485c6'
+ '9cc8e9900b12ea0fefce8dae55da5637c9df30f7309bc2ecd9edc1e116be4af047f951c855c5864681a3ef339dd1267835cc5aad47cb66b518b6c62830448cd1'
+ 'b0ca349b882a4326b19f81f22804fabdb6fb7aef31cdc7b16b0a7ae191bfbb50c7daddb2fc4e6c33f1136af06d060a273de36f6f3412ea326f16fa4309fda660')
+validpgpkeys=('B97BD6A80CAC4981091AE547FE558C72A67013C3') # Maarten Lankhorst <maarten.lankhorst at canonical.com>
+validpgpkeys+=('215DEE688925CCB965BE5DA97C03D7797B6E1AE2') # Damien Lespiau <damien.lespiau at intel.com>
+validpgpkeys+=('10A6D91DA1B05BD29F6DEBAC0C74F35979C486BE') # David Airlie <airlied at redhat.com>
+validpgpkeys+=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov <emil.l.velikov at gmail.com>
+validpgpkeys+=('D6285B5E899299F3DA746184191C9B905522B045') # Rob Clark <robclark at freedesktop.org>
+validpgpkeys+=('E8EB5B34081CE1EEA26EFE195B5BDA071D49CC38') # Kenneth Graunke <kenneth.w.graunke at intel.com>
+validpgpkeys+=('FC9BAE1435A9F7F664B82057B5D62936D1FC9EE8') # Eric Anholt <eric at anholt.net>
+validpgpkeys+=('3BB639E56F861FA2E86505690FDD682D974CA72A') # Matt Turner <mattst88 at gmail.com>
+validpgpkeys+=('C20F5C4490D7D64B4C9A09998CD1DF552975297B') # Robert Bragg <robert at sixbynine.org>
+validpgpkeys+=('CD47C5341A375F33BEF7BAFAFDD15D5ACEF0F2B1') # Marek Olšák <maraeo at gmail.com>
+validpgpkeys+=('A66D805F7C9329B4C5D82767CCC4F07FAC641EFF') # Daniel Stone <daniels at collabora.com>
+validpgpkeys+=('CFD0E654BCBE5DD2D030D222CFCC297C6D0A120B') # Lucas Stach <l.stach at pengutronix.de>
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # Fails in a container; autotools skipped this one already
+ patch -Np1 -i ../no-drmdevice-test.diff
+
+ # upstream fixes
+ patch -Np1 -i ../0001-xf86drm-fallback-to-normal-path-when-realpath-fails.patch
+ patch -Np1 -i ../0002-amdgpu-symbol-check-Add-amdgpu_find_bo_by_cpu_mappin.patch
+ patch -Np1 -i ../0003-amdgpu-add-error-return-value-for-finding-bo-by-cpu-.patch
+}
+
+build() {
+ arch-meson $pkgname-$pkgver build \
+ -Dudev=false \
+ -Dvalgrind=false
+ ninja -C build
+}
+
+check() {
+ cd build
+ meson test
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C build install
+ install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
+}
Copied: libdrm/repos/testing-x86_64/no-drmdevice-test.diff (from rev 333200, libdrm/trunk/no-drmdevice-test.diff)
===================================================================
--- testing-x86_64/no-drmdevice-test.diff (rev 0)
+++ testing-x86_64/no-drmdevice-test.diff 2018-09-02 12:43:34 UTC (rev 333201)
@@ -0,0 +1,9 @@
+diff --git i/tests/meson.build w/tests/meson.build
+index fdf950b7..a6a2f1f1 100644
+--- i/tests/meson.build
++++ w/tests/meson.build
+@@ -83,4 +83,3 @@ drmdevice = executable(
+ test('random', random, timeout : 240)
+ test('hash', hash)
+ test('drmsl', drmsl)
+-test('drmdevice', drmdevice)
More information about the arch-commits
mailing list