mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
x11-drivers/xf86-video-intel: work around execbuffer2 test failure
Work around execbuffer2 test failure. I was not able to enable DRI3 with SNA. It turned out DRM_IOCTL_I915_GEM_EXECBUFFER2 ioctl returns a different error code, i.e., ENOENT instead of EFAULT. Allow both to return true. PR: 256354 Approved by: x11 (manu)
This commit is contained in:
parent
aefe98d1b9
commit
ca4de4fd36
@ -3,6 +3,7 @@
|
||||
PORTNAME= xf86-video-intel
|
||||
DISTVERSION= 2.99.917-916
|
||||
DISTVERSIONSUFFIX= -g${GL_COMMIT:C/(.{12}).*/\1/}
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= x11-drivers
|
||||
|
||||
|
24
x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c
Normal file
24
x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c
Normal file
@ -0,0 +1,24 @@
|
||||
--- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC
|
||||
+++ src/sna/kgem.c
|
||||
@@ -1189,13 +1189,18 @@ static int gem_param(struct kgem *kgem, int name)
|
||||
static bool test_has_execbuffer2(struct kgem *kgem)
|
||||
{
|
||||
struct drm_i915_gem_execbuffer2 execbuf;
|
||||
+ int ret;
|
||||
|
||||
memset(&execbuf, 0, sizeof(execbuf));
|
||||
execbuf.buffer_count = 1;
|
||||
|
||||
- return do_ioctl(kgem->fd,
|
||||
- DRM_IOCTL_I915_GEM_EXECBUFFER2,
|
||||
- &execbuf) == -EFAULT;
|
||||
+ ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
|
||||
+#ifdef __FreeBSD__
|
||||
+ /* XXX FreeBSD returns ENOENT instead of EFAULT. */
|
||||
+ if (ret == -ENOENT)
|
||||
+ return true;
|
||||
+#endif
|
||||
+ return ret == -EFAULT;
|
||||
}
|
||||
|
||||
static bool test_has_no_reloc(struct kgem *kgem)
|
Loading…
Reference in New Issue
Block a user