Date: Thu, 1 Jul 2021 19:02:00 GMT From: Warner Losh <imp@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ca4de4fd36ff - main - x11-drivers/xf86-video-intel: work around execbuffer2 test failure Message-ID: <202107011902.161J20Q5046400@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/ports/commit/?id=ca4de4fd36ff7ca59898ab2910213f060458f528 commit ca4de4fd36ff7ca59898ab2910213f060458f528 Author: Jung-uk Kim <jkim@FreeBSD.org> AuthorDate: 2021-07-01 18:40:17 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-01 19:01:14 +0000 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) --- x11-drivers/xf86-video-intel/Makefile | 1 + .../xf86-video-intel/files/patch-src_sna_kgem.c | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile index 08a3ba6d4856..ff1b17eed08a 100644 --- a/x11-drivers/xf86-video-intel/Makefile +++ b/x11-drivers/xf86-video-intel/Makefile @@ -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 diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c new file mode 100644 index 000000000000..f71962e56a63 --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107011902.161J20Q5046400>