From ac10954480558c2a5257b235b522d15a4a4b9d6d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 11 Feb 2020 20:41:15 +0200 Subject: [PATCH] xf86-video-amdgpu: Fix rootless xorg --- xorg/xf86-video-amdgpu/build | 2 ++ xorg/xf86-video-amdgpu/checksums | 1 + .../patches/rootless-amdgpu.patch | 15 +++++++++++++++ xorg/xf86-video-amdgpu/sources | 1 + xorg/xf86-video-amdgpu/version | 2 +- 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 xorg/xf86-video-amdgpu/patches/rootless-amdgpu.patch diff --git a/xorg/xf86-video-amdgpu/build b/xorg/xf86-video-amdgpu/build index 3054c8be..8722062f 100755 --- a/xorg/xf86-video-amdgpu/build +++ b/xorg/xf86-video-amdgpu/build @@ -1,5 +1,7 @@ #!/bin/sh -e +patch -p1 < rootless-amdgpu.patch + export LDFLAGS="-Wl,-z,lazy" ./configure \ diff --git a/xorg/xf86-video-amdgpu/checksums b/xorg/xf86-video-amdgpu/checksums index 0d53d0ef..7f714071 100644 --- a/xorg/xf86-video-amdgpu/checksums +++ b/xorg/xf86-video-amdgpu/checksums @@ -1 +1,2 @@ 4f0ea4e0ae61995ac2b7c72433d31deab63b60c78763020aaa1b28696124fe5d xf86-video-amdgpu-19.1.0.tar.bz2 +fa8567fa877982182f2ee09dc138ef8ea466e84c77682c5c4234ded4f951476a rootless-amdgpu.patch diff --git a/xorg/xf86-video-amdgpu/patches/rootless-amdgpu.patch b/xorg/xf86-video-amdgpu/patches/rootless-amdgpu.patch new file mode 100644 index 00000000..ff77aa9f --- /dev/null +++ b/xorg/xf86-video-amdgpu/patches/rootless-amdgpu.patch @@ -0,0 +1,15 @@ +diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c +index 6a60f54..169085e 100644 +--- a/src/amdgpu_kms.c ++++ b/src/amdgpu_kms.c +@@ -1823,6 +1823,10 @@ static Bool amdgpu_set_drm_master(ScrnInfoPtr pScrn) + return TRUE; + #endif + ++ err = drmIsMaster(pAMDGPUEnt->fd); ++ if (err) ++ return TRUE; ++ + err = drmSetMaster(pAMDGPUEnt->fd); + if (err) + ErrorF("Unable to retrieve master\n"); diff --git a/xorg/xf86-video-amdgpu/sources b/xorg/xf86-video-amdgpu/sources index ba4e02cc..5e55140c 100644 --- a/xorg/xf86-video-amdgpu/sources +++ b/xorg/xf86-video-amdgpu/sources @@ -1 +1,2 @@ https://x.org/releases/individual/driver/xf86-video-amdgpu-19.1.0.tar.bz2 +patches/rootless-amdgpu.patch diff --git a/xorg/xf86-video-amdgpu/version b/xorg/xf86-video-amdgpu/version index 119d7b4b..6df2a0b0 100644 --- a/xorg/xf86-video-amdgpu/version +++ b/xorg/xf86-video-amdgpu/version @@ -1 +1 @@ -19.1.0 1 +19.1.0 2