Date: Mon, 2 Nov 2015 13:12:13 +0000 (UTC) From: Koop Mast <kwm@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400652 - in head/graphics/libdrm: . files Message-ID: <201511021312.tA2DCDB0020601@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kwm Date: Mon Nov 2 13:12:13 2015 New Revision: 400652 URL: https://svnweb.freebsd.org/changeset/ports/400652 Log: The intel kernel driver leaks error code "512" (ERESTARTSYS) to userland. This error code should be converted to EINTR and/or EAGAIN. Teach libdrm to handle this error code as a work around, and add a override to not apply the patch. Which is done for people doing DRM development. PR: 204174 Added: head/graphics/libdrm/files/extra-xf86drm.c (contents, props changed) Modified: head/graphics/libdrm/Makefile Modified: head/graphics/libdrm/Makefile ============================================================================== --- head/graphics/libdrm/Makefile Mon Nov 2 12:14:56 2015 (r400651) +++ head/graphics/libdrm/Makefile Mon Nov 2 13:12:13 2015 (r400652) @@ -3,6 +3,7 @@ PORTNAME= libdrm PORTVERSION= 2.4.65 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= graphics x11 MASTER_SITES= http://dri.freedesktop.org/libdrm/ @@ -59,6 +60,12 @@ PLIST_SUB+= INTEL_DRIVER="@comment " PLIST_SUB+= RADEON_DRIVERS="@comment " .endif +# This variable is not for users. So use a non-default name, intended for +# people working on DRM kernel module development. +.if !defined(LIBDRM_SKIP_RETURN_PATCH) +EXTRA_PATCHES+= ${FILESDIR}/extra-xf86drm.c +.endif + pre-patch: @${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g; \ s,i?86|x86_64),i?86|amd64|x86_64),g' \ Added: head/graphics/libdrm/files/extra-xf86drm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libdrm/files/extra-xf86drm.c Mon Nov 2 13:12:13 2015 (r400652) @@ -0,0 +1,19 @@ +Error code 512 is being leaked from kernel space. While it should be +converted to either EINTR or EAGAIN in the kernel. Teach libdrm to do this +for now. Newer kernel modules will have this fixed included. + +dragonfly fixed this issue in, +http://gitweb.dragonflybsd.org/dragonfly.git/commit/b922632f623ee2cc2c1346bb3a6894a7756676aa +which will be included in the 4.4 release when it is released. + +--- xf86drm.c.orig 2015-11-02 12:26:19.910518000 +0100 ++++ xf86drm.c 2015-11-02 12:27:10.575894000 +0100 +@@ -174,7 +174,7 @@ + + do { + ret = ioctl(fd, request, arg); +- } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); ++ } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == 512)); + return ret; + } +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511021312.tA2DCDB0020601>