aboutsummaryrefslogtreecommitdiffstats
path: root/x11-drivers/xf86-video-intel
diff options
context:
space:
mode:
authorzeising <zeising@FreeBSD.org>2013-05-25 22:37:02 +0800
committerzeising <zeising@FreeBSD.org>2013-05-25 22:37:02 +0800
commit715298b528f23a6a763e28623a4c98f1365c81ce (patch)
treecf13f962932aab3646f0af684b2923c4e0f0825b /x11-drivers/xf86-video-intel
parent0f8e632e50d273ba38d9d13f7e446a4a10d95cd4 (diff)
downloadfreebsd-ports-gnome-715298b528f23a6a763e28623a4c98f1365c81ce.tar.gz
freebsd-ports-gnome-715298b528f23a6a763e28623a4c98f1365c81ce.tar.zst
freebsd-ports-gnome-715298b528f23a6a763e28623a4c98f1365c81ce.zip
The FreeBSD x11 team proudly presents
an zeising, kwm, miwi, bapt, eadler production: Xorg 7.7 Starring: xserver 1.12.4 (new xorg only) Mesa 8.0.4, including libGL, libGLU and dri (new xorg only) libX11 1.5.0 libxcb 1.9 libdrm 2.4.42 (new xorg only) freeglut 2.8.1 Also starring: Updates to drivers and other libraries and utilities Additional notes: Change pkgconf to be a build dependency. Add a new USE_XORG, xcb, to depend on libxcb and update all ports to use this. Trim makefile headers. Take maintanership of x11/xcb-proto, ok'd by ashish. If you are running WITH_NEW_XORG=, you need to rebuild all installed drivers, see UPDATING for more information. Various fixes to make ports compile. PR: ports/177942 Exp-run by: miwi Approved by: portmgr (miwi) Thanks to all who helped testing!
Diffstat (limited to 'x11-drivers/xf86-video-intel')
-rw-r--r--x11-drivers/xf86-video-intel/Makefile28
-rw-r--r--x11-drivers/xf86-video-intel/distinfo4
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-clang53
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-i915kms20
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-src__sna__sna_threads.c14
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h18
-rw-r--r--x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c91
7 files changed, 208 insertions, 20 deletions
diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile
index 5d6d0a628a18..e256158c7a7e 100644
--- a/x11-drivers/xf86-video-intel/Makefile
+++ b/x11-drivers/xf86-video-intel/Makefile
@@ -1,9 +1,5 @@
-# New ports collection makefile for: xf86-video-intel
-# Date Created: 28 May 2007
-# Whom: lesi@FreeBSD.org
-#
+# Created by: lesi@FreeBSD.org
# $FreeBSD$
-#
PORTNAME= xf86-video-intel
PORTVERSION= ${INTEL_VERSION}
@@ -18,15 +14,29 @@ USE_GL= gl
USE_LDCONFIG= yes
XORG_CAT= driver
-USE_XORG= xvmc xineramaproto xextproto x11 xf86driproto glproto
+USE_XORG= glproto \
+ pixman \
+ x11 \
+ xext \
+ xf86driproto \
+ xineramaproto \
+ xrender \
+ xvmc
+
MAN4= intel.4x
.if defined(WITH_NEW_XORG)
-INTEL_VERSION= 2.17.0
-INTEL_REVISION= 1
+INTEL_VERSION= 2.21.6
+INTEL_REVISION= 0
+CONFIGURE_ARGS+= --enable-sna
MAKE_JOBS_UNSAFE=yes
PLIST_SUB+= OLD="@comment "
-EXTRA_PATCHES+= ${PATCHDIR}/extra-i915kms
+EXTRA_PATCHES+= ${PATCHDIR}/extra-clang \
+ ${PATCHDIR}/extra-src_sna_compiler.h \
+ ${PATCHDIR}/extra-src_sna_kgem.c \
+ ${PATCHDIR}/extra-src__sna__sna_threads.c \
+ ${PATCHDIR}/extra-i915kms
+LIB_DEPENDS+= xcb-util:${PORTSDIR}/x11/xcb-util
.else
INTEL_VERSION= 2.7.1
INTEL_REVISION= 4
diff --git a/x11-drivers/xf86-video-intel/distinfo b/x11-drivers/xf86-video-intel/distinfo
index fa854ebe1516..9044ccc9121a 100644
--- a/x11-drivers/xf86-video-intel/distinfo
+++ b/x11-drivers/xf86-video-intel/distinfo
@@ -1,4 +1,4 @@
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.17.0.tar.bz2) = 8b8450f2a2cc52ef31a83414e2f290e748a956690e11b41759d5650aaedc4387
-SIZE (xorg/driver/xf86-video-intel-2.17.0.tar.bz2) = 1339717
+SHA256 (xorg/driver/xf86-video-intel-2.21.6.tar.bz2) = c3ef371e72544350c878d5373b2e7f49b8a0e253f9b63cb1ce2881180b45f8d9
+SIZE (xorg/driver/xf86-video-intel-2.21.6.tar.bz2) = 1721176
diff --git a/x11-drivers/xf86-video-intel/files/extra-clang b/x11-drivers/xf86-video-intel/files/extra-clang
new file mode 100644
index 000000000000..bb499458d41e
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/extra-clang
@@ -0,0 +1,53 @@
+--- src/intel_display.c.orig 2012-12-11 20:33:06.000000000 +0100
++++ src/intel_display.c 2012-12-11 20:33:45.000000000 +0100
+@@ -1691,7 +1691,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/intel_batchbuffer.c.orig 2012-12-11 20:34:55.000000000 +0100
++++ src/intel_batchbuffer.c 2012-12-11 20:35:19.000000000 +0100
+@@ -119,7 +119,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/sna/sna_damage.c.orig 2012-12-11 20:41:38.000000000 +0100
++++ src/sna/sna_damage.c 2012-12-11 20:42:23.000000000 +0100
+@@ -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);
+@@ -1671,7 +1671,7 @@
+ {
+ int n, nboxes;
+ BoxPtr boxes;
+- struct sna_damage_box *iter;
++ struct sna_damage_box *iter = NULL;
+
+ RegionCopy(r, &damage->region);
+ if (!damage->dirty)
+--- uxa/uxa-accel.c.orig 2012-12-11 20:50:56.000000000 +0100
++++ uxa/uxa-accel.c 2012-12-11 20:51:14.000000000 +0100
+@@ -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/extra-i915kms b/x11-drivers/xf86-video-intel/files/extra-i915kms
index ed5018116f64..c900909f7747 100644
--- a/x11-drivers/xf86-video-intel/files/extra-i915kms
+++ b/x11-drivers/xf86-video-intel/files/extra-i915kms
@@ -1,11 +1,13 @@
---- src/intel_driver.c.orig 2012-05-17 16:13:46.000000000 +0200
-+++ src/intel_driver.c 2012-05-17 16:14:46.000000000 +0200
-@@ -334,7 +334,7 @@
- snprintf(busid, sizeof(busid), "pci:%04x:%02x:%02x.%d",
+--- src/intel_module.c.orig 2012-09-27 23:31:20.000000000 +0300
++++ src/intel_module.c 2012-11-02 17:32:00.819723398 +0200
+@@ -393,8 +393,8 @@
dev->domain, dev->bus, dev->dev, dev->func);
-- intel->drmSubFD = drmOpen("i915", busid);
-+ intel->drmSubFD = drmOpen("i915kms", busid);
- if (intel->drmSubFD == -1) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "[drm] Failed to open DRM device for %s: %s\n",
+ ret = drmCheckModesettingSupported(id);
+- if (ret) {
+- if (xf86LoadKernelModule("i915"))
++ if (ret || 1) {
++ if (xf86LoadKernelModule("i915kms"))
+ ret = drmCheckModesettingSupported(id);
+ if (ret)
+ return FALSE;
diff --git a/x11-drivers/xf86-video-intel/files/extra-src__sna__sna_threads.c b/x11-drivers/xf86-video-intel/files/extra-src__sna__sna_threads.c
new file mode 100644
index 000000000000..57361b9413e5
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/extra-src__sna__sna_threads.c
@@ -0,0 +1,14 @@
+--- src/sna/sna_threads.c.orig 2013-02-02 00:03:44.000000000 +0000
++++ src/sna/sna_threads.c 2013-02-02 00:04:39.000000000 +0000
+@@ -94,7 +94,11 @@
+ size_t len = 0;
+ char *line = NULL;
+ uint32_t processors = 0, cores = 0;
++#ifdef __GLIBC__
+ while (getline(&line, &len, file) != -1) {
++#else
++ while ((line = fgetln(file, &len)) != (char *) NULL) {
++#endif
+ int id;
+ if (sscanf(line, "physical id : %d", &id) == 1) {
+ if (id >= 32)
diff --git a/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h b/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h
new file mode 100644
index 000000000000..47131740bc6c
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h
@@ -0,0 +1,18 @@
+--- src/sna/compiler.h.orig 2013-03-12 12:48:29.745101779 +0100
++++ src/sna/compiler.h 2013-03-12 12:48:52.857102997 +0100
+@@ -37,7 +37,6 @@
+ #define must_check __attribute__((warn_unused_result))
+ #define constant __attribute__((const))
+ #define pure __attribute__((pure))
+-#define __packed__ __attribute__((__packed__))
+ #define flatten __attribute__((flatten))
+ #else
+ #define likely(expr) (expr)
+@@ -48,7 +47,6 @@
+ #define must_check
+ #define constant
+ #define pure
+-#define __packed__
+ #define flatten
+ #endif
+
diff --git a/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c b/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c
new file mode 100644
index 000000000000..9771d08562b3
--- /dev/null
+++ b/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c
@@ -0,0 +1,91 @@
+--- src/sna/kgem.c.orig 2013-03-11 11:19:02.000000000 +0100
++++ src/sna/kgem.c 2013-03-12 12:56:49.452065668 +0100
+@@ -658,7 +658,11 @@
+ if (file) {
+ size_t len = 0;
+ char *line = NULL;
++#ifdef __GLIBC__
+ while (getline(&line, &len, file) != -1) {
++#else
++ while ((line = fgetln(file, &len)) != (char *) NULL) {
++#endif
+ int mb;
+ if (sscanf(line, "cache size : %d KB", &mb) == 1) {
+ /* Paranoid check against gargantuan caches */
+@@ -1666,7 +1670,8 @@
+ 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));
+
+@@ -1868,7 +1873,8 @@
+
+ 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) {
+@@ -2073,7 +2079,8 @@
+ 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);
+@@ -2154,7 +2161,8 @@
+
+ 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=%d\n",
+@@ -2963,7 +2971,8 @@
+ 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;
+
+@@ -3521,7 +3530,7 @@
+ 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;
+@@ -4834,7 +4843,7 @@
+ 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->dirty)
+@@ -5072,7 +5081,7 @@
+ uint32_t size, uint32_t flags,
+ void **ret)
+ {
+- struct kgem_buffer *bo;
++ struct kgem_buffer *bo = NULL;
+ unsigned offset, alloc;
+ struct kgem_bo *old;
+