From owner-dev-commits-ports-all@freebsd.org Thu Jul 1 19:02:01 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BDBB6513A0; Thu, 1 Jul 2021 19:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG6yc6g1Mz4mBB; Thu, 1 Jul 2021 19:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC62225CA3; Thu, 1 Jul 2021 19:02:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161J20il046401; Thu, 1 Jul 2021 19:02:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161J20Q5046400; Thu, 1 Jul 2021 19:02:00 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:02:00 GMT Message-Id: <202107011902.161J20Q5046400@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Warner Losh Subject: git: ca4de4fd36ff - main - x11-drivers/xf86-video-intel: work around execbuffer2 test failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca4de4fd36ff7ca59898ab2910213f060458f528 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:02:01 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/ports/commit/?id=ca4de4fd36ff7ca59898ab2910213f060458f528 commit ca4de4fd36ff7ca59898ab2910213f060458f528 Author: Jung-uk Kim AuthorDate: 2021-07-01 18:40:17 +0000 Commit: Warner Losh 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)