diff options
author | Baptiste Daroussin <bapt@gandi.net> | 2016-12-06 04:54:50 +0800 |
---|---|---|
committer | Baptiste Daroussin <bapt@gandi.net> | 2016-12-06 04:54:50 +0800 |
commit | 6f862678d0f9931b9a9d52773d0001b722880076 (patch) | |
tree | 0a3f46b38294f6afc983d4333f3409b890c2a381 | |
parent | 088299f378d32535fa16b9956a6046a577ea88d7 (diff) | |
download | freebsd-ports-graphics-xserver-next.tar.gz freebsd-ports-graphics-xserver-next.tar.zst freebsd-ports-graphics-xserver-next.zip |
Readd xserver-next changesxserver-next
129 files changed, 1544 insertions, 1286 deletions
diff --git a/Mk/bsd.xorg.mk b/Mk/bsd.xorg.mk index 265a3fbd81d..bc02d0098ce 100644 --- a/Mk/bsd.xorg.mk +++ b/Mk/bsd.xorg.mk @@ -66,6 +66,7 @@ USE_XORG+= xorg-server xproto randrproto xi renderproto xextproto \ . if ${ARCH} == i386 CFLAGS+= -fno-optimize-sibling-calls . endif +CPPFLAGS+= -Werror=uninitialized CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4' USES+= libtool . endif @@ -97,6 +98,7 @@ USES+= pathfix DISTFILES?= xorg-server-${PORTVERSION}.tar.bz2 WRKSRC= ${WRKDIR}/xorg-server-${PORTVERSION} USES+= pathfix +CPPFLAGS+= -Werror=uninitialized CONFIGURE_ARGS+= --with-xkb-path=${LOCALBASE}/share/X11/xkb \ --with-fontrootdir=${LOCALBASE}/share/fonts diff --git a/devel/libclc/Makefile b/devel/libclc/Makefile index 833a6f75c38..b4a0534b3d4 100644 --- a/devel/libclc/Makefile +++ b/devel/libclc/Makefile @@ -2,18 +2,23 @@ # $FreeBSD$ PORTNAME= libclc -DISTVERSION= 0.2.0.20151006 +DISTVERSION= 0.2.0.20160209 CATEGORIES= devel MAINTAINER= x11@FreeBSD.org COMMENT= Required library functions for OpenCL C programming language +#LICENSE_NAME= BSD3CLAUSE MIT +#LICENSE_FILE= ${WRKSRC}/LICENSE.TXT +#LICENSE_COMB= OR + BUILD_DEPENDS= clang${LLVMVER}:devel/llvm${LLVMVER} \ libedit>=0:devel/libedit USE_GITHUB= yes GH_ACCOUNT= llvm-mirror -GH_TAGNAME= 6d78407 +# newer snapshot needs llvm 3.9+ +GH_TAGNAME= b518692 USES= gmake python:2,build ninja USE_LDCONFIG= yes diff --git a/devel/libclc/distinfo b/devel/libclc/distinfo index 1095144e358..9bef36ace65 100644 --- a/devel/libclc/distinfo +++ b/devel/libclc/distinfo @@ -1,2 +1,3 @@ -SHA256 (llvm-mirror-libclc-0.2.0.20151006-6d78407_GH0.tar.gz) = 1a1d5d0b00560cf5d4784110f22ef8ade121c4a703a3622e0be85989eca3e4ba -SIZE (llvm-mirror-libclc-0.2.0.20151006-6d78407_GH0.tar.gz) = 102996 +TIMESTAMP = 1476703483 +SHA256 (llvm-mirror-libclc-0.2.0.20160209-b518692_GH0.tar.gz) = 7e684f323f9c1df569ba79eab4c291635dbe93d6486efe4b5429510092a04223 +SIZE (llvm-mirror-libclc-0.2.0.20160209-b518692_GH0.tar.gz) = 104243 diff --git a/devel/libclc/pkg-plist b/devel/libclc/pkg-plist index 106bd8948de..f75b02d26a5 100644 --- a/devel/libclc/pkg-plist +++ b/devel/libclc/pkg-plist @@ -151,6 +151,8 @@ include/clc/math/fmod.h include/clc/math/fmod.inc include/clc/math/fract.h include/clc/math/fract.inc +include/clc/math/frexp.h +include/clc/math/frexp.inc include/clc/math/gentype.inc include/clc/math/half_rsqrt.h include/clc/math/half_sqrt.h @@ -167,6 +169,8 @@ include/clc/math/log2.h include/clc/math/log2.inc include/clc/math/mad.h include/clc/math/mad.inc +include/clc/math/modf.h +include/clc/math/modf.inc include/clc/math/native_cos.h include/clc/math/native_divide.h include/clc/math/native_exp.h @@ -244,12 +248,15 @@ lib/clc/aruba-r600--.bc lib/clc/barts-r600--.bc lib/clc/bonaire-amdgcn--.bc lib/clc/caicos-r600--.bc +lib/clc/carrizo-amdgcn--.bc lib/clc/cayman-r600--.bc lib/clc/cedar-r600--.bc lib/clc/cypress-r600--.bc +lib/clc/fiji-amdgcn--.bc lib/clc/hainan-amdgcn--.bc lib/clc/hawaii-amdgcn--.bc lib/clc/hemlock-r600--.bc +lib/clc/iceland-amdgcn--.bc lib/clc/juniper-r600--.bc lib/clc/kabini-amdgcn--.bc lib/clc/kaveri-amdgcn--.bc @@ -260,11 +267,13 @@ lib/clc/oland-amdgcn--.bc lib/clc/palm-r600--.bc lib/clc/pitcairn-amdgcn--.bc lib/clc/redwood-r600--.bc +lib/clc/stoney-amdgcn--.bc lib/clc/subnormal_disable.bc lib/clc/subnormal_use_default.bc lib/clc/sumo-r600--.bc lib/clc/sumo2-r600--.bc lib/clc/tahiti-amdgcn--.bc +lib/clc/tonga-amdgcn--.bc lib/clc/turks-r600--.bc lib/clc/verde-amdgcn--.bc libdata/pkgconfig/libclc.pc diff --git a/devel/libdevq/Makefile b/devel/libdevq/Makefile index 2004fd05ab3..044489545c5 100644 --- a/devel/libdevq/Makefile +++ b/devel/libdevq/Makefile @@ -2,19 +2,23 @@ # $FreeBSD$ PORTNAME= libdevq -PORTVERSION= 0.0.2 -PORTREVISION= 1 +PORTVERSION= 0.0.3 +PORTREVISION= 3 CATEGORIES= devel -MASTER_SITES= http://rainbow-runner.nl/freebsd/ MAINTAINER= x11@FreeBSD.org COMMENT= Generic Device Query and Monitor interface +USE_GITHUB= yes +GH_ACCOUNT= freebsd + GNU_CONFIGURE= yes -USES= libtool pathfix tar:xz +USES= autoreconf libtool pathfix #tar:xz USE_LDCONFIG= yes INSTALL_TARGET= install-strip +PATHFIX_MAKEFILEIN= Makefile.am + OPTIONS_DEFINE= PROGRAMS OPTIONS_SUB= yes PROGRAMS_DESC= Build diagnostic programs diff --git a/devel/libdevq/distinfo b/devel/libdevq/distinfo index 845a67d3307..cb98deb4b02 100644 --- a/devel/libdevq/distinfo +++ b/devel/libdevq/distinfo @@ -1,2 +1,3 @@ -SHA256 (libdevq-0.0.2.tar.xz) = 138ce3a0023ade78b36232343da0f589302db406216e39ea8ffb586ea2417305 -SIZE (libdevq-0.0.2.tar.xz) = 210960 +TIMESTAMP = 1468082689 +SHA256 (freebsd-libdevq-0.0.3_GH0.tar.gz) = c9417c8c44964d671ed8110e4bca6185af0883fb0eece63db2926cf9c891b7a6 +SIZE (freebsd-libdevq-0.0.3_GH0.tar.gz) = 10117 diff --git a/devel/libdevq/files/patch-src_device.c b/devel/libdevq/files/patch-src_device.c deleted file mode 100644 index d7609c1eefc..00000000000 --- a/devel/libdevq/files/patch-src_device.c +++ /dev/null @@ -1,125 +0,0 @@ -From 7b48b8726b85eac66c1b164fab87d154be5aa068 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org> -Date: Fri, 13 Feb 2015 19:46:37 +0100 -Subject: [PATCH] Support dev.$driver.$n.%location from FreeBSD 11.x - -The format changed from: - slot=1 function=0 -to: - pci0:2:0:0 handle=\_SB_.PCI0.PEG3.MXM3 - -Now devq_device_get_pciid_from_fd() supports both formats. ---- - src/device.c | 89 ++++++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 60 insertions(+), 29 deletions(-) - -diff --git a/src/device.c b/src/device.c -index 9aadc2b..77df580 100644 ---- src/device.c -+++ src/device.c -@@ -188,6 +188,58 @@ devq_device_get_devpath_from_fd(int fd, - #endif /* defined(HAVE_LIBPROCSTAT_H) */ - } - -+static int -+devq_compare_vgapci_busaddr(int i, int *domain, int *bus, int *slot, -+ int *function) -+{ -+ int ret; -+ char sysctl_name[32], sysctl_value[128]; -+ size_t sysctl_value_len; -+ -+ sprintf(sysctl_name, "dev.vgapci.%d.%%location", i); -+ -+ sysctl_value_len = sizeof(sysctl_value); -+ memset(sysctl_value, 0, sysctl_value_len); -+ ret = sysctlbyname(sysctl_name, sysctl_value, -+ &sysctl_value_len, NULL, 0); -+ if (ret != 0) -+ return (-1); -+ -+ /* -+ * dev.vgapci.$m.%location can have two formats: -+ * o "pci0:2:0:0 handle=\_SB_.PCI0.PEG3.MXM3" (FreeBSD 11+) -+ * o "slot=1 function=0" (up-to FreeBSD 10) -+ */ -+ -+ ret = sscanf(sysctl_value, "pci%d:%d:%d:%d %*s", -+ domain, bus, slot, function); -+ if (ret == 4) -+ return (0); -+ -+ ret = sscanf(sysctl_value, "slot=%d function=%d %*s", -+ slot, function); -+ if (ret != 2) -+ return (-1); -+ -+ sprintf(sysctl_name, "dev.vgapci.%d.%%parent", i); -+ -+ sysctl_value_len = sizeof(sysctl_value); -+ memset(sysctl_value, 0, sysctl_value_len); -+ ret = sysctlbyname(sysctl_name, sysctl_value, -+ &sysctl_value_len, NULL, 0); -+ if (ret != 0) -+ return (-1); -+ -+ ret = sscanf(sysctl_value, "pci%d", bus); -+ if (ret != 1) -+ return (-1); -+ -+ /* FIXME: What domain to assume? */ -+ *domain = 0; -+ -+ return (0); -+} -+ - int - devq_device_get_pciid_from_fd(int fd, - int *vendor_id, int *device_id) -@@ -253,38 +305,17 @@ devq_device_get_pciid_from_fd(int fd, - * o dev.vgapci.$m.%parent - */ - for (i = 0; i < DEVQ_MAX_DEVS; ++i) { -- sprintf(sysctl_name, "dev.vgapci.%d.%%location", i); -- -- sysctl_value_len = sizeof(sysctl_value); -- memset(sysctl_value, 0, sysctl_value_len); -- ret = sysctlbyname(sysctl_name, sysctl_value, -- &sysctl_value_len, NULL, 0); -- if (ret != 0) -- continue; -+ int tmp_domain, tmp_bus, tmp_slot, tmp_function; - -- int tmp_slot, tmp_function; -- ret = sscanf(sysctl_value, "slot=%d function=%d %*s", -+ ret = devq_compare_vgapci_busaddr(i, &tmp_domain, &tmp_bus, - &tmp_slot, &tmp_function); -- if (ret != 2 || -- tmp_slot != slot || tmp_function != function) -- continue; -- -- sprintf(sysctl_name, "dev.vgapci.%d.%%parent", i); -- -- sysctl_value_len = sizeof(sysctl_value); -- memset(sysctl_value, 0, sysctl_value_len); -- ret = sysctlbyname(sysctl_name, sysctl_value, -- &sysctl_value_len, NULL, 0); -- if (ret != 0) -- continue; -- -- int tmp_bus; -- ret = sscanf(sysctl_value, "pci%d", -- &tmp_bus); -- if (ret != 1 || tmp_bus != bus) -- continue; - -- break; -+ if (ret == 0 && -+ tmp_domain == domain && -+ tmp_bus == bus && -+ tmp_slot == slot && -+ tmp_function == function) -+ break; - } - - if (i == DEVQ_MAX_DEVS) { diff --git a/devel/libdevq/files/patch-src_freebsd_device.c b/devel/libdevq/files/patch-src_freebsd_device.c new file mode 100644 index 00000000000..225e4633600 --- /dev/null +++ b/devel/libdevq/files/patch-src_freebsd_device.c @@ -0,0 +1,28 @@ +--- src/freebsd/device.c.orig 2016-07-09 18:40:13.000000000 +0200 ++++ src/freebsd/device.c 2016-07-28 12:31:40.656295000 +0200 +@@ -401,9 +401,9 @@ devq_device_get_pciid_full_from_fd(int f + if (ret != 0) + return (-1); + +- ret = sscanf(sysctl_value, "vendor=0x%04x device=0x%04x subversion=0x%04x subdevice=0x%04x", ++ ret = sscanf(sysctl_value, "vendor=0x%04x device=0x%04x subvendor=0x%04x subdevice=0x%04x", + vendor_id, device_id, subvendor_id, subdevice_id); +- if (ret != 2) { ++ if (ret != 4) { + errno = EINVAL; + return (-1); + } +@@ -418,10 +418,10 @@ int + devq_device_get_pciid_from_fd(int fd, + int *vendor_id, int *device_id) + { +- int *subvendor_id, *subdevice_id, *revision_id; ++ int subvendor_id, subdevice_id, revision_id; + + return devq_device_get_pciid_full_from_fd(fd, +- vendor_id, device_id, subvendor_id, +- subdevice_id, revision_id); ++ vendor_id, device_id, &subvendor_id, ++ &subdevice_id, &revision_id); + } + diff --git a/devel/libdevq/files/patch-tools_lsdri_lsdri.c b/devel/libdevq/files/patch-tools_lsdri_lsdri.c new file mode 100644 index 00000000000..f34c2a5a569 --- /dev/null +++ b/devel/libdevq/files/patch-tools_lsdri_lsdri.c @@ -0,0 +1,31 @@ +--- tools/lsdri/lsdri.c.orig 2016-07-09 18:40:13.000000000 +0200 ++++ tools/lsdri/lsdri.c 2016-07-17 15:20:26.285606000 +0200 +@@ -41,7 +41,7 @@ + print_drm_info(int fd) + { + int ret; +- int vendor_id, device_id; ++ int vendor_id, device_id, subvendor_id, subdevice_id, revision_id; + char *device_path, *driver_name; + size_t device_path_len, driver_name_len; + +@@ -82,14 +82,16 @@ + free(driver_name); + driver_name = NULL; + +- ret = devq_device_get_pciid_from_fd(fd, &vendor_id, &device_id); ++ ret = devq_device_get_pciid_full_from_fd(fd, &vendor_id, &device_id, ++ &subvendor_id, &subdevice_id, &revision_id); + if (ret < 0) { + fprintf(stderr, "Warning: Unable to determine vendor and device ID\n"); + return (-1); + } + +- printf(" PCI vendor ID: 0x%04x\n", vendor_id); +- printf(" PCI device ID: 0x%04x\n", device_id); ++ printf(" PCI vendor ID: 0x%04x subvendor ID: 0x%04x\n", vendor_id, subvendor_id); ++ printf(" PCI device ID: 0x%04x subdevice ID: 0x%04x\n", device_id, subdevice_id); ++ printf(" PCI revision ID: 0x%04x\n", revision_id); + + return (0); + } diff --git a/devel/libdevq/pkg-plist b/devel/libdevq/pkg-plist index f3206a22e17..1a41d2f60e4 100644 --- a/devel/libdevq/pkg-plist +++ b/devel/libdevq/pkg-plist @@ -5,3 +5,4 @@ lib/libdevq.so lib/libdevq.so.0 lib/libdevq.so.0.0.0 libdata/pkgconfig/libdevq-1.0.pc +man/man3/libdevq.3.gz diff --git a/graphics/dri/Makefile b/graphics/dri/Makefile index 1afb11b0af4..2b4e8f82041 100644 --- a/graphics/dri/Makefile +++ b/graphics/dri/Makefile @@ -3,6 +3,7 @@ PORTNAME= dri PORTVERSION= ${MESAVERSION} +PORTREVISION= 0 PORTEPOCH= 2 CATEGORIES= graphics @@ -18,6 +19,10 @@ USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \ OPTIONS_DEFINE= TEXTURE OPTIONS_DEFAULT=TEXTURE +OPTIONS_DEFINE_amd64= DRI3 +OPTIONS_DEFINE_i386= DRI3 +DRI3_DESC= Experimental: Enable DRI3 support. + TEXTURE_DESC= Enable texture-float support (patent encumbered) VDPAU_DESC= VDPAU (GPU video acceleration) support (needs Gallium) diff --git a/graphics/dri/pkg-plist b/graphics/dri/pkg-plist index fcf4d2bec4c..b29a446a523 100644 --- a/graphics/dri/pkg-plist +++ b/graphics/dri/pkg-plist @@ -12,6 +12,7 @@ @comment include/GL/glx_mangle.h @comment include/GL/glxext.h include/GL/internal/dri_interface.h +@comment include/GL/mesa_glinterop.h @comment include/GL/osmesa.h @comment include/GL/wglext.h @comment include/GL/wmesa.h diff --git a/graphics/libEGL/Makefile b/graphics/libEGL/Makefile index 3050b466076..c23c1e1234b 100644 --- a/graphics/libEGL/Makefile +++ b/graphics/libEGL/Makefile @@ -13,6 +13,10 @@ LIB_DEPENDS+= libpthread-stubs.so:devel/libpthread-stubs \ libdevq.so:devel/libdevq \ libdrm.so:graphics/libdrm +OPTIONS_DEFINE_amd64= DRI3 +OPTIONS_DEFINE_i386= DRI3 +DRI3_DESC= Experimental: Enable DRI3 support. + USE_GL= gbm USE_XORG= x11 xau xcb xdmcp diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile index 4874a0824da..4e9e3e5ad3f 100644 --- a/graphics/libGL/Makefile +++ b/graphics/libGL/Makefile @@ -12,8 +12,12 @@ LIB_DEPENDS+= libdrm.so:graphics/libdrm \ libglapi.so:graphics/libglapi \ libexpat.so:textproc/expat2 +OPTIONS_DEFINE_amd64= DRI3 +OPTIONS_DEFINE_i386= DRI3 +DRI3_DESC= Experimental: Enable DRI3 support. + USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both \ - presentproto xshmfence + presentproto xshmfence xcb .include <bsd.port.options.mk> .include "${.CURDIR}/Makefile.common" diff --git a/graphics/libGL/Makefile.common b/graphics/libGL/Makefile.common index e3d6e223bbe..0a420c43654 100644 --- a/graphics/libGL/Makefile.common +++ b/graphics/libGL/Makefile.common @@ -18,7 +18,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 11.2.2 +MESABASEVERSION= 12.0.3 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= @@ -32,11 +32,10 @@ BUILD_DEPENDS+= makedepend:devel/makedepend LIB_DEPENDS+= libdevq.so:devel/libdevq USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ - pathfix pkgconfig python:2,build shebangfix tar:xz + localbase pathfix pkgconfig python:2,build shebangfix tar:xz USE_LDCONFIG= yes GNU_CONFIGURE= yes -CPPFLAGS+= -isystem${LOCALBASE}/include -LDFLAGS+= -Wl,-Y/usr/lib:${LOCALBASE}/lib +LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall @@ -72,7 +71,16 @@ MESA_LLVM_VER=37 CONFIGURE_ARGS+= --with-sha1=libcrypto # DRI3 needs PRIME support in the kernel to work +# XXX this is for testing only, in ports we probably should autoconfig this +# if the kernel is new enough. +# dragonfly doesn't have dmabuf so when this gets converted, don't enable there. +.if ${PORT_OPTIONS:MDRI3} +USE_XORG+= dri3proto presentproto xshmfence +LIB_DEPENDS+= libxcb.so:x11/libxcb +CONFIGURE_ARGS+= --enable-dri3 +.else CONFIGURE_ARGS+= --disable-dri3 +.endif CONFIGURE_ARGS+= --enable-gbm diff --git a/graphics/libGL/distinfo b/graphics/libGL/distinfo index f814e02c748..604e0dd7cb6 100644 --- a/graphics/libGL/distinfo +++ b/graphics/libGL/distinfo @@ -1,2 +1,3 @@ -SHA256 (mesa-11.2.2.tar.xz) = 40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4 -SIZE (mesa-11.2.2.tar.xz) = 7860932 +TIMESTAMP = 1474473007 +SHA256 (mesa-12.0.3.tar.xz) = 1dc86dd9b51272eee1fad3df65e18cda2e556ef1bc0b6e07cd750b9757f493b1 +SIZE (mesa-12.0.3.tar.xz) = 8577408 diff --git a/graphics/libGL/files/configure.ac b/graphics/libGL/files/configure.ac index 5b9bf0a6cc4..7777f3ea2e5 100644 --- a/graphics/libGL/files/configure.ac +++ b/graphics/libGL/files/configure.ac @@ -1,14 +1,14 @@ ---- configure.ac.orig 2015-12-21 10:05:52.000000000 +0100 -+++ configure.ac 2015-12-22 17:04:25.728359000 +0100 -@@ -78,6 +78,7 @@ +--- configure.ac.orig 2016-09-05 13:00:42.000000000 +0200 ++++ configure.ac 2016-09-12 16:31:50.702327000 +0200 +@@ -79,6 +79,7 @@ DRI3PROTO_REQUIRED=1.0 PRESENTPROTO_REQUIRED=1.0 LIBUDEV_REQUIRED=151 +LIBDEVQ_REQUIRED=0.0.2 GLPROTO_REQUIRED=1.4.14 LIBOMXIL_BELLAGIO_REQUIRED=0.0 - LIBVA_REQUIRED=0.35.0 -@@ -743,7 +744,7 @@ + LIBVA_REQUIRED=0.38.0 +@@ -873,7 +874,7 @@ [enable_dri=yes]) case "$host_os" in @@ -17,7 +17,7 @@ dri3_default=yes ;; *) -@@ -1000,6 +1001,9 @@ +@@ -1314,6 +1315,9 @@ PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], have_libudev=yes, have_libudev=no) @@ -27,7 +27,7 @@ AC_ARG_ENABLE([sysfs], [AS_HELP_STRING([--enable-sysfs], [enable /sys PCI identification @<:@default=disabled@:>@])], -@@ -1096,6 +1100,10 @@ +@@ -1411,6 +1415,10 @@ DEFINES="$DEFINES -DHAVE_LIBUDEV" have_pci_id=yes fi @@ -38,11 +38,16 @@ if test "$have_sysfs" = yes; then DEFINES="$DEFINES -DHAVE_SYSFS" -@@ -1228,6 +1236,23 @@ +@@ -1538,9 +1546,28 @@ + ;; + esac ;; - gnu*) +- *freebsd* | dragonfly* | *netbsd* | openbsd*) ++ *netbsd* | openbsd* | dragonfly*) DEFINES="$DEFINES -DHAVE_ALIAS" -+dnl not sure about dri3 support, just enable it for now. + ;; ++ *freebsd*) ++ DEFINES="$DEFINES -DHAVE_ALIAS" + if test "x$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi @@ -59,10 +64,11 @@ + fi + ;; + esac ++ ;; + gnu*) + DEFINES="$DEFINES -DHAVE_ALIAS" ;; - cygwin*) - if test "x$with_dri_drivers" = "xyes"; then -@@ -1384,6 +1409,8 @@ +@@ -1749,6 +1776,8 @@ AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes) if test "x$need_pci_id$have_libudev" = xyesyes; then GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED" @@ -71,7 +77,7 @@ else GBM_PC_REQ_PRIV="" fi -@@ -1545,9 +1572,19 @@ +@@ -1924,9 +1953,19 @@ AC_MSG_ERROR([cannot enable OpenCL without Gallium]) fi @@ -91,7 +97,20 @@ if test "x$have_libclc" = xno; then AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover. -@@ -1815,8 +1852,6 @@ +@@ -2105,9 +2144,9 @@ + strip_unwanted_llvm_flags() { + # Use \> (marks the end of the word) + echo `$1` | sed \ +- -e 's/-march=\S*//g' \ +- -e 's/-mtune=\S*//g' \ +- -e 's/-mcpu=\S*//g' \ ++ -e 's/-march=[[:graph:]]* //g' \ ++ -e 's/-mtune=[[:graph:]]* //g' \ ++ -e 's/-mcpu=[[:graph:]]* //g' \ + -e 's/-DNDEBUG\>//g' \ + -e 's/-D_GNU_SOURCE\>//g' \ + -e 's/-pedantic\>//g' \ +@@ -2199,8 +2238,6 @@ CLANG_LIBDIR=${LLVM_LIBDIR} fi CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} diff --git a/graphics/libGL/files/patch-configure b/graphics/libGL/files/patch-configure index de767d34edf..4000e43d25c 100644 --- a/graphics/libGL/files/patch-configure +++ b/graphics/libGL/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2015-12-22 17:04:20.271630000 +0100 -+++ configure 2015-12-22 17:05:17.669976000 +0100 -@@ -858,6 +858,8 @@ +--- configure.orig 2016-09-12 16:30:39.283103000 +0200 ++++ configure 2016-09-12 16:32:22.826387000 +0200 +@@ -871,6 +871,8 @@ GLPROTO_CFLAGS XLIBGL_LIBS XLIBGL_CFLAGS @@ -8,9 +8,9 @@ +LIBDEVQ_CFLAGS LIBUDEV_LIBS LIBUDEV_CFLAGS - MESA_LLVM -@@ -1156,6 +1158,8 @@ - LIBDRM_LIBS + ENABLE_SHADER_CACHE_FALSE +@@ -1206,6 +1208,8 @@ + OPENSSL_LIBS LIBUDEV_CFLAGS LIBUDEV_LIBS +LIBDEVQ_CFLAGS @@ -18,7 +18,7 @@ XLIBGL_CFLAGS XLIBGL_LIBS GLPROTO_CFLAGS -@@ -1966,6 +1970,10 @@ +@@ -2047,6 +2051,10 @@ C compiler flags for LIBUDEV, overriding pkg-config LIBUDEV_LIBS linker flags for LIBUDEV, overriding pkg-config @@ -29,15 +29,15 @@ XLIBGL_CFLAGS C compiler flags for XLIBGL, overriding pkg-config XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config -@@ -5246,6 +5254,7 @@ +@@ -5385,6 +5393,7 @@ DRI3PROTO_REQUIRED=1.0 PRESENTPROTO_REQUIRED=1.0 LIBUDEV_REQUIRED=151 +LIBDEVQ_REQUIRED=0.0.2 GLPROTO_REQUIRED=1.4.14 LIBOMXIL_BELLAGIO_REQUIRED=0.0 - LIBVA_REQUIRED=0.35.0 -@@ -21035,7 +21044,7 @@ + LIBVA_REQUIRED=0.38.0 +@@ -21830,7 +21839,7 @@ case "$host_os" in @@ -46,7 +46,7 @@ dri3_default=yes ;; *) -@@ -21543,6 +21552,78 @@ +@@ -22966,6 +22975,78 @@ have_libudev=yes fi @@ -125,7 +125,7 @@ # Check whether --enable-sysfs was given. if test "${enable_sysfs+set}" = set; then : enableval=$enable_sysfs; have_sysfs="$enableval" -@@ -22258,6 +22339,10 @@ +@@ -23772,6 +23853,10 @@ DEFINES="$DEFINES -DHAVE_LIBUDEV" have_pci_id=yes fi @@ -136,10 +136,16 @@ if test "$have_sysfs" = yes; then DEFINES="$DEFINES -DHAVE_SYSFS" -@@ -22396,6 +22481,22 @@ +@@ -23905,9 +23990,28 @@ + ;; + esac ;; - gnu*) +- *freebsd* | dragonfly* | *netbsd* | openbsd*) ++ *netbsd* | openbsd* | dragonfly*) DEFINES="$DEFINES -DHAVE_ALIAS" + ;; ++ *freebsd*) ++ DEFINES="$DEFINES -DHAVE_ALIAS" + if test "x$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + fi @@ -156,10 +162,11 @@ + fi + ;; + esac ++ ;; + gnu*) + DEFINES="$DEFINES -DHAVE_ALIAS" ;; - cygwin*) - if test "x$with_dri_drivers" = "xyes"; then -@@ -23195,6 +23296,8 @@ +@@ -24763,6 +24867,8 @@ if test "x$need_pci_id$have_libudev" = xyesyes; then GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED" @@ -168,7 +175,7 @@ else GBM_PC_REQ_PRIV="" fi -@@ -24018,9 +24121,19 @@ +@@ -25698,9 +25804,19 @@ as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5 fi @@ -188,7 +195,20 @@ if test "x$have_libclc" = xno; then as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover. -@@ -24835,9 +24948,6 @@ +@@ -26229,9 +26345,9 @@ + strip_unwanted_llvm_flags() { + # Use \> (marks the end of the word) + echo `$1` | sed \ +- -e 's/-march=\S*//g' \ +- -e 's/-mtune=\S*//g' \ +- -e 's/-mcpu=\S*//g' \ ++ -e 's/-march=[:graph:]* //g' \ ++ -e 's/-mtune=[:graph:]* //g' \ ++ -e 's/-mcpu=[:graph:]* //g' \ + -e 's/-DNDEBUG\>//g' \ + -e 's/-D_GNU_SOURCE\>//g' \ + -e 's/-pedantic\>//g' \ +@@ -26520,9 +26636,6 @@ CLANG_LIBDIR=${LLVM_LIBDIR} fi CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION} diff --git a/graphics/libGL/files/patch-src__gallium__auxiliary__util__u_network.c b/graphics/libGL/files/patch-src__gallium__auxiliary__util__u_network.c new file mode 100644 index 00000000000..bad850468bd --- /dev/null +++ b/graphics/libGL/files/patch-src__gallium__auxiliary__util__u_network.c @@ -0,0 +1,12 @@ +--- src/gallium/auxiliary/util/u_network.c.orig 2016-06-09 20:55:43.663754000 +0200 ++++ src/gallium/auxiliary/util/u_network.c 2016-06-09 20:57:58.602711000 +0200 +@@ -7,7 +7,8 @@ + # include <winsock2.h> + # include <windows.h> + #elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \ +- defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) ++ defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) || \ ++ defined(PIPE_OS_BSD) + # include <sys/socket.h> + # include <netinet/in.h> + # include <unistd.h> diff --git a/graphics/libGL/files/patch-src__loader__loader.c b/graphics/libGL/files/patch-src__loader__loader.c index 01def0be9f5..f0c174cdc94 100644 --- a/graphics/libGL/files/patch-src__loader__loader.c +++ b/graphics/libGL/files/patch-src__loader__loader.c @@ -1,6 +1,6 @@ ---- src/loader/loader.c.orig 2015-08-22 12:01:00.000000000 +0200 -+++ src/loader/loader.c 2015-08-24 10:50:05.251081000 +0200 -@@ -70,7 +70,7 @@ +--- src/loader/loader.c.orig 2016-06-21 18:26:10.000000000 +0200 ++++ src/loader/loader.c 2016-09-08 21:04:02.301424000 +0200 +@@ -70,11 +70,12 @@ #include <stdarg.h> #include <stdio.h> #include <string.h> @@ -9,7 +9,75 @@ #include <assert.h> #include <dlfcn.h> #include <unistd.h> -@@ -505,6 +505,54 @@ sysfs_get_pci_id_for_fd(int fd, int *ven + #include <stdlib.h> ++#include <limits.h> + #ifdef USE_DRICONF + #include "xmlconfig.h" + #include "xmlpool.h" +@@ -104,16 +105,60 @@ static void default_logger(int level, co + + static void (*log_)(int level, const char *fmt, ...) = default_logger; + ++/* ++ * XXX temporary workaround, because FreeBSD doesn't provide ++ * pcibus device sysctl trees for renderD and controlD nodes (yet) ++ * Copied from our patch in libdrm. ++ */ ++static char * ++drmBSDDeviceNameHack(const char *path) ++{ ++ int i, size; ++ long val; ++ char *hacked_path; ++ ++ for (i = 0; i < strlen(path); i++) ++ { ++ val = strtol(&path[i], NULL, 10); ++ ++ if (val != 0) ++ break; ++ } ++ ++ ++ if (val >= 64 && val < 128) // controlD node ++ { ++ val = val - 64; ++ }else if (val >= 128 && val < 256) // renderD node ++ { ++ val = val - 128; ++ } ++ ++ size = sizeof(DRM_DIR_NAME) + sizeof("/card") + sizeof(val); ++ hacked_path = malloc(size); ++ ++ snprintf(hacked_path, size, DRM_DIR_NAME "/card%li", val); ++ ++// printf("path: %s, hacked_path: %s, val: %li\n", path, hacked_path, val); ++ ++ return hacked_path; ++} ++ ++ + int + loader_open_device(const char *device_name) + { + int fd; ++ char hacked_name[PATH_MAX + 1]; ++ ++ snprintf(hacked_name, PATH_MAX, "%s", drmBSDDeviceNameHack(device_name)); ++ + #ifdef O_CLOEXEC +- fd = open(device_name, O_RDWR | O_CLOEXEC); ++ fd = open(hacked_name, O_RDWR | O_CLOEXEC); + if (fd == -1 && errno == EINVAL) + #endif + { +- fd = open(device_name, O_RDWR); ++ fd = open(hacked_name, O_RDWR); + if (fd != -1) + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + } +@@ -507,6 +552,54 @@ sysfs_get_pci_id_for_fd(int fd, int *ven } #endif @@ -64,7 +132,7 @@ #if defined(HAVE_LIBDRM) /* for i915 */ #include <i915_drm.h> -@@ -588,6 +636,10 @@ loader_get_pci_id_for_fd(int fd, int *ve +@@ -590,6 +683,10 @@ loader_get_pci_id_for_fd(int fd, int *ve if (sysfs_get_pci_id_for_fd(fd, vendor_id, chip_id)) return 1; #endif @@ -75,8 +143,8 @@ #if HAVE_LIBDRM if (drm_get_pci_id_for_fd(fd, vendor_id, chip_id)) return 1; -@@ -685,6 +737,13 @@ loader_get_device_name_for_fd(int fd) - if ((result = sysfs_get_device_name_for_fd(fd))) +@@ -709,6 +806,13 @@ loader_get_device_name_for_fd(int fd) + if ((result = drm_get_device_name_for_fd(fd))) return result; #endif +#if HAVE_LIBDEVQ diff --git a/graphics/libGL/files/patch-src__mapi__entry_x86-64_tls.h b/graphics/libGL/files/patch-src__mapi__entry_x86-64_tls.h deleted file mode 100644 index 32d4b0577c3..00000000000 --- a/graphics/libGL/files/patch-src__mapi__entry_x86-64_tls.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/mapi/entry_x86-64_tls.h.orig 2013-10-05 05:59:22.000000000 +0200 -+++ src/mapi/entry_x86-64_tls.h 2014-07-29 20:28:05.000000000 +0200 -@@ -63,8 +63,8 @@ entry_patch_public(void) - { - } - --static char --x86_64_entry_start[]; -+extern char -+x86_64_entry_start[] __attribute__((visibility("hidden"))); - - mapi_func - entry_get_public(int slot) diff --git a/graphics/libGL/files/patch-src__mapi__entry_x86_tls.h b/graphics/libGL/files/patch-src__mapi__entry_x86_tls.h deleted file mode 100644 index 51f2839b1a0..00000000000 --- a/graphics/libGL/files/patch-src__mapi__entry_x86_tls.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/mapi/entry_x86_tls.h.orig 2013-10-05 05:59:22.000000000 +0200 -+++ src/mapi/entry_x86_tls.h 2014-07-29 20:28:05.000000000 +0200 -@@ -73,8 +73,8 @@ __asm__(".text"); - extern unsigned long - x86_current_tls(); - --static char x86_entry_start[]; --static char x86_entry_end[]; -+extern char x86_entry_start[] __attribute__((visibility("hidden"))); -+extern char x86_entry_end[] __attribute__((visibility("hidden"))); - - void - entry_patch_public(void) diff --git a/graphics/libGL/files/patch-src__mapi__entry_x86_tsd.h b/graphics/libGL/files/patch-src__mapi__entry_x86_tsd.h deleted file mode 100644 index 0aceed57416..00000000000 --- a/graphics/libGL/files/patch-src__mapi__entry_x86_tsd.h +++ /dev/null @@ -1,13 +0,0 @@ ---- src/mapi/entry_x86_tsd.h.orig 2013-10-05 05:59:22.000000000 +0200 -+++ src/mapi/entry_x86_tsd.h 2014-07-29 20:28:05.000000000 +0200 -@@ -60,8 +60,8 @@ __asm__(".balign 32\n" - #include <string.h> - #include "u_execmem.h" - --static const char x86_entry_start[]; --static const char x86_entry_end[]; -+extern const char x86_entry_start[] __attribute__((visibility("hidden"))); -+extern const char x86_entry_end[] __attribute__((visibility("hidden"))); - - void - entry_patch_public(void) diff --git a/graphics/libGL/pkg-plist b/graphics/libGL/pkg-plist index 153f4c2a699..44f67493cd8 100644 --- a/graphics/libGL/pkg-plist +++ b/graphics/libGL/pkg-plist @@ -5,6 +5,7 @@ include/GL/glext.h include/GL/glx.h include/GL/glx_mangle.h include/GL/glxext.h +include/GL/mesa_glinterop.h @comment include/GL/osmesa.h include/GL/wglext.h lib/.mesa/libGL.so diff --git a/graphics/libdrm/Makefile b/graphics/libdrm/Makefile index a5d6fe96e8f..5ed3e6a954f 100644 --- a/graphics/libdrm/Makefile +++ b/graphics/libdrm/Makefile @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= libdrm -PORTVERSION= 2.4.66 +PORTVERSION= 2.4.70 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= graphics x11 MASTER_SITES= http://dri.freedesktop.org/libdrm/ @@ -10,12 +11,15 @@ MASTER_SITES= http://dri.freedesktop.org/libdrm/ MAINTAINER= x11@FreeBSD.org COMMENT= Userspace interface to kernel Direct Rendering Module services +BUILD_DEPENDS= libdevq>=0.0.3:devel/libdevq LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ + libdevq.so:devel/libdevq \ libpthread-stubs.so:devel/libpthread-stubs USES= libtool pkgconfig tar:bzip2 GNU_CONFIGURE= yes USE_LDCONFIG= yes +CPPFLAGS+= -Werror=uninitialized INSTALL_TARGET= install-strip OPTIONS_DEFINE= MANPAGES @@ -51,12 +55,19 @@ CONFIGURE_ARGS+=--disable-vmwgfx .if ${ARCH} == amd64 || ${ARCH} == i386 PLIST_SUB+= INTEL_DRIVER="" PLIST_SUB+= RADEON_DRIVERS="" +PLIST_SUB+= VC4_DRIVERS="@comment " .elif ${ARCH} == ia64 || ${ARCH} == powerpc || ${ARCH} == powerpc64 PLIST_SUB+= INTEL_DRIVER="@comment " PLIST_SUB+= RADEON_DRIVERS="" +PLIST_SUB+= VC4_DRIVERS="@comment " +.elif ${ARCH} == arm6 || ${ARCH} == arm64 +PLIST_SUB+= INTEL_DRIVER="@comment " +PLIST_SUB+= READEON_DRIVERS="@comment" +PLIST_SUB+= VC4_DRIVERS="" .else PLIST_SUB+= INTEL_DRIVER="@comment " PLIST_SUB+= RADEON_DRIVERS="@comment " +PLIST_SUB+= VC4_DRIVERS="@comment " .endif # This variable is not for users. So use a non-default name, intended for diff --git a/graphics/libdrm/distinfo b/graphics/libdrm/distinfo index 28745f22c10..38cd71ef7f4 100644 --- a/graphics/libdrm/distinfo +++ b/graphics/libdrm/distinfo @@ -1,2 +1,3 @@ -SHA256 (libdrm-2.4.66.tar.bz2) = 79cb8e988749794edfb2d777b298d5292eff353bbbb71ed813589e61d2bc2d76 -SIZE (libdrm-2.4.66.tar.bz2) = 694574 +TIMESTAMP = 1470770711 +SHA256 (libdrm-2.4.70.tar.bz2) = b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b +SIZE (libdrm-2.4.70.tar.bz2) = 692277 diff --git a/graphics/libdrm/files/Makefile.am b/graphics/libdrm/files/Makefile.am new file mode 100644 index 00000000000..5cb9e7e4f3c --- /dev/null +++ b/graphics/libdrm/files/Makefile.am @@ -0,0 +1,14 @@ +--- Makefile.am.orig 2016-06-23 14:29:40.575882000 +0200 ++++ Makefile.am 2016-06-23 14:38:48.752016000 +0200 +@@ -108,9 +108,9 @@ + libdrm_la_LTLIBRARIES = libdrm.la + libdrm_ladir = $(libdir) + libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined +-libdrm_la_LIBADD = @CLOCK_LIB@ -lm ++libdrm_la_LIBADD = @CLOCK_LIB@ -lm @LIBDEVQ_LIBS@ + +-libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm ++libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm @LIBDEVQ_CFLAGS@ + AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(VALGRIND_CFLAGS) diff --git a/graphics/libdrm/files/configure.ac b/graphics/libdrm/files/configure.ac new file mode 100644 index 00000000000..5ae7c33940f --- /dev/null +++ b/graphics/libdrm/files/configure.ac @@ -0,0 +1,39 @@ +--- configure.ac.orig 2016-04-28 02:52:47.000000000 +0200 ++++ configure.ac 2016-07-09 18:53:39.021028000 +0200 +@@ -71,6 +71,11 @@ + [Enable support for using udev instead of mknod (default: disabled)])], + [UDEV=$enableval], [UDEV=no]) + ++AC_ARG_ENABLE([devq], ++ [AS_HELP_STRING([--enable-devq], ++ [Enable support for using devq for device detection (default: disabled)])], ++ [DEVQ=$enableval], [DEVQ=no]) ++ + AC_ARG_ENABLE(libkms, + AS_HELP_STRING([--disable-libkms], + [Disable KMS mm abstraction library (default: auto, enabled on supported platforms)]), +@@ -313,6 +318,10 @@ + AC_DEFINE(UDEV, 1, [Have UDEV support]) + fi + ++if test "x$DEVQ" = xyes; then ++ AC_DEFINE(DEVQ, 1, [Have DEVQ support]) ++fi ++ + AC_CANONICAL_HOST + if test "x$LIBKMS" = xauto ; then + case $host_os in +@@ -444,6 +453,13 @@ + fi + AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) + ++# For FreeBSD support ++PKG_CHECK_MODULES([LIBDEVQ], [libdevq-1.0 >= 0.0.3], [HAVE_LIBDEVQ=yes], [HAVE_LIBDEVQ=no]) ++if test "x$HAVE_LIBDEVQ" = xyes; then ++ AC_DEFINE(HAVE_LIBDEVQ, 1, [Have libdevq support]) ++fi ++AM_CONDITIONAL(HAVE_LIBDEVQ, [test "x$HAVE_LIBDEVQ" = xyes]) ++ + # xsltproc for docbook manpages + AC_ARG_ENABLE([manpages], + AS_HELP_STRING([--enable-manpages], [enable manpages @<:@default=auto@:>@]), diff --git a/graphics/libdrm/files/extra-xf86drm.c b/graphics/libdrm/files/extra-xf86drm.c index 382a32da2ac..441b22bc9f3 100644 --- a/graphics/libdrm/files/extra-xf86drm.c +++ b/graphics/libdrm/files/extra-xf86drm.c @@ -6,12 +6,13 @@ 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 @@ + +--- xf86drm.c.orig 2016-07-24 20:49:16.818534000 +0200 ++++ xf86drm.c 2016-07-24 20:49:41.965346000 +0200 +@@ -173,7 +173,7 @@ drmIoctl(int fd, unsigned long request, do { - ret = ioctl(fd, request, arg); + ret = ioctl(fd, request, arg); - } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); + } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == 512)); return ret; diff --git a/graphics/libdrm/files/patch-Makefile.in b/graphics/libdrm/files/patch-Makefile.in new file mode 100644 index 00000000000..51af0e4c456 --- /dev/null +++ b/graphics/libdrm/files/patch-Makefile.in @@ -0,0 +1,13 @@ +--- Makefile.in.orig 2016-06-28 12:57:42.345759000 +0200 ++++ Makefile.in 2016-06-28 12:58:17.744034000 +0200 +@@ -553,8 +553,8 @@ + libdrm_la_LTLIBRARIES = libdrm.la + libdrm_ladir = $(libdir) + libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined +-libdrm_la_LIBADD = @CLOCK_LIB@ -lm +-libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm ++libdrm_la_LIBADD = @CLOCK_LIB@ -lm @LIBDEVQ_LIBS@ ++libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm @LIBDEVQ_CFLAGS@ + AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(VALGRIND_CFLAGS) diff --git a/graphics/libdrm/files/patch-amdgpu_amdgpu__cs.c b/graphics/libdrm/files/patch-amdgpu_amdgpu__cs.c new file mode 100644 index 00000000000..447b570ee88 --- /dev/null +++ b/graphics/libdrm/files/patch-amdgpu_amdgpu__cs.c @@ -0,0 +1,20 @@ +--- amdgpu/amdgpu_cs.c.orig 2016-09-18 17:02:04.534919000 +0200 ++++ amdgpu/amdgpu_cs.c 2016-09-18 17:03:49.141704000 +0200 +@@ -124,7 +124,7 @@ int amdgpu_cs_ctx_free(amdgpu_context_ha + for (i = 0; i < AMDGPU_HW_IP_NUM; i++) { + for (j = 0; j < AMDGPU_HW_IP_INSTANCE_MAX_COUNT; j++) { + for (k = 0; k < AMDGPU_CS_MAX_RINGS; k++) { +- amdgpu_semaphore_handle sem; ++ amdgpu_semaphore_handle sem = NULL; + LIST_FOR_EACH_ENTRY(sem, &context->sem_list[i][j][k], list) { + list_del(&sem->list); + amdgpu_cs_reset_sem(sem); +@@ -179,7 +179,7 @@ static int amdgpu_cs_submit_one(amdgpu_c + struct drm_amdgpu_cs_chunk_dep *dependencies = NULL; + struct drm_amdgpu_cs_chunk_dep *sem_dependencies = NULL; + struct list_head *sem_list; +- amdgpu_semaphore_handle sem, tmp; ++ amdgpu_semaphore_handle sem = NULL, tmp; + uint32_t i, size, sem_count = 0; + bool user_fence; + int r = 0; diff --git a/graphics/libdrm/files/patch-amdgpu_amdgpu__vamgr.c b/graphics/libdrm/files/patch-amdgpu_amdgpu__vamgr.c new file mode 100644 index 00000000000..bb5fb298385 --- /dev/null +++ b/graphics/libdrm/files/patch-amdgpu_amdgpu__vamgr.c @@ -0,0 +1,38 @@ +--- amdgpu/amdgpu_vamgr.c.orig 2016-09-18 17:02:13.553233000 +0200 ++++ amdgpu/amdgpu_vamgr.c 2016-09-18 17:04:51.845054000 +0200 +@@ -57,7 +57,7 @@ drm_private void amdgpu_vamgr_init(struc + + drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr) + { +- struct amdgpu_bo_va_hole *hole, *tmp; ++ struct amdgpu_bo_va_hole *hole = NULL, *tmp; + LIST_FOR_EACH_ENTRY_SAFE(hole, tmp, &mgr->va_holes, list) { + list_del(&hole->list); + free(hole); +@@ -69,7 +69,7 @@ drm_private uint64_t + amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, + uint64_t alignment, uint64_t base_required) + { +- struct amdgpu_bo_va_hole *hole, *n; ++ struct amdgpu_bo_va_hole *hole = NULL, *n; + uint64_t offset = 0, waste = 0; + + alignment = MAX2(alignment, mgr->va_alignment); +@@ -157,7 +157,7 @@ amdgpu_vamgr_find_va(struct amdgpu_bo_va + drm_private void + amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size) + { +- struct amdgpu_bo_va_hole *hole; ++ struct amdgpu_bo_va_hole *hole = NULL; + + if (va == AMDGPU_INVALID_VA_ADDRESS) + return; +@@ -177,7 +177,7 @@ amdgpu_vamgr_free_va(struct amdgpu_bo_va + } + } + } else { +- struct amdgpu_bo_va_hole *next; ++ struct amdgpu_bo_va_hole *next = NULL; + + hole = container_of(&mgr->va_holes, hole, list); + LIST_FOR_EACH_ENTRY(next, &mgr->va_holes, list) { diff --git a/graphics/libdrm/files/patch-config.h.in b/graphics/libdrm/files/patch-config.h.in new file mode 100644 index 00000000000..d9be2292b55 --- /dev/null +++ b/graphics/libdrm/files/patch-config.h.in @@ -0,0 +1,22 @@ +--- config.h.in.orig 2016-06-24 22:01:22.827102000 +0200 ++++ config.h.in 2016-06-24 22:01:44.000000000 +0200 +@@ -8,6 +8,9 @@ + /* Define to 1 if using `alloca.c'. */ + #undef C_ALLOCA + ++/* Have DEVQ support */ ++#undef DEVQ ++ + /* Define to 1 if you have `alloca', as a function or macro. */ + #undef HAVE_ALLOCA + +@@ -48,6 +51,9 @@ + /* Define to 1 if you have the <inttypes.h> header file. */ + #undef HAVE_INTTYPES_H + ++/* Have libdevq support */ ++#undef HAVE_LIBDEVQ ++ + /* Enable if your compiler supports the Intel __sync_* atomic primitives */ + #undef HAVE_LIBDRM_ATOMIC_PRIMITIVES + diff --git a/graphics/libdrm/files/patch-configure b/graphics/libdrm/files/patch-configure new file mode 100644 index 00000000000..83d00302d2c --- /dev/null +++ b/graphics/libdrm/files/patch-configure @@ -0,0 +1,182 @@ +--- configure.orig 2016-07-09 18:52:55.554602000 +0200 ++++ configure 2016-07-09 18:54:17.173605000 +0200 +@@ -646,6 +646,10 @@ + MANPAGES_STYLESHEET + BUILD_MANPAGES_FALSE + BUILD_MANPAGES_TRUE ++HAVE_LIBDEVQ_FALSE ++HAVE_LIBDEVQ_TRUE ++LIBDEVQ_LIBS ++LIBDEVQ_CFLAGS + HAVE_LIBUDEV_FALSE + HAVE_LIBUDEV_TRUE + LIBUDEV_LIBS +@@ -840,6 +844,7 @@ + with_sysroot + enable_libtool_lock + enable_udev ++enable_devq + enable_libkms + enable_intel + enable_radeon +@@ -882,6 +887,8 @@ + CAIRO_LIBS + LIBUDEV_CFLAGS + LIBUDEV_LIBS ++LIBDEVQ_CFLAGS ++LIBDEVQ_LIBS + VALGRIND_CFLAGS + VALGRIND_LIBS' + +@@ -1516,6 +1523,8 @@ + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-udev Enable support for using udev instead of mknod + (default: disabled) ++ --enable-devq Enable support for using devq for device detection ++ (default: disabled) + --disable-libkms Disable KMS mm abstraction library (default: auto, + enabled on supported platforms) + --disable-intel Enable support for intel's KMS API (default: auto, +@@ -1596,6 +1605,10 @@ + C compiler flags for LIBUDEV, overriding pkg-config + LIBUDEV_LIBS + linker flags for LIBUDEV, overriding pkg-config ++ LIBDEVQ_CFLAGS ++ C compiler flags for LIBDEVQ, overriding pkg-config ++ LIBDEVQ_LIBS ++ linker flags for LIBDEVQ, overriding pkg-config + VALGRIND_CFLAGS + C compiler flags for VALGRIND, overriding pkg-config + VALGRIND_LIBS +@@ -13384,6 +13397,14 @@ + fi + + ++# Check whether --enable-devq was given. ++if test "${enable_devq+set}" = set; then : ++ enableval=$enable_devq; DEVQ=$enableval ++else ++ DEVQ=no ++fi ++ ++ + # Check whether --enable-libkms was given. + if test "${enable_libkms+set}" = set; then : + enableval=$enable_libkms; LIBKMS=$enableval +@@ -13902,6 +13923,12 @@ + + fi + ++if test "x$DEVQ" = xyes; then ++ ++$as_echo "#define DEVQ 1" >>confdefs.h ++ ++fi ++ + + if test "x$LIBKMS" = xauto ; then + case $host_os in +@@ -14432,6 +14459,92 @@ + fi + + ++# For FreeBSD support ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDEVQ" >&5 ++$as_echo_n "checking for LIBDEVQ... " >&6; } ++ ++if test -n "$LIBDEVQ_CFLAGS"; then ++ pkg_cv_LIBDEVQ_CFLAGS="$LIBDEVQ_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= 0.0.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= 0.0.3") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBDEVQ_CFLAGS=`$PKG_CONFIG --cflags "libdevq-1.0 >= 0.0.3" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$LIBDEVQ_LIBS"; then ++ pkg_cv_LIBDEVQ_LIBS="$LIBDEVQ_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= 0.0.3\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= 0.0.3") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_LIBDEVQ_LIBS=`$PKG_CONFIG --libs "libdevq-1.0 >= 0.0.3" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdevq-1.0 >= 0.0.3" 2>&1` ++ else ++ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0 >= 0.0.3" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$LIBDEVQ_PKG_ERRORS" >&5 ++ ++ HAVE_LIBDEVQ=no ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ HAVE_LIBDEVQ=no ++else ++ LIBDEVQ_CFLAGS=$pkg_cv_LIBDEVQ_CFLAGS ++ LIBDEVQ_LIBS=$pkg_cv_LIBDEVQ_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ HAVE_LIBDEVQ=yes ++fi ++if test "x$HAVE_LIBDEVQ" = xyes; then ++ ++$as_echo "#define HAVE_LIBDEVQ 1" >>confdefs.h ++ ++fi ++ if test "x$HAVE_LIBDEVQ" = xyes; then ++ HAVE_LIBDEVQ_TRUE= ++ HAVE_LIBDEVQ_FALSE='#' ++else ++ HAVE_LIBDEVQ_TRUE='#' ++ HAVE_LIBDEVQ_FALSE= ++fi ++ ++ + # xsltproc for docbook manpages + # Check whether --enable-manpages was given. + if test "${enable_manpages+set}" = set; then : +@@ -14838,6 +14951,10 @@ + as_fn_error $? "conditional \"HAVE_LIBUDEV\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${HAVE_LIBDEVQ_TRUE}" && test -z "${HAVE_LIBDEVQ_FALSE}"; then ++ as_fn_error $? "conditional \"HAVE_LIBDEVQ\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${BUILD_MANPAGES_TRUE}" && test -z "${BUILD_MANPAGES_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MANPAGES\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c b/graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c deleted file mode 100644 index 24a5402ff43..00000000000 --- a/graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c +++ /dev/null @@ -1,10 +0,0 @@ ---- tests/kms/kms-universal-planes.c.orig 2016-02-15 12:05:56.305353000 +0100 -+++ tests/kms/kms-universal-planes.c 2016-02-15 12:06:11.194126000 +0100 -@@ -32,6 +32,7 @@ - #include <stdio.h> - #include <string.h> - #include <unistd.h> -+#include <sys/select.h> - - #include <drm_fourcc.h> - #include "xf86drm.h" diff --git a/graphics/libdrm/files/patch-xf86drm.c b/graphics/libdrm/files/patch-xf86drm.c new file mode 100644 index 00000000000..b8383a0c0e2 --- /dev/null +++ b/graphics/libdrm/files/patch-xf86drm.c @@ -0,0 +1,202 @@ +--- xf86drm.c.orig 2016-09-08 21:04:36.283417000 +0200 ++++ xf86drm.c 2016-09-08 21:10:16.495306000 +0200 +@@ -62,6 +62,10 @@ + #endif + #include <math.h> + ++#ifdef HAVE_LIBDEVQ ++#include "libdevq.h" ++#endif ++ + /* Not all systems have MAP_FAILED defined */ + #ifndef MAP_FAILED + #define MAP_FAILED ((void *)-1) +@@ -82,8 +86,12 @@ + #define DRM_RENDER_MINOR_NAME "renderD" + #endif + +-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +-#define DRM_MAJOR 145 ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#define DRM_MAJOR 0 ++#endif ++ ++#if defined(__DragonFly__) ++#define DRM_MAJOR 65 /* was 154 XXX needs checking */ + #endif + + #ifdef __NetBSD__ +@@ -532,6 +540,7 @@ static int drmGetMinorType(int minor) + } + } + ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + static const char *drmGetMinorName(int type) + { + switch (type) { +@@ -545,6 +554,7 @@ static const char *drmGetMinorName(int t + return NULL; + } + } ++#endif + + /** + * Open the device by bus ID. +@@ -2817,6 +2827,15 @@ static char *drmGetMinorNameForFD(int fd + + out_close_dir: + closedir(sysdir); ++#elif defined(__FreeBSD__) || defined(__DragonFly__) ++ struct stat buf; ++ char name[64]; ++ ++ fstat(fd, &buf); ++ snprintf(name, sizeof(name), "/dev/%s", ++ devname(buf.st_rdev, S_IFCHR)); ++ ++ return strdup(name); + #else + #warning "Missing implementation of drmGetMinorNameForFD" + #endif +@@ -2854,12 +2873,19 @@ static int drmParseSubsystemType(int maj + return DRM_BUS_PCI; + + return -EINVAL; ++#elif defined(__FreeBSD__) || defined(__DragonFly__) ++ /* XXX: Don't know how to get the subsystem type, hardcode for now. ++ * The code following the call to this function needs depends on ++ * information provided by the /pci subsystem on linux. No replacement ++ * found yet for FreeBSD. */ ++ return DRM_BUS_PCI; + #else + #warning "Missing implementation of drmParseSubsystemType" + return -EINVAL; + #endif + } + ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) + { + #ifdef __linux__ +@@ -2901,6 +2927,75 @@ static int drmParsePciBusInfo(int maj, i + return -EINVAL; + #endif + } ++#else ++ ++/* ++ * XXX temporary workaround, because FreeBSD doesn't provide ++ * pcibus device sysctl trees for renderD and controlD nodes (yet) ++ */ ++static char * ++drmBSDDeviceNameHack(const char *path) ++{ ++ int i, size; ++ long val; ++ char *hacked_path; ++ ++ for (i = 0; i < strlen(path); i++) ++ { ++ val = strtol(&path[i], NULL, 10); ++ ++ if (val != 0) ++ break; ++ } ++ ++ if (val >= 64 && val < 128) // controlD node ++ { ++ val = val - 64; ++ }else if (val >= 128 && val < 256) // renderD node ++ { ++ val = val - 128; ++ } ++ ++ size = sizeof(DRM_DIR_NAME) + sizeof("/card") + sizeof(val); ++ ++ if ((hacked_path = malloc(size)) == NULL) ++ return NULL; ++ ++ snprintf(hacked_path, size, DRM_DIR_NAME "/card%li", val); ++ ++ return hacked_path; ++} ++ ++static int ++drmParsePciBusInfoBSD(const char *path, drmPciBusInfoPtr info) ++{ ++ int fd, ret; ++ int domain = 0, bus = 0, slot = 0, function = 0; ++ ++ char hacked_path[PATH_MAX + 1]; ++ ++ snprintf(hacked_path, PATH_MAX, "%s", drmBSDDeviceNameHack(path)); ++ ++ fd = open(hacked_path, O_RDONLY); ++ ++ if (fd < 0) ++ return -errno; ++ ++ ret = devq_device_get_pcibusaddr(fd, &domain, &bus, &slot, &function); ++ ++ if (ret < 0) ++ return -1; ++ ++ info->domain = (uint16_t) domain; ++ info->bus = (uint8_t) bus; ++ info->dev = (uint8_t) slot; ++ info->func = (uint8_t) function; ++ ++ close(fd); ++ ++ return 0; ++} ++#endif + + static int drmCompareBusInfo(drmDevicePtr a, drmDevicePtr b) + { +@@ -2971,6 +3066,32 @@ static int drmParsePciDeviceInfo(const c + device->subdevice_id = config[46] | (config[47] << 8); + + return 0; ++#elif defined(__FreeBSD__) || defined(__DragonFly__) ++ ++ int fd, vendor_id = 0, device_id = 0, subvendor_id = 0, ++ subdevice_id = 0, revision_id = 0; ++ char path[PATH_MAX + 1]; ++ char hacked_path[PATH_MAX + 1]; ++ ++ snprintf(path, PATH_MAX, DRM_DIR_NAME "/%s", d_name); ++ ++ snprintf(hacked_path, PATH_MAX, "%s", drmBSDDeviceNameHack(path)); ++ ++ fd = open(hacked_path, O_RDONLY); ++ ++ if (fd < 0) ++ return -errno; ++ ++ devq_device_get_pciid_full_from_fd(fd, &vendor_id, &device_id, ++ &subvendor_id, &subdevice_id, &revision_id); ++ ++ device->vendor_id = (uint16_t) vendor_id; ++ device->device_id = (uint16_t) device_id; ++ device->subvendor_id = (uint16_t) subvendor_id; ++ device->subdevice_id = (uint16_t) subdevice_id; ++ device->revision_id = (uint8_t) revision_id; ++ ++ return 0; + #else + #warning "Missing implementation of drmParsePciDeviceInfo" + return -EINVAL; +@@ -3030,7 +3151,12 @@ static int drmProcessPciDevice(drmDevice + + (*device)->businfo.pci = (drmPciBusInfoPtr)addr; + ++#if defined(__FreeBSD__) || defined(__DragonFly__) ++ ret = drmParsePciBusInfoBSD(node, (*device)->businfo.pci); ++#else + ret = drmParsePciBusInfo(maj, min, (*device)->businfo.pci); ++#endif ++ + if (ret) + goto free_device; + diff --git a/graphics/libdrm/pkg-plist b/graphics/libdrm/pkg-plist index f3db1823172..55b9eeae72a 100644 --- a/graphics/libdrm/pkg-plist +++ b/graphics/libdrm/pkg-plist @@ -33,7 +33,11 @@ include/libdrm/radeon_drm.h include/libdrm/savage_drm.h include/libdrm/sis_drm.h include/libdrm/tegra_drm.h +include/libdrm/vc4_drm.h +%%VC4_DRIVERS%%include/libdrm/vc4_packet.h +%%VC4_DRIVERS%%include/libdrm/vc4_qpu_defines.h include/libdrm/via_drm.h +include/libdrm/virtgpu_drm.h %%KMS%%include/libkms/libkms.h include/xf86drm.h include/xf86drmMode.h @@ -60,6 +64,7 @@ libdata/pkgconfig/libdrm.pc %%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc %%NOUVEAU%%libdata/pkgconfig/libdrm_nouveau.pc %%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc +%%VC4_DRIVERS%%libdata/pkgconfig/libdrm_vc4.pc %%KMS%%libdata/pkgconfig/libkms.pc %%MAN%%man/man3/drmAvailable.3.gz %%MAN%%man/man3/drmHandleEvent.3.gz diff --git a/graphics/piglit/pkg-plist b/graphics/piglit/pkg-plist index 1882e60e82e..531fdf47078 100644 --- a/graphics/piglit/pkg-plist +++ b/graphics/piglit/pkg-plist @@ -56,7 +56,7 @@ bin/piglit @dir %%DATADIR%%/tests/spec/arb_compute_shader/compiler @dir %%DATADIR%%/tests/spec/arb_copy_buffer @dir %%DATADIR%%/tests/spec/arb_copy_image -@dir %%DATADIR%%/tests/spec/arb_debug_output +@dir %%DATADIR%%/tests/spec/arb_%%CMAKE_BUILD_TYPE%%_output @dir %%DATADIR%%/tests/spec/arb_depth_clamp @dir %%DATADIR%%/tests/spec/arb_direct_state_access @dir %%DATADIR%%/tests/spec/arb_draw_buffers @@ -152,7 +152,7 @@ bin/piglit @dir %%DATADIR%%/tests/spec/glx_ext_import_context @dir %%DATADIR%%/tests/spec/glx_mesa_query_renderer @dir %%DATADIR%%/tests/spec/glx_oml_sync_control -@dir %%DATADIR%%/tests/spec/khr_debug +@dir %%DATADIR%%/tests/spec/khr_%%CMAKE_BUILD_TYPE%% @dir %%DATADIR%%/tests/spec/mesa_pack_invert @dir %%DATADIR%%/tests/spec/nv_conditional_render @dir %%DATADIR%%/tests/spec/nv_texture_barrier diff --git a/lang/clover/Makefile b/lang/clover/Makefile index 30001ecd145..0ed7f3147d3 100644 --- a/lang/clover/Makefile +++ b/lang/clover/Makefile @@ -16,6 +16,7 @@ RUN_DEPENDS= opencl>=0:devel/opencl USES= ssl USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \ presentproto xvmc xshmfence +USES= ssl ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Clover needs a graphics driver supported by the Radeon KMS driver diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile index 5706acd5b21..1cc71cc434a 100644 --- a/x11-drivers/Makefile +++ b/x11-drivers/Makefile @@ -19,6 +19,7 @@ SUBDIR += xf86-input-vmmouse SUBDIR += xf86-input-void SUBDIR += xf86-input-wacom + SUBDIR += xf86-video-amdgpu SUBDIR += xf86-video-apm SUBDIR += xf86-video-ark SUBDIR += xf86-video-ati @@ -33,6 +34,7 @@ SUBDIR += xf86-video-mach64 SUBDIR += xf86-video-mga SUBDIR += xf86-video-neomagic + SUBDIR += xf86-video-nouveau SUBDIR += xf86-video-nv SUBDIR += xf86-video-openchrome SUBDIR += xf86-video-r128 diff --git a/x11-drivers/xf86-input-acecad/Makefile b/x11-drivers/xf86-input-acecad/Makefile index 3c7a395f159..66d512dc3ea 100644 --- a/x11-drivers/xf86-input-acecad/Makefile +++ b/x11-drivers/xf86-input-acecad/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-acecad PORTVERSION= 1.5.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-egalax/Makefile b/x11-drivers/xf86-input-egalax/Makefile index 917eb59d78b..665e58e2dbe 100644 --- a/x11-drivers/xf86-input-egalax/Makefile +++ b/x11-drivers/xf86-input-egalax/Makefile @@ -3,7 +3,7 @@ PORTNAME= xf86-input-egalax PORTVERSION= 0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= glebius@FreeBSD.org diff --git a/x11-drivers/xf86-input-elographics/Makefile b/x11-drivers/xf86-input-elographics/Makefile index 843b5df113b..9f3de222f26 100644 --- a/x11-drivers/xf86-input-elographics/Makefile +++ b/x11-drivers/xf86-input-elographics/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-elographics PORTVERSION= 1.4.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-evdev/Makefile b/x11-drivers/xf86-input-evdev/Makefile index 6a2cf5de92b..bcd791ef67f 100644 --- a/x11-drivers/xf86-input-evdev/Makefile +++ b/x11-drivers/xf86-input-evdev/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-evdev PORTVERSION= 2.9.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-fpit/Makefile b/x11-drivers/xf86-input-fpit/Makefile index 323693362b4..daf3dee9afc 100644 --- a/x11-drivers/xf86-input-fpit/Makefile +++ b/x11-drivers/xf86-input-fpit/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-fpit PORTVERSION= 1.4.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-hyperpen/Makefile b/x11-drivers/xf86-input-hyperpen/Makefile index 4d06099724e..36444542248 100644 --- a/x11-drivers/xf86-input-hyperpen/Makefile +++ b/x11-drivers/xf86-input-hyperpen/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-hyperpen PORTVERSION= 1.4.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-joystick/Makefile b/x11-drivers/xf86-input-joystick/Makefile index 1ac00b3aa1f..adade5c28b5 100644 --- a/x11-drivers/xf86-input-joystick/Makefile +++ b/x11-drivers/xf86-input-joystick/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-joystick PORTVERSION= 1.6.2 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-keyboard/Makefile b/x11-drivers/xf86-input-keyboard/Makefile index 4b9636d45b4..dbea5329252 100644 --- a/x11-drivers/xf86-input-keyboard/Makefile +++ b/x11-drivers/xf86-input-keyboard/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-input-keyboard PORTVERSION= 1.8.1 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-mouse/Makefile b/x11-drivers/xf86-input-mouse/Makefile index c883d3a0bc7..1a4d8ede56a 100644 --- a/x11-drivers/xf86-input-mouse/Makefile +++ b/x11-drivers/xf86-input-mouse/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-mouse PORTVERSION= 1.9.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-mutouch/Makefile b/x11-drivers/xf86-input-mutouch/Makefile index 3944364c58d..89d2cb143c6 100644 --- a/x11-drivers/xf86-input-mutouch/Makefile +++ b/x11-drivers/xf86-input-mutouch/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-mutouch PORTVERSION= 1.3.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-penmount/Makefile b/x11-drivers/xf86-input-penmount/Makefile index 7fbdb9df0a2..b3bc675bba1 100644 --- a/x11-drivers/xf86-input-penmount/Makefile +++ b/x11-drivers/xf86-input-penmount/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-penmount PORTVERSION= 1.5.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-synaptics/Makefile b/x11-drivers/xf86-input-synaptics/Makefile index de7eb03a1e4..9ff61cfc6b4 100644 --- a/x11-drivers/xf86-input-synaptics/Makefile +++ b/x11-drivers/xf86-input-synaptics/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-input-synaptics PORTVERSION= 1.8.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-vmmouse/Makefile b/x11-drivers/xf86-input-vmmouse/Makefile index 0655a7554e7..3301d8c1633 100644 --- a/x11-drivers/xf86-input-vmmouse/Makefile +++ b/x11-drivers/xf86-input-vmmouse/Makefile @@ -3,6 +3,7 @@ PORTNAME= xf86-input-vmmouse PORTVERSION= 13.1.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-void/Makefile b/x11-drivers/xf86-input-void/Makefile index cba17192fbf..c77ee8c5de5 100644 --- a/x11-drivers/xf86-input-void/Makefile +++ b/x11-drivers/xf86-input-void/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-input-void PORTVERSION= 1.4.1 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-input-wacom/Makefile b/x11-drivers/xf86-input-wacom/Makefile index 8f67ed6a88f..c31ed3d71ce 100644 --- a/x11-drivers/xf86-input-wacom/Makefile +++ b/x11-drivers/xf86-input-wacom/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-input-wacom PORTVERSION= 0.33.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MASTER_SITES= SF/linuxwacom/${PORTNAME} diff --git a/x11-drivers/xf86-video-amdgpu/Makefile b/x11-drivers/xf86-video-amdgpu/Makefile new file mode 100644 index 00000000000..84ba43ca040 --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/Makefile @@ -0,0 +1,30 @@ +# $FreeBSD$ + +# this port is for future amdgpu kernel support testing. + +PORTNAME= xf86-video-amdgpu +PORTVERSION= 1.1.2 +CATEGORIES= x11-drivers + +MAINTAINER= x11@FreeBSD.org +COMMENT= X.Org amdgpu display driver + +LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm + +USE_GL= gbm +XORG_CAT= driver +INSTALL_TARGET= install-strip +# No amdgpu kernel driver on non-x86 and PC98. +ONLY_FOR_ARCHS= i386 amd64 + +CONFIGURE_ARGS+=--disable-udev +CONFIGURE_ARGS+=--disable-glamor + +.include <bsd.port.options.mk> + +.if (${OSVERSION} < 1100000) +# this probably should be 11.x too. +IGNORE= Not support on 11.x or older, no kernel support +.endif + +.include <bsd.port.mk> diff --git a/x11-drivers/xf86-video-amdgpu/distinfo b/x11-drivers/xf86-video-amdgpu/distinfo new file mode 100644 index 00000000000..db605e3da4d --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1474496829 +SHA256 (xorg/driver/xf86-video-amdgpu-1.1.2.tar.bz2) = 6ee87fed6d70d12353ca7ac02f8321a30d770626bf56f62f0e27970a33690779 +SIZE (xorg/driver/xf86-video-amdgpu-1.1.2.tar.bz2) = 383690 diff --git a/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c new file mode 100644 index 00000000000..44e0d3f4966 --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c @@ -0,0 +1,47 @@ +--- src/amdgpu_drm_queue.c.orig 2016-09-16 09:01:22 UTC ++++ src/amdgpu_drm_queue.c +@@ -61,7 +61,7 @@ amdgpu_drm_queue_handler(int fd, unsigne + unsigned int usec, void *user_ptr) + { + uintptr_t seq = (uintptr_t)user_ptr; +- struct amdgpu_drm_queue_entry *e, *tmp; ++ struct amdgpu_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) { + if (e->seq == seq) { +@@ -132,7 +132,7 @@ amdgpu_drm_abort_one(struct amdgpu_drm_q + void + amdgpu_drm_abort_client(ClientPtr client) + { +- struct amdgpu_drm_queue_entry *e; ++ struct amdgpu_drm_queue_entry *e = NULL; + + xorg_list_for_each_entry(e, &amdgpu_drm_queue, list) { + if (e->client == client) +@@ -146,7 +146,7 @@ amdgpu_drm_abort_client(ClientPtr client + void + amdgpu_drm_abort_entry(uintptr_t seq) + { +- struct amdgpu_drm_queue_entry *e, *tmp; ++ struct amdgpu_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) { + if (e->seq == seq) { +@@ -162,7 +162,7 @@ amdgpu_drm_abort_entry(uintptr_t seq) + void + amdgpu_drm_abort_id(uint64_t id) + { +- struct amdgpu_drm_queue_entry *e, *tmp; ++ struct amdgpu_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) { + if (e->id == id) { +@@ -190,7 +190,7 @@ amdgpu_drm_queue_init() + void + amdgpu_drm_queue_close(ScrnInfoPtr scrn) + { +- struct amdgpu_drm_queue_entry *e, *tmp; ++ struct amdgpu_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) { + if (e->crtc->scrn == scrn) diff --git a/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c new file mode 100644 index 00000000000..53469249cca --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c @@ -0,0 +1,11 @@ +--- src/amdgpu_kms.c.orig 2016-09-21 22:32:09 UTC ++++ src/amdgpu_kms.c +@@ -238,7 +238,7 @@ static void redisplay_dirty(ScreenPtr sc + static void amdgpu_dirty_update(ScreenPtr screen) + { + RegionPtr region; +- PixmapDirtyUpdatePtr ent; ++ PixmapDirtyUpdatePtr ent = NULL; + + if (xorg_list_is_empty(&screen->pixmap_dirty_list)) + return; diff --git a/x11-drivers/xf86-video-amdgpu/pkg-descr b/x11-drivers/xf86-video-amdgpu/pkg-descr new file mode 100644 index 00000000000..576a7785740 --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/pkg-descr @@ -0,0 +1 @@ +This package contains the X.Org xf86-video-amdgpu driver. diff --git a/x11-drivers/xf86-video-amdgpu/pkg-plist b/x11-drivers/xf86-video-amdgpu/pkg-plist new file mode 100644 index 00000000000..b4800a04441 --- /dev/null +++ b/x11-drivers/xf86-video-amdgpu/pkg-plist @@ -0,0 +1,3 @@ +lib/xorg/modules/drivers/amdgpu_drv.so +man/man4/amdgpu.4x.gz +share/X11/xorg.conf.d/10-amdgpu.conf diff --git a/x11-drivers/xf86-video-apm/Makefile b/x11-drivers/xf86-video-apm/Makefile index f1b5628275b..806d699463c 100644 --- a/x11-drivers/xf86-video-apm/Makefile +++ b/x11-drivers/xf86-video-apm/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-apm PORTVERSION= 1.2.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-ark/Makefile b/x11-drivers/xf86-video-ark/Makefile index 44c723868e1..a0f17dc8b85 100644 --- a/x11-drivers/xf86-video-ark/Makefile +++ b/x11-drivers/xf86-video-ark/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-ark PORTVERSION= 0.7.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-ati/Makefile b/x11-drivers/xf86-video-ati/Makefile index 6809b2a9a33..0d3c6e1c3bb 100644 --- a/x11-drivers/xf86-video-ati/Makefile +++ b/x11-drivers/xf86-video-ati/Makefile @@ -1,18 +1,20 @@ # $FreeBSD$ PORTNAME= xf86-video-ati -PORTVERSION= 7.5.0 -PORTREVISION= 3 +PORTVERSION= 7.7.1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org ati display driver +LIB_DEPENDS= libdrm_radeon.so:graphics/libdrm + USE_GL= gl XORG_CAT= driver USE_XORG= xf86driproto \ xineramaproto \ xf86miscproto \ + pciaccess \ glproto \ presentproto INSTALL_TARGET= install-strip diff --git a/x11-drivers/xf86-video-ati/distinfo b/x11-drivers/xf86-video-ati/distinfo index c6949cd0ec9..8354dac115d 100644 --- a/x11-drivers/xf86-video-ati/distinfo +++ b/x11-drivers/xf86-video-ati/distinfo @@ -1,2 +1,3 @@ -SHA256 (xorg/driver/xf86-video-ati-7.5.0.tar.bz2) = ec3e6f06b6cf9a40c72aafa3448aae8b034c80b37410ca9442d5cf6806e07936 -SIZE (xorg/driver/xf86-video-ati-7.5.0.tar.bz2) = 809756 +TIMESTAMP = 1474474168 +SHA256 (xorg/driver/xf86-video-ati-7.7.1.tar.bz2) = 00a58588db62ee309095c5c5920bbd248d965e8627f88affe68a73b18865078d +SIZE (xorg/driver/xf86-video-ati-7.7.1.tar.bz2) = 837869 diff --git a/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c b/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c deleted file mode 100644 index 3de34a1b60a..00000000000 --- a/x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/radeon_dri2.c.orig 2013-02-22 19:31:34.000000000 +0000 -+++ src/radeon_dri2.c 2013-02-22 19:31:47.000000000 +0000 -@@ -578,7 +578,7 @@ - radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata) - { - DRI2ClientEventsPtr pClientEventsPriv; -- DRI2FrameEventPtr ref; -+ DRI2FrameEventPtr ref = NULL; - NewClientInfoRec *clientinfo = calldata; - ClientPtr pClient = clientinfo->client; - pClientEventsPriv = GetDRI2ClientEvents(pClient); diff --git a/x11-drivers/xf86-video-ati/files/patch-src__radeon_kms.c b/x11-drivers/xf86-video-ati/files/patch-src__radeon_kms.c index 9966ec93ec7..10b09676c0e 100644 --- a/x11-drivers/xf86-video-ati/files/patch-src__radeon_kms.c +++ b/x11-drivers/xf86-video-ati/files/patch-src__radeon_kms.c @@ -1,5 +1,5 @@ ---- src/radeon_kms.c.orig 2014-10-02 05:31:27.000000000 +0200 -+++ src/radeon_kms.c 2014-10-23 18:56:18.359108170 +0200 +--- src/radeon_kms.c.orig 2016-09-15 10:52:47.000000000 +0200 ++++ src/radeon_kms.c 2016-09-21 18:12:30.817337000 +0200 @@ -30,6 +30,8 @@ #include <errno.h> @@ -8,8 +8,8 @@ +#include <sys/linker.h> /* Driver data structures */ #include "radeon.h" - #include "radeon_reg.h" -@@ -280,7 +282,7 @@ + #include "radeon_drm_queue.h" +@@ -321,7 +323,7 @@ static void radeon_dirty_update(ScreenPtr screen) { RegionPtr region; @@ -18,7 +18,7 @@ if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return; -@@ -589,7 +591,7 @@ +@@ -914,7 +916,7 @@ static int radeon_get_drm_master_fd(Scrn #endif struct pci_device *dev = info->PciInfo; char *busid; @@ -27,7 +27,7 @@ #ifdef XF86_PDEV_SERVER_FD if (pRADEONEnt->platform_dev) { -@@ -608,6 +610,15 @@ +@@ -933,6 +935,15 @@ static int radeon_get_drm_master_fd(Scrn dev->domain, dev->bus, dev->dev, dev->func); #endif diff --git a/x11-drivers/xf86-video-ati/files/patch-src_radeon__drm__queue.c b/x11-drivers/xf86-video-ati/files/patch-src_radeon__drm__queue.c new file mode 100644 index 00000000000..0a89650de85 --- /dev/null +++ b/x11-drivers/xf86-video-ati/files/patch-src_radeon__drm__queue.c @@ -0,0 +1,47 @@ +--- src/radeon_drm_queue.c.orig 2016-09-21 18:10:33.937954000 +0200 ++++ src/radeon_drm_queue.c 2016-09-21 18:11:43.894010000 +0200 +@@ -61,7 +61,7 @@ radeon_drm_queue_handler(int fd, unsigne + unsigned int usec, void *user_ptr) + { + uintptr_t seq = (uintptr_t)user_ptr; +- struct radeon_drm_queue_entry *e, *tmp; ++ struct radeon_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) { + if (e->seq == seq) { +@@ -132,7 +132,7 @@ radeon_drm_abort_one(struct radeon_drm_q + void + radeon_drm_abort_client(ClientPtr client) + { +- struct radeon_drm_queue_entry *e; ++ struct radeon_drm_queue_entry *e = NULL; + + xorg_list_for_each_entry(e, &radeon_drm_queue, list) { + if (e->client == client) +@@ -146,7 +146,7 @@ radeon_drm_abort_client(ClientPtr client + void + radeon_drm_abort_entry(uintptr_t seq) + { +- struct radeon_drm_queue_entry *e, *tmp; ++ struct radeon_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) { + if (e->seq == seq) { +@@ -162,7 +162,7 @@ radeon_drm_abort_entry(uintptr_t seq) + void + radeon_drm_abort_id(uint64_t id) + { +- struct radeon_drm_queue_entry *e, *tmp; ++ struct radeon_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) { + if (e->id == id) { +@@ -190,7 +190,7 @@ radeon_drm_queue_init() + void + radeon_drm_queue_close(ScrnInfoPtr scrn) + { +- struct radeon_drm_queue_entry *e, *tmp; ++ struct radeon_drm_queue_entry *e = NULL, *tmp; + + xorg_list_for_each_entry_safe(e, tmp, &radeon_drm_queue, list) { + if (e->crtc->scrn == scrn) diff --git a/x11-drivers/xf86-video-chips/Makefile b/x11-drivers/xf86-video-chips/Makefile index 7618f8563c2..63d72878d69 100644 --- a/x11-drivers/xf86-video-chips/Makefile +++ b/x11-drivers/xf86-video-chips/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-chips PORTVERSION= 1.2.6 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-cirrus/Makefile b/x11-drivers/xf86-video-cirrus/Makefile index fbc8d9b03f3..df8a83cf648 100644 --- a/x11-drivers/xf86-video-cirrus/Makefile +++ b/x11-drivers/xf86-video-cirrus/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-cirrus PORTVERSION= 1.5.3 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-dummy/Makefile b/x11-drivers/xf86-video-dummy/Makefile index 14de28233c4..18b7f9a31e4 100644 --- a/x11-drivers/xf86-video-dummy/Makefile +++ b/x11-drivers/xf86-video-dummy/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-dummy PORTVERSION= 0.3.7 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-fbdev/Makefile b/x11-drivers/xf86-video-fbdev/Makefile index 73457eb9f00..7ab3a09580a 100644 --- a/x11-drivers/xf86-video-fbdev/Makefile +++ b/x11-drivers/xf86-video-fbdev/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-fbdev PORTVERSION= 0.4.4 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-glint/Makefile b/x11-drivers/xf86-video-glint/Makefile index f8ac400cef6..cf55c4fb332 100644 --- a/x11-drivers/xf86-video-glint/Makefile +++ b/x11-drivers/xf86-video-glint/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-glint PORTVERSION= 1.2.8 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-i128/Makefile b/x11-drivers/xf86-video-i128/Makefile index dad6c5bf46f..48943d79b71 100644 --- a/x11-drivers/xf86-video-i128/Makefile +++ b/x11-drivers/xf86-video-i128/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-i128 PORTVERSION= 1.3.6 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-i740/Makefile b/x11-drivers/xf86-video-i740/Makefile index 9e940e82a8c..67dd4ef47d0 100644 --- a/x11-drivers/xf86-video-i740/Makefile +++ b/x11-drivers/xf86-video-i740/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-i740 PORTVERSION= 1.3.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile index 14a103ced14..a004bd9887c 100644 --- a/x11-drivers/xf86-video-intel/Makefile +++ b/x11-drivers/xf86-video-intel/Makefile @@ -2,14 +2,17 @@ # $FreeBSD$ PORTNAME= xf86-video-intel -PORTVERSION= 2.21.15 -PORTREVISION= 9 +PORTVERSION= 2.99.917.20160614 CATEGORIES= x11-drivers +MASTER_SITES= LOCAL/kwm \ + http://rainbow-runner.nl/freebsd/ MAINTAINER= x11@FreeBSD.org COMMENT= Driver for Intel integrated graphics chipsets -LIB_DEPENDS= libxcb-util.so:x11/xcb-util +LIB_DEPENDS= libxcb-util.so:x11/xcb-util \ + libpciaccess.so:devel/libpciaccess \ + libdrm.so:graphics/libdrm ONLY_FOR_ARCHS= amd64 i386 USE_GL= gl @@ -19,22 +22,33 @@ XORG_CAT= driver USE_XORG= glproto \ pixman \ x11 \ + xcb \ xext \ xf86driproto \ xineramaproto \ xrender \ + presentproto \ + xv \ xvmc USES+= cpe CPE_VENDOR= x -CONFIGURE_ENV+= xorg_cv_cc_flag__Wno_maybe_uninitialized=no -CONFIGURE_ARGS+= --enable-sna -CONFIGURE_ARGS+= --disable-glamor INSTALL_TARGET= install-strip +OPTIONS_DEFINE_amd64= DRI3 +OPTIONS_DEFINE_i386= DRI3 +DRI3_DESC= Experimental: enable dri3 support + .include <bsd.port.options.mk> +.if ${PORT_OPTIONS:MDRI3} +USE_XORG+= dri3proto +CONFIGURE_ARGS+= --enable-dri3 +.else +CONFIGURE_ARGS+= --disable-dri3 +.endif + .if (${OSVERSION} >= 903000 && ${OSVERSION} < 1000000) RUN_DEPENDS+= drm-kmod>=9:x11-drivers/drm-kmod diff --git a/x11-drivers/xf86-video-intel/distinfo b/x11-drivers/xf86-video-intel/distinfo index e1360d7a8ea..ed4482bd458 100644 --- a/x11-drivers/xf86-video-intel/distinfo +++ b/x11-drivers/xf86-video-intel/distinfo @@ -1,4 +1,3 @@ -SHA256 (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 255c0d54249cc0132f743254a43c21fac695fab2139c8ed96a07cf3c628e5f42 -SIZE (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 780625 -SHA256 (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 7d5a140f82a72fd1cbc8a664d66c3d4eca47ee240ca4927b8a98d7af6f65d6fc -SIZE (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 1977431 +TIMESTAMP = 1465886865 +SHA256 (xorg/driver/xf86-video-intel-2.99.917.20160614.tar.bz2) = 2decd3bcc461114ecf917698d716843a122862ab911bc34ec6d97cab0a6f4078 +SIZE (xorg/driver/xf86-video-intel-2.99.917.20160614.tar.bz2) = 2414686 diff --git a/x11-drivers/xf86-video-intel/files/patch-clang b/x11-drivers/xf86-video-intel/files/patch-clang deleted file mode 100644 index 924f27d48ce..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-clang +++ /dev/null @@ -1,63 +0,0 @@ ---- src/sna/sna_cpu.c.orig 2013-08-14 12:04:40.231041285 +0200 -+++ src/sna/sna_cpu.c 2013-08-14 12:05:51.237030719 +0200 -@@ -41,6 +41,7 @@ - { - unsigned max = __get_cpuid_max(BASIC_CPUID, NULL); - unsigned int eax, ebx, ecx, edx; -+ eax = ebx = ecx = edx = 0; - unsigned features = 0; - unsigned extra = 0; - ---- src/sna/sna_damage.c.orig 2013-08-14 12:06:26.381036854 +0200 -+++ src/sna/sna_damage.c 2013-08-14 12:07:23.684023065 +0200 -@@ -410,7 +410,7 @@ - int n, nboxes; - BoxPtr boxes, free_boxes = NULL; - pixman_region16_t *region = &damage->region; -- struct sna_damage_box *iter; -+ struct sna_damage_box *iter = NULL; - - assert(damage->mode != DAMAGE_ALL); - assert(damage->dirty); -@@ -1709,7 +1709,7 @@ - { - int n, nboxes; - BoxPtr boxes; -- struct sna_damage_box *iter; -+ struct sna_damage_box *iter = NULL; - - RegionCopy(r, &damage->region); - if (!damage->dirty) ---- src/uxa/intel_batchbuffer.c.orig 2013-08-14 12:08:14.323028320 +0200 -+++ src/uxa/intel_batchbuffer.c 2013-08-14 12:08:37.202016923 +0200 -@@ -141,7 +141,7 @@ - static void intel_batch_do_flush(ScrnInfoPtr scrn) - { - intel_screen_private *intel = intel_get_screen_private(scrn); -- struct intel_pixmap *priv; -+ struct intel_pixmap *priv = NULL; - - list_for_each_entry(priv, &intel->batch_pixmaps, batch) - priv->dirty = 0; ---- src/uxa/intel_display.c.orig 2013-08-14 12:09:25.802015629 +0200 -+++ src/uxa/intel_display.c 2013-08-14 12:09:51.034009844 +0200 -@@ -1753,7 +1753,7 @@ - static drmModeEncoderPtr - intel_get_kencoder(struct intel_mode *mode, int num) - { -- struct intel_output *iterator; -+ struct intel_output *iterator = NULL; - int id = mode->mode_res->encoders[num]; - - list_for_each_entry(iterator, &mode->outputs, link) ---- src/uxa/uxa-accel.c.orig 2013-08-14 12:02:11.898048975 +0200 -+++ src/uxa/uxa-accel.c 2013-08-14 12:03:39.336042139 +0200 -@@ -944,7 +944,7 @@ - - if (uxa_screen->info->flags & UXA_USE_GLAMOR) { - int ok = 0; -- RegionPtr region; -+ RegionPtr region = NULL; - - if (uxa_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW)) { - if (uxa_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO)) { diff --git a/x11-drivers/xf86-video-intel/files/patch-i915kms b/x11-drivers/xf86-video-intel/files/patch-i915kms index b5d43c6deec..9ab11459c0b 100644 --- a/x11-drivers/xf86-video-intel/files/patch-i915kms +++ b/x11-drivers/xf86-video-intel/files/patch-i915kms @@ -1,13 +1,19 @@ ---- src/intel_device.c.orig 2013-06-30 16:03:51.000000000 +0200 -+++ src/intel_device.c 2013-07-02 14:08:34.903060688 +0200 -@@ -94,8 +94,8 @@ - pci->domain, pci->bus, pci->dev, pci->func); +--- src/intel_device.c.orig 2016-02-16 09:25:09.124344000 +0100 ++++ src/intel_device.c 2016-02-16 09:22:49.541922000 +0100 +@@ -204,6 +207,7 @@ + } - ret = drmCheckModesettingSupported(id); -- if (ret) { -- if (xf86LoadKernelModule("i915")) -+ if (ret || 1) { -+ if (xf86LoadKernelModule("i915kms")) - ret = drmCheckModesettingSupported(id); - if (ret) - return -1; + static const char *kernel_module_names[] ={ ++ "i915kms", + "i915", + NULL, + }; +@@ -425,7 +429,7 @@ + pci->domain, pci->bus, pci->dev, pci->func); + + ret = drmCheckModesettingSupported(id); +- if (ret) { ++ if (ret || 1) { + if (load_i915_kernel_module() == 0) + ret = drmCheckModesettingSupported(id); + if (ret) diff --git a/x11-drivers/xf86-video-intel/files/patch-src__sna__sna_accel.c b/x11-drivers/xf86-video-intel/files/patch-src__sna__sna_accel.c deleted file mode 100644 index 9578842f0af..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src__sna__sna_accel.c +++ /dev/null @@ -1,81 +0,0 @@ ---- src/sna/sna_accel.c.orig 2013-08-20 20:26:26 UTC -+++ src/sna/sna_accel.c -@@ -3797,6 +3797,7 @@ static bool must_check sna_gc_move_to_cp - sgc->priv = gc->pCompositeClip; - gc->pCompositeClip = region; - -+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0) - if (gc->clientClipType == CT_PIXMAP) { - PixmapPtr clip = gc->clientClip; - gc->clientClip = region_from_bitmap(gc->pScreen, clip); -@@ -3804,7 +3805,9 @@ static bool must_check sna_gc_move_to_cp - gc->clientClipType = gc->clientClip ? CT_REGION : CT_NONE; - changes |= GCClipMask; - } else -+#else - changes &= ~GCClipMask; -+#endif - - if (changes || drawable->serialNumber != sgc->serial) { - gc->serialNumber = sgc->serial; -@@ -5562,6 +5565,15 @@ static inline bool box_equal(const BoxRe - return *(const uint64_t *)a == *(const uint64_t *)b; - } - -+static inline bool has_clip(GCPtr gc) -+{ -+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0) -+ return gc->clientClipType != CT_NONE; -+#else -+ return gc->clientClip != NULL; -+#endif -+} -+ - static RegionPtr - sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, - int sx, int sy, -@@ -5628,7 +5640,7 @@ sna_do_copy(DrawablePtr src, DrawablePtr - - /* Compute source clip region */ - if (src->type == DRAWABLE_PIXMAP) { -- if (src == dst && gc->clientClipType == CT_NONE) { -+ if (src == dst && !has_clip(gc)) { - DBG(("%s: pixmap -- using gc clip\n", __FUNCTION__)); - clip = gc->pCompositeClip; - } else { -@@ -14391,7 +14403,7 @@ sna_validate_gc(GCPtr gc, unsigned long - - if (changes & (GCClipMask|GCSubwindowMode) || - drawable->serialNumber != (gc->serialNumber & DRAWABLE_SERIAL_BITS) || -- (gc->clientClipType != CT_NONE && (changes & (GCClipXOrigin | GCClipYOrigin)))) -+ (has_clip(gc) && (changes & (GCClipXOrigin | GCClipYOrigin)))) - miComputeCompositeClip(gc, drawable); - - sna_gc(gc)->changes |= changes; -@@ -14830,7 +14842,7 @@ static bool has_offload_slaves(struct sn - { - #if HAS_PIXMAP_SHARING - ScreenPtr screen = sna->scrn->pScreen; -- PixmapDirtyUpdatePtr dirty; -+ PixmapDirtyUpdatePtr dirty = NULL; - - xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) { - assert(dirty->src == sna->front); -@@ -14987,7 +14999,7 @@ static void sna_accel_post_damage(struct - { - #if HAS_PIXMAP_SHARING - ScreenPtr screen = sna->scrn->pScreen; -- PixmapDirtyUpdatePtr dirty; -+ PixmapDirtyUpdatePtr dirty = NULL; - bool flush = false; - - xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) { -@@ -15216,7 +15228,7 @@ migrate_dirty_tracking(PixmapPtr old_fro - { - #if HAS_PIXMAP_SHARING - ScreenPtr screen = old_front->drawable.pScreen; -- PixmapDirtyUpdatePtr dirty, safe; -+ PixmapDirtyUpdatePtr dirty = NULL, safe; - - xorg_list_for_each_entry_safe(dirty, safe, &screen->pixmap_dirty_list, ent) { - assert(dirty->src == old_front); diff --git a/x11-drivers/xf86-video-intel/files/patch-src__uxa__intel_driver.c b/x11-drivers/xf86-video-intel/files/patch-src__uxa__intel_driver.c deleted file mode 100644 index 6abca3103df..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src__uxa__intel_driver.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/uxa/intel_driver.c.orig 2014-10-28 00:30:09.015749289 +0100 -+++ src/uxa/intel_driver.c 2014-10-28 00:30:26.834767496 +0100 -@@ -723,7 +723,7 @@ - intel_dirty_update(ScreenPtr screen) - { - RegionPtr region; -- PixmapDirtyUpdatePtr ent; -+ PixmapDirtyUpdatePtr ent = NULL; - - if (xorg_list_is_empty(&screen->pixmap_dirty_list)) - return; diff --git a/x11-drivers/xf86-video-intel/files/patch-src_compat-api.h b/x11-drivers/xf86-video-intel/files/patch-src_compat-api.h deleted file mode 100644 index 638141f515c..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_compat-api.h +++ /dev/null @@ -1,43 +0,0 @@ ---- src/compat-api.h.orig 2013-05-21 10:15:11 UTC -+++ src/compat-api.h -@@ -158,4 +158,40 @@ static inline void FreePixmap(PixmapPtr - if ((d)->pScreen->SourceValidate) (d)->pScreen->SourceValidate(d, x, y, w, h) - #endif - -+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0) -+#define DamageUnregister(d, dd) DamageUnregister(dd) -+#endif -+ -+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) -+ -+#define XORG_XV_VERSION 2 -+#define ddStopVideo_ARGS XvPortPtr port, DrawablePtr draw -+#define ddSetPortAttribute_ARGS XvPortPtr port, Atom attribute, INT32 value -+#define ddGetPortAttribute_ARGS XvPortPtr port, Atom attribute, INT32 *value -+#define ddQueryBestSize_ARGS XvPortPtr port, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, unsigned int *p_w, unsigned int *p_h -+#define ddPutImage_ARGS DrawablePtr draw, XvPortPtr port, GCPtr gc, INT16 src_x, INT16 src_y, CARD16 src_w, CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h, XvImagePtr format, unsigned char *buf, Bool sync, CARD16 width, CARD16 height -+#define ddQueryImageAttributes_ARGS XvPortPtr port, XvImagePtr format, unsigned short *w, unsigned short *h, int *pitches, int *offsets -+ -+#else -+ -+#define XORG_XV_VERSION 1 -+#define ddStopVideo_ARGS ClientPtr client, XvPortPtr port, DrawablePtr draw -+#define ddSetPortAttribute_ARGS ClientPtr client, XvPortPtr port, Atom attribute, INT32 value -+#define ddGetPortAttribute_ARGS ClientPtr client, XvPortPtr port, Atom attribute, INT32 *value -+#define ddQueryBestSize_ARGS ClientPtr client, XvPortPtr port, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, unsigned int *p_w, unsigned int *p_h -+#define ddPutImage_ARGS ClientPtr client, DrawablePtr draw, XvPortPtr port, GCPtr gc, INT16 src_x, INT16 src_y, CARD16 src_w, CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h, XvImagePtr format, unsigned char *buf, Bool sync, CARD16 width, CARD16 height -+#define ddQueryImageAttributes_ARGS ClientPtr client, XvPortPtr port, XvImagePtr format, unsigned short *w, unsigned short *h, int *pitches, int *offsets -+ -+#endif -+ -+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) -+#include <mi.h> -+#define miHandleExposures(pSrcDrawable, pDstDrawable, \ -+ pGC, srcx, srcy, width, height, \ -+ dstx, dsty, plane) \ -+ miHandleExposures(pSrcDrawable, pDstDrawable, \ -+ pGC, srcx, srcy, width, height, \ -+ dstx, dsty) -+#endif -+ - #endif diff --git a/x11-drivers/xf86-video-intel/files/patch-src_intel-device.c b/x11-drivers/xf86-video-intel/files/patch-src_intel-device.c new file mode 100644 index 00000000000..90bbf79c72a --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/patch-src_intel-device.c @@ -0,0 +1,12 @@ +--- src/intel_device.c.orig 2014-12-21 20:36:40.268102983 +0100 ++++ src/intel_device.c 2014-12-21 20:36:01.358104504 +0100 +@@ -28,6 +28,9 @@ + #include "config.h" + #endif + ++#define _WITH_GETLINE /* to expose getline() in stdio.h on FreeBSD */ ++#include <stdio.h> /* for getline() */ ++ + #include <sys/types.h> + #include <sys/stat.h> + #include <assert.h> diff --git a/x11-drivers/xf86-video-intel/files/patch-src_intel__list.h b/x11-drivers/xf86-video-intel/files/patch-src_intel__list.h new file mode 100644 index 00000000000..1d31f367472 --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/patch-src_intel__list.h @@ -0,0 +1,39 @@ +--- src/intel_list.h.orig 2015-12-10 23:29:35.000000000 +0100 ++++ src/intel_list.h 2016-10-24 10:22:57.280379000 +0200 +@@ -306,7 +306,7 @@ + list_entry((ptr)->prev, type, member) + + #define __container_of(ptr, sample, member) \ +- (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ++ (typeof(sample))((char *)(ptr) - (offsetof(typeof(*sample),member))) + /** + * Loop through the list given by head and set pos to struct in the list. + * +@@ -325,12 +325,14 @@ + * + */ + #define list_for_each_entry(pos, head, member) \ +- for (pos = __container_of((head)->next, pos, member); \ ++ for (pos = NULL, \ ++ pos = __container_of((head)->next, pos, member); \ + &pos->member != (head); \ + pos = __container_of(pos->member.next, pos, member)) + +-#define list_for_each_entry_reverse(pos, head, member) \ +- for (pos = __container_of((head)->prev, pos, member); \ ++#define list_for_each_entry_reverse(pos, head, member) \ ++ for (pos = NULL, \ ++ pos = __container_of((head)->prev, pos, member); \ + &pos->member != (head); \ + pos = __container_of(pos->member.prev, pos, member)) + +@@ -342,7 +344,8 @@ + * See list_for_each_entry for more details. + */ + #define list_for_each_entry_safe(pos, tmp, head, member) \ +- for (pos = __container_of((head)->next, pos, member), \ ++ for (pos = NULL, \ ++ pos = __container_of((head)->next, pos, member), \ + tmp = __container_of(pos->member.next, pos, member); \ + &pos->member != (head); \ + pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_fb_fbpict.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_fb_fbpict.c deleted file mode 100644 index 6b7e767503d..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_fb_fbpict.c +++ /dev/null @@ -1,28 +0,0 @@ ---- src/sna/fb/fbpict.c.orig 2013-03-27 11:58:09 UTC -+++ src/sna/fb/fbpict.c -@@ -156,6 +156,16 @@ create_conical_gradient_image(PictGradie - gradient->nstops); - } - -+static inline bool -+picture_has_clip(PicturePtr p) -+{ -+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) -+ return p->clientClip; -+#else -+ return p->clientClipType != CT_NONE; -+#endif -+} -+ - static pixman_image_t * - create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff) - { -@@ -180,7 +190,7 @@ create_bits_picture(PicturePtr pict, Boo - * only set the clip region for pictures with drawables - */ - if (has_clip) { -- if (pict->clientClipType != CT_NONE) -+ if (picture_has_clip(pict)) - pixman_image_set_has_client_clip(image, TRUE); - - if (*xoff || *yoff) 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 index 60a8c344074..cc52daec085 100644 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c +++ b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c @@ -1,5 +1,5 @@ ---- src/sna/kgem.c.orig 2013-08-20 20:26:26 UTC -+++ src/sna/kgem.c +--- src/sna/kgem.c.orig 2014-12-09 17:08:21.000000000 +0100 ++++ src/sna/kgem.c 2015-11-19 00:06:27.883010000 +0100 @@ -25,6 +25,7 @@ * */ @@ -8,80 +8,3 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -@@ -1873,7 +1874,8 @@ static void kgem_bo_move_to_snoop(struct - static struct kgem_bo * - search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags) - { -- struct kgem_bo *bo, *first = NULL; -+ struct kgem_bo *bo = NULL; -+ struct kgem_bo *first = NULL; - - DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags)); - -@@ -2087,7 +2089,8 @@ static bool kgem_retire__buffers(struct - - static bool kgem_retire__flushing(struct kgem *kgem) - { -- struct kgem_bo *bo, *next; -+ struct kgem_bo *bo = NULL; -+ struct kgem_bo *next; - bool retired = false; - - list_for_each_entry_safe(bo, next, &kgem->flushing, request) { -@@ -2292,7 +2295,8 @@ bool __kgem_ring_is_idle(struct kgem *kg - static void kgem_commit(struct kgem *kgem) - { - struct kgem_request *rq = kgem->next_request; -- struct kgem_bo *bo, *next; -+ struct kgem_bo *bo = NULL; -+ struct kgem_bo *next; - - list_for_each_entry_safe(bo, next, &rq->buffers, request) { - assert(next->request.prev == &bo->request); -@@ -2373,7 +2377,8 @@ static void kgem_close_inactive(struct k - - static void kgem_finish_buffers(struct kgem *kgem) - { -- struct kgem_buffer *bo, *next; -+ struct kgem_buffer *bo = NULL; -+ struct kgem_buffer *next; - - list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) { - DBG(("%s: buffer handle=%d, used=%d, exec?=%d, write=%d, mmapped=%s\n", -@@ -3254,7 +3259,8 @@ void kgem_cleanup_cache(struct kgem *kge - static struct kgem_bo * - search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags) - { -- struct kgem_bo *bo, *first = NULL; -+ struct kgem_bo *bo = NULL; -+ struct kgem_bo *first = NULL; - bool use_active = (flags & CREATE_INACTIVE) == 0; - struct list *cache; - -@@ -3867,7 +3873,7 @@ struct kgem_bo *kgem_create_2d(struct kg - uint32_t flags) - { - struct list *cache; -- struct kgem_bo *bo; -+ struct kgem_bo *bo = NULL; - uint32_t pitch, tiled_height, size; - uint32_t handle; - int i, bucket, retry; -@@ -5337,7 +5343,7 @@ void kgem_bo_sync__gtt(struct kgem *kgem - void kgem_clear_dirty(struct kgem *kgem) - { - struct list * const buffers = &kgem->next_request->buffers; -- struct kgem_bo *bo; -+ struct kgem_bo *bo = NULL; - - list_for_each_entry(bo, buffers, request) { - if (!bo->gpu_dirty) -@@ -5613,7 +5619,7 @@ struct kgem_bo *kgem_create_buffer(struc - uint32_t size, uint32_t flags, - void **ret) - { -- struct kgem_buffer *bo; -+ struct kgem_buffer *bo = NULL; - unsigned offset, alloc; - struct kgem_bo *old; - diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__composite.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__composite.c deleted file mode 100644 index 06ea9a1a52d..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__composite.c +++ /dev/null @@ -1,43 +0,0 @@ ---- src/sna/sna_composite.c.orig 2013-08-14 11:59:36 UTC -+++ src/sna/sna_composite.c -@@ -122,11 +122,21 @@ clip_to_dst(pixman_region16_t *region, - } - - static inline bool -+picture_has_clip(PicturePtr p) -+{ -+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) -+ return p->clientClip; -+#else -+ return p->clientClipType != CT_NONE; -+#endif -+} -+ -+static inline bool - clip_to_src(RegionPtr region, PicturePtr p, int dx, int dy) - { - bool result; - -- if (p->clientClipType == CT_NONE) -+ if (!picture_has_clip(p)) - return true; - - pixman_region_translate(p->clientClip, -@@ -220,7 +230,7 @@ sna_compute_composite_region(RegionPtr r - __FUNCTION__, - src->pDrawable ? src->pDrawable->width : 0, - src->pDrawable ? src->pDrawable->height : 0, -- src->clientClipType, -+ picture_has_clip(src), - region->extents.x1, region->extents.y1, - region->extents.x2, region->extents.y2)); - -@@ -287,7 +297,7 @@ trim_extents(BoxPtr extents, const Pictu - static void - _trim_source_extents(BoxPtr extents, const PicturePtr p, int dx, int dy) - { -- if (p->clientClipType != CT_NONE) -+ if (picture_has_clip(p)) - trim_extents(extents, p, dx, dy); - } - diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__driver.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__driver.c deleted file mode 100644 index 9f831101fbb..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__driver.c +++ /dev/null @@ -1,10 +0,0 @@ ---- src/sna/sna_driver.c.orig 2015-03-05 09:44:44 UTC -+++ src/sna/sna_driver.c -@@ -769,6 +769,7 @@ static Bool sna_late_close_screen(CLOSE_ - DBG(("%s\n", __FUNCTION__)); - - sna_accel_close(sna); -+ sna_video_close(sna); - - depths = screen->allowedDepths; - for (d = 0; d < screen->numDepths; d++) diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__trapezoids.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__trapezoids.c deleted file mode 100644 index 3e41f74c61b..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__trapezoids.c +++ /dev/null @@ -1,111 +0,0 @@ -From 48a33fc379b17eed195875222ad773c911d9dff1 Mon Sep 17 00:00:00 2001 -From: Chris Wilson <chris@chris-wilson.co.uk> -Date: Tue, 2 Sep 2014 19:08:36 +0100 -Subject: sna/trapezoids: Use the corrected trapezoid origin for aligned boxes - -The rule for the origin of the CompositeTrapezoids routine is the -upper-left corner of the first trapezoid. Care must be taken in case the -trapezoid edge is upside down to consider the upper vertex. - -Reported-by: "Jasper St. Pierre" <jstpierre@mecheye.net> -Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> - - ---- src/sna/sna_trapezoids.c.orig 2013-08-20 22:26:26.000000000 +0200 -+++ src/sna/sna_trapezoids.c 2015-04-12 16:40:02.382938000 +0200 -@@ -2690,13 +2690,16 @@ - BoxRec stack_boxes[64], *boxes; - pixman_region16_t region, clip; - struct sna_composite_op tmp; -+ int16_t dst_x, dst_y; - bool ret = true; - int dx, dy, n, num_boxes; - - if (NO_ALIGNED_BOXES) - return false; - -- DBG(("%s\n", __FUNCTION__)); -+ DBG(("%s: pixmap=%ld, nboxes=%d, dx=(%d, %d)\n", __FUNCTION__, -+ get_drawable_pixmap(dst->pDrawable)->drawable.serialNumber, -+ ntrap, dst->pDrawable->x, dst->pDrawable->y)); - - boxes = stack_boxes; - if (ntrap > (int)ARRAY_SIZE(stack_boxes)) { -@@ -2738,19 +2741,20 @@ - if (num_boxes == 0) - goto free_boxes; - -- DBG(("%s: extents (%d, %d), (%d, %d) offset of (%d, %d)\n", -+ trapezoid_origin(&traps[0].left, &dst_x, &dst_y); -+ -+ DBG(("%s: extents (%d, %d), (%d, %d) offset of (%d, %d), origin (%d, %d)\n", - __FUNCTION__, - region.extents.x1, region.extents.y1, - region.extents.x2, region.extents.y2, - region.extents.x1 - boxes[0].x1, -- region.extents.y1 - boxes[0].y1)); -- -- src_x += region.extents.x1 - boxes[0].x1; -- src_y += region.extents.y1 - boxes[0].y1; -+ region.extents.y1 - boxes[0].y1, -+ dst_x, dst_y)); - - if (!sna_compute_composite_region(&clip, - src, NULL, dst, -- src_x, src_y, -+ src_x + region.extents.x1 - dst_x - dx, -+ src_y + region.extents.y1 - dst_y - dy, - 0, 0, - region.extents.x1 - dx, region.extents.y1 - dy, - region.extents.x2 - region.extents.x1, -@@ -2760,9 +2764,18 @@ - goto done; - } - -+ DBG(("%s: clipped extents (%d, %d), (%d, %d); now offset by (%d, %d), orgin (%d, %d)\n", -+ __FUNCTION__, -+ clip.extents.x1, clip.extents.y1, -+ clip.extents.x2, clip.extents.y2, -+ clip.extents.x1 - boxes[0].x1, -+ clip.extents.y1 - boxes[0].y1, -+ dst_x, dst_y)); -+ - if (force_fallback || - !sna->render.composite(sna, op, src, NULL, dst, -- src_x, src_y, -+ src_x + clip.extents.x1 - dst_x, -+ src_y + clip.extents.y1 - dst_y, - 0, 0, - clip.extents.x1, clip.extents.y1, - clip.extents.x2 - clip.extents.x1, -@@ -2796,6 +2809,8 @@ - } - - DBG(("%s: fbComposite()\n", __FUNCTION__)); -+ src_x -= dst_x - dx; -+ src_y -= dst_y - dy; - if (maskFormat) { - pixman_region_init_rects(®ion, boxes, num_boxes); - RegionIntersect(®ion, ®ion, &clip); -@@ -2804,8 +2819,8 @@ - count = REGION_NUM_RECTS(®ion); - for (i = 0; i < count; i++) { - fbComposite(op, src, NULL, dst, -- src_x + b[i].x1 - boxes[0].x1, -- src_y + b[i].y1 - boxes[0].y1, -+ src_x + b[i].x1, -+ src_y + b[i].y1, - 0, 0, - b[i].x1, b[i].y1, - b[i].x2 - b[i].x1, b[i].y2 - b[i].y1); -@@ -2819,8 +2834,8 @@ - count = REGION_NUM_RECTS(®ion); - for (i = 0; i < count; i++) { - fbComposite(op, src, NULL, dst, -- src_x + b[i].x1 - boxes[0].x1, -- src_y + b[i].y1 - boxes[0].y1, -+ src_x + b[i].x1, -+ src_y + b[i].y1, - 0, 0, - b[i].x1, b[i].y1, - b[i].x2 - b[i].x1, b[i].y2 - b[i].y1); diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.c deleted file mode 100644 index 9f75bf5f3e2..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.c +++ /dev/null @@ -1,82 +0,0 @@ ---- src/sna/sna_video.c.orig 2015-03-05 09:45:32 UTC -+++ src/sna/sna_video.c -@@ -68,6 +68,7 @@ - #else - static inline void sna_video_xvmc_setup(struct sna *sna, ScreenPtr ptr) - { -+ DBG(("%s: XvMC not compiled in\n")); - } - #endif - -@@ -620,6 +621,7 @@ sna_xv_fixup_formats(ScreenPtr screen, X - return count; - } - -+#if XORG_XV_VERSION < 2 - static int - sna_xv_query_adaptors(ScreenPtr screen, - XvAdaptorPtr *adaptors, -@@ -636,20 +638,10 @@ static Bool - sna_xv_close_screen(CLOSE_SCREEN_ARGS_DECL) - { - struct sna *sna = to_sna_from_screen(screen); -- int i; -- -- for (i = 0; i < sna->xv.num_adaptors; i++) { -- free(sna->xv.adaptors[i].pPorts->devPriv.ptr); -- free(sna->xv.adaptors[i].pPorts); -- free(sna->xv.adaptors[i].pEncodings); -- } -- free(sna->xv.adaptors); -- -- sna->xv.adaptors = NULL; -- sna->xv.num_adaptors = 0; -- -+ sna_video_close(sna); - return TRUE; - } -+#endif - - void sna_video_init(struct sna *sna, ScreenPtr screen) - { -@@ -671,8 +663,10 @@ void sna_video_init(struct sna *sna, Scr - return; - - xv = to_xv(screen); -+#if XORG_XV_VERSION < 2 - xv->ddCloseScreen = sna_xv_close_screen; - xv->ddQueryAdaptors = sna_xv_query_adaptors; -+#endif - - sna_video_textured_setup(sna, screen); - sna_video_sprite_setup(sna, screen); -@@ -698,7 +692,28 @@ void sna_video_destroy_window(WindowPtr - XvPortPtr port; - - port = sna_window_get_port(win); -- if (port) -+ if (port) { -+#if XORG_XV_VERSION < 2 - port->pAdaptor->ddStopVideo(NULL, port, &win->drawable); -+#else -+ port->pAdaptor->ddStopVideo(port, &win->drawable); -+#endif -+ } - assert(sna_window_get_port(win) == NULL); - } -+ -+void sna_video_close(struct sna *sna) -+{ -+ int i; -+ -+ for (i = 0; i < sna->xv.num_adaptors; i++) { -+ free(sna->xv.adaptors[i].pPorts->devPriv.ptr); -+ free(sna->xv.adaptors[i].pPorts); -+ free(sna->xv.adaptors[i].pEncodings); -+ } -+ free(sna->xv.adaptors); -+ -+ sna->xv.adaptors = NULL; -+ sna->xv.num_adaptors = 0; -+} -+ diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.h b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.h deleted file mode 100644 index dd4b3e0b8a1..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.h +++ /dev/null @@ -1,10 +0,0 @@ ---- src/sna/sna_video.h.orig 2015-03-05 09:53:01 UTC -+++ src/sna/sna_video.h -@@ -129,6 +129,7 @@ void sna_video_overlay_setup(struct sna - void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen); - void sna_video_textured_setup(struct sna *sna, ScreenPtr screen); - void sna_video_destroy_window(WindowPtr win); -+void sna_video_close(struct sna *sna); - - XvAdaptorPtr sna_xv_adaptor_alloc(struct sna *sna); - int sna_xv_fixup_formats(ScreenPtr screen, diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__overlay.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__overlay.c deleted file mode 100644 index e44f6186e0f..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__overlay.c +++ /dev/null @@ -1,101 +0,0 @@ ---- src/sna/sna_video_overlay.c.orig 2015-03-05 09:54:32 UTC -+++ src/sna/sna_video_overlay.c -@@ -121,9 +121,7 @@ static bool sna_video_overlay_update_att - return drmIoctl(video->sna->kgem.fd, DRM_IOCTL_I915_OVERLAY_ATTRS, &attrs) == 0; - } - --static int sna_video_overlay_stop(ClientPtr client, -- XvPortPtr port, -- DrawablePtr draw) -+static int sna_video_overlay_stop(ddStopVideo_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -148,10 +146,7 @@ static int sna_video_overlay_stop(Client - } - - static int --sna_video_overlay_set_attribute(ClientPtr client, -- XvPortPtr port, -- Atom attribute, -- INT32 value) -+sna_video_overlay_set_attribute(ddSetPortAttribute_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -270,12 +265,7 @@ sna_video_overlay_get_attribute(ClientPt - } - - static int --sna_video_overlay_best_size(ClientPtr client, -- XvPortPtr port, -- CARD8 motion, -- CARD16 vid_w, CARD16 vid_h, -- CARD16 drw_w, CARD16 drw_h, -- unsigned int *p_w, unsigned int *p_h) -+sna_video_overlay_best_size(ddQueryBestSize_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -464,18 +454,7 @@ sna_video_overlay_show(struct sna *sna, - } - - static int --sna_video_overlay_put_image(ClientPtr client, -- DrawablePtr draw, -- XvPortPtr port, -- GCPtr gc, -- INT16 src_x, INT16 src_y, -- CARD16 src_w, CARD16 src_h, -- INT16 drw_x, INT16 drw_y, -- CARD16 drw_w, CARD16 drw_h, -- XvImagePtr format, -- unsigned char *buf, -- Bool sync, -- CARD16 width, CARD16 height) -+sna_video_overlay_put_image(ddPutImage_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -604,18 +583,16 @@ invisible: - /* - * If the video isn't visible on any CRTC, turn it off - */ -+#if XORG_XV_VERSION < 2 - sna_video_overlay_stop(client, port, draw); -+#else -+ sna_video_overlay_stop(port, draw); -+#endif - return Success; - } - - static int --sna_video_overlay_query(ClientPtr client, -- XvPortPtr port, -- XvImagePtr format, -- unsigned short *w, -- unsigned short *h, -- int *pitches, -- int *offsets) -+sna_video_overlay_query(ddQueryImageAttributes_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna_video_frame frame; -@@ -771,8 +748,10 @@ void sna_video_overlay_setup(struct sna - adaptor->pAttributes = (XvAttributeRec *)Attributes; - adaptor->nImages = ARRAY_SIZE(Images); - adaptor->pImages = (XvImageRec *)Images; -+#if XORG_XV_VERSION < 2 - adaptor->ddAllocatePort = sna_xv_alloc_port; - adaptor->ddFreePort = sna_xv_free_port; -+#endif - adaptor->ddPutVideo = NULL; - adaptor->ddPutStill = NULL; - adaptor->ddGetVideo = NULL; -@@ -843,4 +822,6 @@ void sna_video_overlay_setup(struct sna - } - - sna_video_overlay_update_attrs(video); -+ -+ DBG(("%s: '%s' initialized %d ports\n", __FUNCTION__, adaptor->name, adaptor->nPorts)); - } diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__sprite.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__sprite.c deleted file mode 100644 index ffde2de15e5..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__sprite.c +++ /dev/null @@ -1,114 +0,0 @@ ---- src/sna/sna_video_sprite.c.orig 2015-03-05 10:02:08 UTC -+++ src/sna/sna_video_sprite.c -@@ -56,9 +56,7 @@ static const XvAttributeRec attribs[] = - { XvSettable | XvGettable, 0, 0xffffff, (char *)"XV_COLORKEY" }, - }; - --static int sna_video_sprite_stop(ClientPtr client, -- XvPortPtr port, -- DrawablePtr draw) -+static int sna_video_sprite_stop(ddStopVideo_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct drm_mode_set_plane s; -@@ -82,10 +80,7 @@ static int sna_video_sprite_stop(ClientP - return Success; - } - --static int sna_video_sprite_set_attr(ClientPtr client, -- XvPortPtr port, -- Atom attribute, -- INT32 value) -+static int sna_video_sprite_set_attr(ddSetPortAttribute_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - -@@ -104,10 +99,7 @@ static int sna_video_sprite_set_attr(Cli - return Success; - } - --static int sna_video_sprite_get_attr(ClientPtr client, -- XvPortPtr port, -- Atom attribute, -- INT32 *value) -+static int sna_video_sprite_get_attr(ddGetPortAttribute_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - -@@ -121,13 +113,7 @@ static int sna_video_sprite_get_attr(Cli - return Success; - } - --static int sna_video_sprite_best_size(ClientPtr client, -- XvPortPtr port, -- CARD8 motion, -- CARD16 vid_w, CARD16 vid_h, -- CARD16 drw_w, CARD16 drw_h, -- unsigned int *p_w, -- unsigned int *p_h) -+static int sna_video_sprite_best_size(ddQueryBestSize_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -310,18 +296,7 @@ sna_video_sprite_show(struct sna *sna, - return true; - } - --static int sna_video_sprite_put_image(ClientPtr client, -- DrawablePtr draw, -- XvPortPtr port, -- GCPtr gc, -- INT16 src_x, INT16 src_y, -- CARD16 src_w, CARD16 src_h, -- INT16 drw_x, INT16 drw_y, -- CARD16 drw_w, CARD16 drw_h, -- XvImagePtr format, -- unsigned char *buf, -- Bool sync, -- CARD16 width, CARD16 height) -+static int sna_video_sprite_put_image(ddPutImage_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -430,16 +405,14 @@ static int sna_video_sprite_put_image(Cl - - invisible: - /* If the video isn't visible on any CRTC, turn it off */ -+#if XORG_XV_VERSION < 2 - return sna_video_sprite_stop(client, port, draw); -+#else -+ return sna_video_sprite_stop(port, draw); -+#endif - } - --static int sna_video_sprite_query(ClientPtr client, -- XvPortPtr port, -- XvImagePtr format, -- unsigned short *w, -- unsigned short *h, -- int *pitches, -- int *offsets) -+static int sna_video_sprite_query(ddQueryImageAttributes_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna_video_frame frame; -@@ -548,8 +521,10 @@ void sna_video_sprite_setup(struct sna * - if (sna->kgem.gen == 071) - adaptor->nImages = 4; - -+#if XORG_XV_VERSION < 2 - adaptor->ddAllocatePort = sna_xv_alloc_port; - adaptor->ddFreePort = sna_xv_free_port; -+#endif - adaptor->ddPutVideo = NULL; - adaptor->ddPutStill = NULL; - adaptor->ddGetVideo = NULL; -@@ -593,6 +568,8 @@ void sna_video_sprite_setup(struct sna * - - xvColorKey = MAKE_ATOM("XV_COLORKEY"); - xvAlwaysOnTop = MAKE_ATOM("XV_ALWAYS_ON_TOP"); -+ -+ DBG(("%s: '%s' initialized %d ports\n", __FUNCTION__, adaptor->name, adaptor->nPorts)); - } - #else - void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen) diff --git a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__textured.c b/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__textured.c deleted file mode 100644 index c80ec1e5b1a..00000000000 --- a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video__textured.c +++ /dev/null @@ -1,105 +0,0 @@ ---- src/sna/sna_video_textured.c.orig 2015-03-05 10:08:42 UTC -+++ src/sna/sna_video_textured.c -@@ -56,9 +56,7 @@ static const XvImageRec Images[] = { - XVMC_YUV, - }; - --static int sna_video_textured_stop(ClientPtr client, -- XvPortPtr port, -- DrawablePtr draw) -+static int sna_video_textured_stop(ddStopVideo_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - -@@ -71,10 +69,7 @@ static int sna_video_textured_stop(Clien - } - - static int --sna_video_textured_set_attribute(ClientPtr client, -- XvPortPtr port, -- Atom attribute, -- INT32 value) -+sna_video_textured_set_attribute(ddSetPortAttribute_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - -@@ -100,10 +95,7 @@ sna_video_textured_set_attribute(ClientP - } - - static int --sna_video_textured_get_attribute(ClientPtr client, -- XvPortPtr port, -- Atom attribute, -- INT32 *value) -+sna_video_textured_get_attribute(ddGetPortAttribute_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - -@@ -120,13 +112,7 @@ sna_video_textured_get_attribute(ClientP - } - - static int --sna_video_textured_best_size(ClientPtr client, -- XvPortPtr port, -- CARD8 motion, -- CARD16 vid_w, CARD16 vid_h, -- CARD16 drw_w, CARD16 drw_h, -- unsigned int *p_w, -- unsigned int *p_h) -+sna_video_textured_best_size(ddQueryBestSize_ARGS) - { - if (vid_w > (drw_w << 1)) - drw_w = vid_w >> 1; -@@ -153,18 +139,7 @@ sna_video_textured_best_size(ClientPtr c - * compositing. It's a new argument to the function in the 1.1 server. - */ - static int --sna_video_textured_put_image(ClientPtr client, -- DrawablePtr draw, -- XvPortPtr port, -- GCPtr gc, -- INT16 src_x, INT16 src_y, -- CARD16 src_w, CARD16 src_h, -- INT16 drw_x, INT16 drw_y, -- CARD16 drw_w, CARD16 drw_h, -- XvImagePtr format, -- unsigned char *buf, -- Bool sync, -- CARD16 width, CARD16 height) -+sna_video_textured_put_image(ddPutImage_ARGS) - { - struct sna_video *video = port->devPriv.ptr; - struct sna *sna = video->sna; -@@ -269,13 +244,7 @@ sna_video_textured_put_image(ClientPtr c - } - - static int --sna_video_textured_query(ClientPtr client, -- XvPortPtr port, -- XvImagePtr format, -- unsigned short *w, -- unsigned short *h, -- int *pitches, -- int *offsets) -+sna_video_textured_query(ddQueryImageAttributes_ARGS) - { - int size, tmp; - -@@ -384,8 +353,10 @@ void sna_video_textured_setup(struct sna - adaptor->pAttributes = (XvAttributeRec *)Attributes; - adaptor->nImages = ARRAY_SIZE(Images); - adaptor->pImages = (XvImageRec *)Images; -+#if XORG_XV_VERSION < 2 - adaptor->ddAllocatePort = sna_xv_alloc_port; - adaptor->ddFreePort = sna_xv_free_port; -+#endif - adaptor->ddPutVideo = NULL; - adaptor->ddPutStill = NULL; - adaptor->ddGetVideo = NULL; -@@ -426,4 +397,6 @@ void sna_video_textured_setup(struct sna - xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); - xvContrast = MAKE_ATOM("XV_CONTRAST"); - xvSyncToVblank = MAKE_ATOM("XV_SYNC_TO_VBLANK"); -+ -+ DBG(("%s: '%s' initialized %d ports\n", __FUNCTION__, adaptor->name, adaptor->nPorts)); - } diff --git a/x11-drivers/xf86-video-intel/pkg-descr b/x11-drivers/xf86-video-intel/pkg-descr index 6ace2532843..ffbea1fa582 100644 --- a/x11-drivers/xf86-video-intel/pkg-descr +++ b/x11-drivers/xf86-video-intel/pkg-descr @@ -1,3 +1,10 @@ -Driver for Intel integrated graphics chipsets. It supports the i810, -i810-DC100, i810e, i815, i830M, 845G, 852GM, 855GM, 865G, 915G, 915GM, -945G, 945GM, 965G, 965Q, 946GZ and 965GM chipsets. +Driver for Intel(R) Integrated Graphics Chipsets: + i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, + 915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, + Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, + GM45, 4 Series, G45/G43, Q45/Q43, G41, B43 +Driver for Intel(R) HD Graphics: 2000-5000 +Driver for Intel(R) Iris(TM) Graphics: 5100 +Driver for Intel(R) Iris(TM) Pro Graphics: 5200 + +WWW: http://www.intellinuxgraphics.com/ diff --git a/x11-drivers/xf86-video-mach64/Makefile b/x11-drivers/xf86-video-mach64/Makefile index 67e23107962..ab59c0ce73f 100644 --- a/x11-drivers/xf86-video-mach64/Makefile +++ b/x11-drivers/xf86-video-mach64/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-mach64 PORTVERSION= 6.9.5 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-mga/Makefile b/x11-drivers/xf86-video-mga/Makefile index 2659797742f..96e67f11ef1 100644 --- a/x11-drivers/xf86-video-mga/Makefile +++ b/x11-drivers/xf86-video-mga/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-mga PORTVERSION= 1.6.4 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 3 CATEGORIES= x11-drivers diff --git a/x11-drivers/xf86-video-neomagic/Makefile b/x11-drivers/xf86-video-neomagic/Makefile index 2d6591a5c76..0371bb7f9db 100644 --- a/x11-drivers/xf86-video-neomagic/Makefile +++ b/x11-drivers/xf86-video-neomagic/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-neomagic PORTVERSION= 1.2.9 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-nouveau/Makefile b/x11-drivers/xf86-video-nouveau/Makefile new file mode 100644 index 00000000000..7e07329e613 --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +PORTNAME= xf86-video-nouveau +PORTVERSION= 1.0.12 +CATEGORIES= x11-drivers + +MAINTAINER= x11@FreeBSD.org +COMMENT= X.Org nouveau display driver + +XORG_CAT= driver + +LIB_DEPENDS= libdrm_nouveau.so:graphics/libdrm + +.include <bsd.port.mk> diff --git a/x11-drivers/xf86-video-nouveau/distinfo b/x11-drivers/xf86-video-nouveau/distinfo new file mode 100644 index 00000000000..d6648bfea92 --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1466983244 +SHA256 (xorg/driver/xf86-video-nouveau-1.0.12.tar.bz2) = 0ea057ad7fc31caba2d4e46c7e418fe2b3c762b04fb8d382f53383397fd8391e +SIZE (xorg/driver/xf86-video-nouveau-1.0.12.tar.bz2) = 599816 diff --git a/x11-drivers/xf86-video-nouveau/files/patch-1da8a93 b/x11-drivers/xf86-video-nouveau/files/patch-1da8a93 new file mode 100644 index 00000000000..5731b0aad7b --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/files/patch-1da8a93 @@ -0,0 +1,238 @@ +From 1da8a937be19e41c51a3d516bd98cee988bca44b Mon Sep 17 00:00:00 2001 +From: Ben Skeggs <bskeggs@redhat.com> +Date: Thu, 2 Jun 2016 11:23:53 +1000 +Subject: exa/nv50-: fix some potential incomplete pushes + +I don't think these should actually be able to happen, given that we +already reject the unknown formats in the Check() functions. But, +just in case... + +Signed-off-by: Ben Skeggs <bskeggs@redhat.com> + +diff --git a/src/nv50_exa.c b/src/nv50_exa.c +index 221160d..7272065 100644 +--- src/nv50_exa.c ++++ src/nv50_exa.c +@@ -575,82 +575,84 @@ NV50EXAPictTexture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, unsigned unit) + { + struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); + struct nouveau_pushbuf *push = pNv->pushbuf; ++ uint32_t format; + + /*XXX: Scanout buffer not tiled, someone needs to figure it out */ + if (!nv50_style_tiled_pixmap(ppix)) + NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); + +- PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); +- PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); + switch (ppict->format) { + case PICT_a8r8g8b8: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8); + break; + case PICT_a8b8g8r8: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8); + break; + case PICT_x8r8g8b8: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8); + break; + case PICT_x8b8g8r8: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8); + break; + case PICT_r5g6b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 5_6_5)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 5_6_5); + break; + case PICT_a8: +- PUSH_DATA (push, _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8)); ++ format = _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8); + break; + case PICT_x1r5g5b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5); + break; + case PICT_x1b5g5r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5); + break; + case PICT_a1r5g5b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5); + break; + case PICT_a1b5g5r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5); + break; + case PICT_b5g6r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 5_6_5)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 5_6_5); + break; + case PICT_b8g8r8x8: +- PUSH_DATA (push, _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8)); ++ format = _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8); + break; + case PICT_b8g8r8a8: +- PUSH_DATA (push, _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8)); ++ format = _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8); + break; + case PICT_a2b10g10r10: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10); + break; + case PICT_x2b10g10r10: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10); + break; + case PICT_x2r10g10b10: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10); + break; + case PICT_a2r10g10b10: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10); + break; + case PICT_x4r4g4b4: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4); + break; + case PICT_x4b4g4r4: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4); + break; + case PICT_a4r4g4b4: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4); + break; + case PICT_a4b4g4r4: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4); + break; + default: + NOUVEAU_FALLBACK("invalid picture format, this SHOULD NOT HAPPEN. Expect trouble.\n"); + } + #undef _ + ++ PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); ++ PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); ++ PUSH_DATA (push, format); + PUSH_DATA (push, bo->offset); + PUSH_DATA (push, (bo->offset >> 32) | + (bo->config.nv50.tile_mode << 18) | +diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c +index 7aa98cf..6add60b 100644 +--- src/nvc0_exa.c ++++ src/nvc0_exa.c +@@ -574,82 +574,84 @@ NVC0EXAPictTexture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, unsigned unit) + { + struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); + struct nouveau_pushbuf *push = pNv->pushbuf; ++ uint32_t format; + + /*XXX: Scanout buffer not tiled, someone needs to figure it out */ + if (!nv50_style_tiled_pixmap(ppix)) + NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); + +- PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); +- PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); + switch (ppict->format) { + case PICT_a8r8g8b8: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8); + break; + case PICT_a8b8g8r8: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8); + break; + case PICT_x8r8g8b8: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8); + break; + case PICT_x8b8g8r8: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8); + break; + case PICT_r5g6b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 5_6_5)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 5_6_5); + break; + case PICT_a8: +- PUSH_DATA (push, _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8)); ++ format = _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8); + break; + case PICT_x1r5g5b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5); + break; + case PICT_x1b5g5r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5); + break; + case PICT_a1r5g5b5: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5); + break; + case PICT_a1b5g5r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5); + break; + case PICT_b5g6r5: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 5_6_5)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 5_6_5); + break; + case PICT_b8g8r8x8: +- PUSH_DATA (push, _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8)); ++ format = _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8); + break; + case PICT_b8g8r8a8: +- PUSH_DATA (push, _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8)); ++ format = _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8); + break; + case PICT_a2b10g10r10: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10); + break; + case PICT_x2b10g10r10: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10); + break; + case PICT_x2r10g10b10: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10); + break; + case PICT_a2r10g10b10: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10); + break; + case PICT_x4r4g4b4: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4)); ++ format = _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4); + break; + case PICT_x4b4g4r4: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4)); ++ format = _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4); + break; + case PICT_a4r4g4b4: +- PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4)); ++ format = _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4); + break; + case PICT_a4b4g4r4: +- PUSH_DATA (push, _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4)); ++ format = _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4); + break; + default: + NOUVEAU_FALLBACK("invalid picture format, this SHOULD NOT HAPPEN. Expect trouble.\n"); + } + #undef _ + ++ PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); ++ PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); ++ PUSH_DATA (push, format); + PUSH_DATA (push, bo->offset); + PUSH_DATA (push, (bo->offset >> 32) | + (bo->config.nvc0.tile_mode << 18) | +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-video-nouveau/files/patch-bb57f9a b/x11-drivers/xf86-video-nouveau/files/patch-bb57f9a new file mode 100644 index 00000000000..1a10030b57b --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/files/patch-bb57f9a @@ -0,0 +1,77 @@ +From bb57f9af9d179af0962456dca369953521ea8c2c Mon Sep 17 00:00:00 2001 +From: Ben Skeggs <bskeggs@redhat.com> +Date: Thu, 2 Jun 2016 10:17:58 +1000 +Subject: fix use of out-of-scope data + +Reported by Coverity. + +Signed-off-by: Ben Skeggs <bskeggs@redhat.com> + +diff --git a/src/nouveau_copy.c b/src/nouveau_copy.c +index d0b868d..e152a53 100644 +--- src/nouveau_copy.c ++++ src/nouveau_copy.c +@@ -50,8 +50,7 @@ nouveau_copy_init(ScreenPtr pScreen) + }, *method = methods; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + NVPtr pNv = NVPTR(pScrn); +- void *data; +- int ret, size; ++ int ret; + + if (pNv->AccelMethod == NONE) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, +@@ -65,30 +64,35 @@ nouveau_copy_init(ScreenPtr pScreen) + pNv->dev->chipset == 0xaa || + pNv->dev->chipset == 0xac) + return FALSE; +- data = &(struct nv04_fifo) { +- .vram = NvDmaFB, +- .gart = NvDmaTT, +- }; +- size = sizeof(struct nv04_fifo); ++ ++ ret = nouveau_object_new(&pNv->dev->object, 0, ++ NOUVEAU_FIFO_CHANNEL_CLASS, ++ &(struct nv04_fifo) { ++ .vram = NvDmaFB, ++ .gart = NvDmaTT, ++ }, sizeof(struct nv04_fifo), ++ &pNv->ce_channel); + break; + case NV_FERMI: +- data = &(struct nvc0_fifo) {}; +- size = sizeof(struct nvc0_fifo); ++ ret = nouveau_object_new(&pNv->dev->object, 0, ++ NOUVEAU_FIFO_CHANNEL_CLASS, ++ &(struct nvc0_fifo) { ++ }, sizeof(struct nvc0_fifo), ++ &pNv->ce_channel); + break; + case NV_KEPLER: +- data = &(struct nve0_fifo) { +- .engine = NVE0_FIFO_ENGINE_CE0 | +- NVE0_FIFO_ENGINE_CE1, +- }; +- size = sizeof(struct nvc0_fifo); ++ ret = nouveau_object_new(&pNv->dev->object, 0, ++ NOUVEAU_FIFO_CHANNEL_CLASS, ++ &(struct nve0_fifo) { ++ .engine = NVE0_FIFO_ENGINE_CE0 | ++ NVE0_FIFO_ENGINE_CE1, ++ }, sizeof(struct nve0_fifo), ++ &pNv->ce_channel); + break; + default: + return FALSE; + } + +- ret = nouveau_object_new(&pNv->dev->object, 0, +- NOUVEAU_FIFO_CHANNEL_CLASS, data, size, +- &pNv->ce_channel); + if (ret) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[COPY] error allocating channel: %d\n", ret); +-- +cgit v0.10.2 + diff --git a/x11-drivers/xf86-video-nouveau/pkg-descr b/x11-drivers/xf86-video-nouveau/pkg-descr new file mode 100644 index 00000000000..8f5f318e821 --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/pkg-descr @@ -0,0 +1,3 @@ +This package contains the X.Org xf86-video-nouveau driver. + +WWW: http://www.x.org diff --git a/x11-drivers/xf86-video-nouveau/pkg-plist b/x11-drivers/xf86-video-nouveau/pkg-plist new file mode 100644 index 00000000000..0602ab12c01 --- /dev/null +++ b/x11-drivers/xf86-video-nouveau/pkg-plist @@ -0,0 +1,2 @@ +lib/xorg/modules/drivers/nouveau_drv.so +man/man4/nouveau.4x.gz diff --git a/x11-drivers/xf86-video-nv/Makefile b/x11-drivers/xf86-video-nv/Makefile index d65548cc6e6..7938083f560 100644 --- a/x11-drivers/xf86-video-nv/Makefile +++ b/x11-drivers/xf86-video-nv/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-nv PORTVERSION= 2.1.20 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-openchrome/Makefile b/x11-drivers/xf86-video-openchrome/Makefile index 4ab6773a781..90a05023a38 100644 --- a/x11-drivers/xf86-video-openchrome/Makefile +++ b/x11-drivers/xf86-video-openchrome/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-openchrome PORTVERSION= 0.3.3 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-openchrome/files/patch-src__via_driver.c b/x11-drivers/xf86-video-openchrome/files/patch-src__via_driver.c new file mode 100644 index 00000000000..e7b63c200dc --- /dev/null +++ b/x11-drivers/xf86-video-openchrome/files/patch-src__via_driver.c @@ -0,0 +1,11 @@ +--- src/via_driver.c.orig 2015-11-19 15:49:03.658837000 +0100 ++++ src/via_driver.c 2015-11-19 15:51:11.689034000 +0100 +@@ -806,7 +806,7 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, in + { + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + struct buffer_object *old_front = NULL, *new_front = NULL; +- int old_width, old_height, old_dwidth, format; ++ int old_width = 0, old_height = 0, old_dwidth = 0, format; + int cpp = (scrn->bitsPerPixel + 7) >> 3, i; + ScreenPtr screen = scrn->pScreen; + VIAPtr pVia = VIAPTR(scrn); diff --git a/x11-drivers/xf86-video-r128/Makefile b/x11-drivers/xf86-video-r128/Makefile index 15b2a4a3a8f..6516f783943 100644 --- a/x11-drivers/xf86-video-r128/Makefile +++ b/x11-drivers/xf86-video-r128/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-r128 PORTVERSION= 6.10.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-rendition/Makefile b/x11-drivers/xf86-video-rendition/Makefile index 15949523f52..ef726d4821c 100644 --- a/x11-drivers/xf86-video-rendition/Makefile +++ b/x11-drivers/xf86-video-rendition/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-rendition PORTVERSION= 4.2.5 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-s3/Makefile b/x11-drivers/xf86-video-s3/Makefile index e9d71f2cf38..99ccb30b345 100644 --- a/x11-drivers/xf86-video-s3/Makefile +++ b/x11-drivers/xf86-video-s3/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-s3 PORTVERSION= 0.6.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-s3virge/Makefile b/x11-drivers/xf86-video-s3virge/Makefile index ccd229d5c4b..62bb7696836 100644 --- a/x11-drivers/xf86-video-s3virge/Makefile +++ b/x11-drivers/xf86-video-s3virge/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-s3virge PORTVERSION= 1.10.7 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-savage/Makefile b/x11-drivers/xf86-video-savage/Makefile index 00d6c981c84..38bdc86acd1 100644 --- a/x11-drivers/xf86-video-savage/Makefile +++ b/x11-drivers/xf86-video-savage/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-savage PORTVERSION= 2.3.8 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-scfb/Makefile b/x11-drivers/xf86-video-scfb/Makefile index 5ffdfcf262e..89b1c5c1d82 100644 --- a/x11-drivers/xf86-video-scfb/Makefile +++ b/x11-drivers/xf86-video-scfb/Makefile @@ -3,7 +3,7 @@ PORTNAME= xf86-video-scfb PORTVERSION= 0.0.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= ray@FreeBSD.org diff --git a/x11-drivers/xf86-video-siliconmotion/Makefile b/x11-drivers/xf86-video-siliconmotion/Makefile index 5e164bb15f0..6bbc50e7ad3 100644 --- a/x11-drivers/xf86-video-siliconmotion/Makefile +++ b/x11-drivers/xf86-video-siliconmotion/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-siliconmotion PORTVERSION= 1.7.8 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-sis/Makefile b/x11-drivers/xf86-video-sis/Makefile index 60e1c9bebc1..c63f22522a0 100644 --- a/x11-drivers/xf86-video-sis/Makefile +++ b/x11-drivers/xf86-video-sis/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-sis PORTVERSION= 0.10.8 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-sis/files/patch-src_init301.c b/x11-drivers/xf86-video-sis/files/patch-src_init301.c new file mode 100644 index 00000000000..a0f65ade71c --- /dev/null +++ b/x11-drivers/xf86-video-sis/files/patch-src_init301.c @@ -0,0 +1,11 @@ +--- src/init301.c.orig 2015-11-19 15:53:05.412011000 +0100 ++++ src/init301.c 2015-11-19 15:53:24.734403000 +0100 +@@ -446,7 +446,7 @@ SiS_CR36BIOSWord23d(struct SiS_Private * + void + SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime) + { +- unsigned int i, j; ++ unsigned int i, j = 0; + + for(i = 0; i < delaytime; i++) { + j += SiS_GetReg(SiS_Pr->SiS_P3c4,0x05); diff --git a/x11-drivers/xf86-video-sunffb/Makefile b/x11-drivers/xf86-video-sunffb/Makefile index 96849c60cde..1326bcd0300 100644 --- a/x11-drivers/xf86-video-sunffb/Makefile +++ b/x11-drivers/xf86-video-sunffb/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-sunffb PORTVERSION= 1.2.2 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-tdfx/Makefile b/x11-drivers/xf86-video-tdfx/Makefile index 61bdc3f8afa..4edd68b4a08 100644 --- a/x11-drivers/xf86-video-tdfx/Makefile +++ b/x11-drivers/xf86-video-tdfx/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-tdfx PORTVERSION= 1.4.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-trident/Makefile b/x11-drivers/xf86-video-trident/Makefile index dff0680ecb3..683f8c45897 100644 --- a/x11-drivers/xf86-video-trident/Makefile +++ b/x11-drivers/xf86-video-trident/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-trident PORTVERSION= 1.3.7 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-tseng/Makefile b/x11-drivers/xf86-video-tseng/Makefile index 9fc489d014a..177f53fb3fc 100644 --- a/x11-drivers/xf86-video-tseng/Makefile +++ b/x11-drivers/xf86-video-tseng/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-tseng PORTVERSION= 1.2.5 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-vesa/Makefile b/x11-drivers/xf86-video-vesa/Makefile index 2a6d248a485..b575c201153 100644 --- a/x11-drivers/xf86-video-vesa/Makefile +++ b/x11-drivers/xf86-video-vesa/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-vesa PORTVERSION= 2.3.4 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-vmware/Makefile b/x11-drivers/xf86-video-vmware/Makefile index f6384836f0b..3e1127cc9c3 100644 --- a/x11-drivers/xf86-video-vmware/Makefile +++ b/x11-drivers/xf86-video-vmware/Makefile @@ -2,6 +2,7 @@ PORTNAME= xf86-video-vmware PORTVERSION= 13.1.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-voodoo/Makefile b/x11-drivers/xf86-video-voodoo/Makefile index 2113ace6b22..fea4fce6804 100644 --- a/x11-drivers/xf86-video-voodoo/Makefile +++ b/x11-drivers/xf86-video-voodoo/Makefile @@ -2,7 +2,7 @@ PORTNAME= xf86-video-voodoo PORTVERSION= 1.2.5 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xorg-drivers/Makefile b/x11-drivers/xorg-drivers/Makefile index d49dc239a19..36a914ff179 100644 --- a/x11-drivers/xorg-drivers/Makefile +++ b/x11-drivers/xorg-drivers/Makefile @@ -2,7 +2,7 @@ PORTNAME= xorg-drivers PORTVERSION= 7.7 -PORTREVISION= 3 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org @@ -30,6 +30,7 @@ VIDEO_DRIVERS= mach64 \ nv \ r128 \ vesa \ + amdgpu \ apm \ ark \ chips \ @@ -40,6 +41,7 @@ VIDEO_DRIVERS= mach64 \ i740 \ mga \ neomagic \ + nouveau \ rendition \ s3 \ s3virge \ @@ -66,8 +68,8 @@ ${a:tu}_DESC= Install ${a} ${type} driver . endfor .endfor -OPTIONS_DEFINE_i386= ATI INTEL OPENCHROME -OPTIONS_DEFAULT_i386= ATI INTEL OPENCHROME +OPTIONS_DEFINE_i386= AMDGPU ATI INTEL OPENCHROME NOUVEAU +OPTIONS_DEFAULT_i386= AMDGPU ATI INTEL OPENCHROME NOUVEAU OPTIONS_DEFINE_amd64:= ${OPTIONS_DEFINE_i386} OPTIONS_DEFAULT_amd64:= ${OPTIONS_DEFAULT_i386} @@ -78,10 +80,12 @@ OPTIONS_DEFAULT_sparc64=SUNFFB OPTIONS_DEFINE_ia64= OPENCHROME OPTIONS_DEFAULT_ia64= OPENCHROME +AMDGPU_DESC= Install amdgpu video driver ATI_DESC= Install ati video driver INTEL_DESC= Install intel video driver OPENCHROME_DESC= Install openchrome video driver SUNFFB_DESC= Install sunffb video driver +NOUVEAU_DESC= Install nouveau video driver # these drivers have a different module name compared to the plugin they install QUIRKS= keyboard:kbd diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile index 26946dcc621..6b3245b9ea4 100644 --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME?= xorg-server -PORTVERSION= 1.17.4 +PORTVERSION= 1.18.4 PORTREVISION?= 0 PORTEPOCH?= 1 CATEGORIES= x11-servers @@ -23,19 +23,22 @@ XORG_CAT= xserver SLAVE_PORT?= no OPTIONS_SUB= yes -OPTIONS_DEFINE= SUID +OPTIONS_DEFINE= SUID OPTIONS_RADIO= CONF OPTIONS_RADIO_CONF= HAL DEVD +OPTIONS_DEFINE_amd64= DRI3 +OPTIONS_DEFINE_i386= DRI3 SUID_DESC= Install the Xorg server with setuid bit set HAL_DESC= Compile with HAL config support DEVD_DESC= Use devd for autoconfiguration of input devices +DRI3_DESC= Experimental: Enable DRI3 support OPTIONS_DEFAULT=SUID DEVD OPTIONS_EXCLUDE_sparc64= HAL .include <bsd.port.options.mk> -USES= gmake libtool perl5 tar:bzip2 +USES= gmake libtool perl5 ssl tar:bzip2 USE_PERL5= build USE_GL= gbm egl gl USE_XORG?= xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \ @@ -46,11 +49,10 @@ USE_XORG?= xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \ videoproto compositeproto trapproto presentproto recordproto \ xineramaproto xinerama evieproto xfont fontenc xkbui pixman \ pciaccess xshmfence -USE_OPENSSL= yes CONFIGURE_ARGS?=--disable-dmx --disable-xvfb --disable-xnest \ --without-xmlto --disable-docs --disable-devel-docs \ --localstatedir=/var --without-dtrace --disable-xephyr \ - --enable-record=yes --disable-dri3 --disable-xwayland \ + --enable-record=yes --disable-xwayland \ --enable-glamor INSTALL_TARGET= install-strip @@ -62,6 +64,13 @@ SUB_FILES= pkg-install pkg-deinstall PLIST= ${.CURDIR}/pkg-plist .endif +.if ${PORT_OPTIONS:MDRI3} +USE_XORG+= dri3proto +CONFIGURE_ARGS+= --enable-dri3 +.else +CONFIGURE_ARGS+= --disable-dri3 +.endif + .include <bsd.port.pre.mk> .if ${SSL_DEFAULT} == base @@ -81,10 +90,6 @@ CONFIGURE_ARGS+= --enable-config-hal=no # We handle Xorg setuid in the plist. This allows to build xorg-server as a user. CONFIGURE_ARGS+=--disable-install-setuid -.if ${ARCH} == i386 -EXTRA_PATCHES+= ${FILESDIR}/extra-arch-i386 -.endif - .if ${ARCH} == ia64 EXTRA_PATCHES+= ${FILESDIR}/extra-arch-ia64 .endif diff --git a/x11-servers/xorg-server/distinfo b/x11-servers/xorg-server/distinfo index 83c587efd8c..b62d96fb45f 100644 --- a/x11-servers/xorg-server/distinfo +++ b/x11-servers/xorg-server/distinfo @@ -1,2 +1,3 @@ -SHA256 (xorg/xserver/xorg-server-1.17.4.tar.bz2) = 0c4b45c116a812a996eb432d8508cf26c2ec8c3916ff2a50781796882f8d6457 -SIZE (xorg/xserver/xorg-server-1.17.4.tar.bz2) = 5791384 +TIMESTAMP = 1469387608 +SHA256 (xorg/xserver/xorg-server-1.18.4.tar.bz2) = 278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8 +SIZE (xorg/xserver/xorg-server-1.18.4.tar.bz2) = 6009508 diff --git a/x11-servers/xorg-server/files/extra-arch-i386 b/x11-servers/xorg-server/files/extra-arch-i386 deleted file mode 100644 index 9bebe285797..00000000000 --- a/x11-servers/xorg-server/files/extra-arch-i386 +++ /dev/null @@ -1,70 +0,0 @@ ---- hw/xfree86/common/compiler.h.orig 2015-06-05 17:19:40.000000000 +0200 -+++ hw/xfree86/common/compiler.h 2015-10-12 15:41:30.817470000 +0200 -@@ -968,6 +968,59 @@ inl(unsigned PORT_SIZE port) - #endif /* NDS32_MMIO_SWAP */ - - #elif defined(__i386__) || defined(__ia64__) -+#if defined(__clang__) -+ -+/* -+ * If gcc uses gas rather than the native assembler, the syntax of these -+ * inlines has to be different. DHD -+ */ -+ -+static __inline__ void -+outb(unsigned short port, unsigned char val) -+{ -+ __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port)); -+} -+ -+static __inline__ void -+outw(unsigned short port, unsigned short val) -+{ -+ __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port)); -+} -+ -+static __inline__ void -+outl(unsigned short port, unsigned int val) -+{ -+ __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port)); -+} -+ -+static __inline__ unsigned int -+inb(unsigned short port) -+{ -+ unsigned char ret; -+ __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port)); -+ -+ return ret; -+} -+ -+static __inline__ unsigned int -+inw(unsigned short port) -+{ -+ unsigned short ret; -+ __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port)); -+ -+ return ret; -+} -+ -+static __inline__ unsigned int -+inl(unsigned short port) -+{ -+ unsigned int ret; -+ __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port)); -+ -+ return ret; -+} -+ -+#else /* !__clang__, presumable GAS */ - - static __inline__ void - outb(unsigned short port, unsigned char val) -@@ -1014,6 +1067,7 @@ inl(unsigned short port) - return ret; - } - -+#endif /* !__clang__, GAS part */ - #endif /* arch madness */ - - #else /* !GNUC */ diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c index 0260fb86b78..b5386b58259 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c @@ -1,5 +1,15 @@ -Index: hw/xfree86/common/xf86Xinput.c -@@ -942,6 +942,7 @@ +--- hw/xfree86/common/xf86Xinput.c.orig 2015-10-28 19:15:36.000000000 +0100 ++++ hw/xfree86/common/xf86Xinput.c 2015-11-18 23:51:11.993397000 +0100 +@@ -841,7 +841,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D + { + InputDriverPtr drv = NULL; + DeviceIntPtr dev = NULL; +- Bool paused; ++ Bool paused = 0; + int rval; + const char *path; + +@@ -993,6 +993,7 @@ NewInputDeviceRequest(InputOption *optio if (strcmp(key, "_source") == 0 && (strcmp(value, "server/hal") == 0 || strcmp(value, "server/udev") == 0 || diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist index 3b99a43fc43..a8ca10dbf0b 100644 --- a/x11-servers/xorg-server/pkg-plist +++ b/x11-servers/xorg-server/pkg-plist @@ -22,6 +22,7 @@ include/xorg/damage.h include/xorg/damagestr.h include/xorg/dbestruct.h include/xorg/dgaproc.h +include/xorg/displaymode.h include/xorg/dix.h include/xorg/dixaccess.h include/xorg/dixevents.h @@ -31,6 +32,7 @@ include/xorg/dixgrabs.h include/xorg/dixstruct.h include/xorg/dri.h include/xorg/dri2.h +%%DRI3%%include/xorg/dri3.h include/xorg/dristruct.h include/xorg/edid.h include/xorg/events.h @@ -75,6 +77,7 @@ include/xorg/misyncfd.h include/xorg/misyncshm.h include/xorg/misyncstr.h include/xorg/mizerarc.h +include/xorg/nonsdk_extinit.h include/xorg/opaque.h include/xorg/optionstr.h include/xorg/os.h @@ -106,14 +109,11 @@ include/xorg/shadow.h include/xorg/shadowfb.h include/xorg/shmint.h include/xorg/site.h -include/xorg/swaprep.h -include/xorg/swapreq.h include/xorg/syncsdk.h include/xorg/validate.h include/xorg/vbe.h include/xorg/vbeModes.h include/xorg/vgaHW.h -include/xorg/vidmodeproc.h include/xorg/wfbrename.h include/xorg/window.h include/xorg/windowstr.h @@ -151,7 +151,6 @@ include/xorg/xf86str.h include/xorg/xf86xv.h include/xorg/xf86xvmc.h include/xorg/xf86xvpriv.h -include/xorg/xfixes.h include/xorg/xisb.h include/xorg/xkbfile.h include/xorg/xkbrules.h |