From 00eb5347dfd90665688ce0d6592e027156bc3706 Mon Sep 17 00:00:00 2001 From: zeising Date: Wed, 14 Aug 2013 10:50:44 +0000 Subject: Update to 2.21.14 git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@1055 058c260c-8361-11dd-a0ac-aa2bafec7d09 --- x11-drivers/xf86-video-intel/Makefile | 9 +- x11-drivers/xf86-video-intel/distinfo | 4 +- x11-drivers/xf86-video-intel/files/extra-clang | 60 +++++++----- .../files/extra-src_sna_compiler.h | 17 +++- .../xf86-video-intel/files/extra-src_sna_kgem.c | 108 ++++----------------- 5 files changed, 73 insertions(+), 125 deletions(-) diff --git a/x11-drivers/xf86-video-intel/Makefile b/x11-drivers/xf86-video-intel/Makefile index 1f6b793..cc74768 100644 --- a/x11-drivers/xf86-video-intel/Makefile +++ b/x11-drivers/xf86-video-intel/Makefile @@ -28,15 +28,16 @@ MAN4= intel.4x .include .if defined(WITH_NEW_XORG) -INTEL_VERSION= 2.21.12 +INTEL_VERSION= 2.21.14 INTEL_REVISION= 0 +CONFIGURE_ENV+= xorg_cv_cc_flag__Wno_maybe_uninitialized=no CONFIGURE_ARGS+= --enable-sna MAKE_JOBS_UNSAFE=yes PLIST_SUB+= OLD="@comment " -EXTRA_PATCHES+= ${PATCHDIR}/extra-clang \ - ${PATCHDIR}/extra-src_sna_compiler.h \ - ${PATCHDIR}/extra-src_sna_kgem.c \ +EXTRA_PATCHES+= ${PATCHDIR}/extra-src_sna_compiler.h \ ${PATCHDIR}/extra-src__sna__sna_threads.c \ + ${PATCHDIR}/extra-src_sna_kgem.c \ + ${PATCHDIR}/extra-clang \ ${PATCHDIR}/extra-i915kms LIB_DEPENDS+= xcb-util:${PORTSDIR}/x11/xcb-util .else diff --git a/x11-drivers/xf86-video-intel/distinfo b/x11-drivers/xf86-video-intel/distinfo index 22d6fd9..93ac183 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.21.12.tar.bz2) = 02120a1e9297ff094e0b0ae3b2d032304da2fde2630660829bd8b333611a970b -SIZE (xorg/driver/xf86-video-intel-2.21.12.tar.bz2) = 1923576 +SHA256 (xorg/driver/xf86-video-intel-2.21.14.tar.bz2) = cc74d482dfd1f6b87773233a6d5c36118039b42fe7f8d99ee28bda7b78aa3b49 +SIZE (xorg/driver/xf86-video-intel-2.21.14.tar.bz2) = 1974275 diff --git a/x11-drivers/xf86-video-intel/files/extra-clang b/x11-drivers/xf86-video-intel/files/extra-clang index bb49945..924f27d 100644 --- a/x11-drivers/xf86-video-intel/files/extra-clang +++ b/x11-drivers/xf86-video-intel/files/extra-clang @@ -1,27 +1,15 @@ ---- 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) +--- 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 @@ { -- struct intel_output *iterator; -+ struct intel_output *iterator = NULL; - int id = mode->mode_res->encoders[num]; + 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; - 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 +--- 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; @@ -31,7 +19,7 @@ assert(damage->mode != DAMAGE_ALL); assert(damage->dirty); -@@ -1671,7 +1671,7 @@ +@@ -1709,7 +1709,7 @@ { int n, nboxes; BoxPtr boxes; @@ -40,8 +28,30 @@ 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 +--- 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) { 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 index 4713174..269b30f 100644 --- a/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h +++ b/x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h @@ -1,18 +1,27 @@ ---- 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 +--- src/sna/compiler.h.orig 2013-08-01 21:00:51.000000000 +0200 ++++ src/sna/compiler.h 2013-08-14 11:19:53.441221636 +0200 @@ -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)) + #define page_aligned __attribute__((aligned(4096))) #else - #define likely(expr) (expr) -@@ -48,7 +47,6 @@ +@@ -49,7 +48,6 @@ #define must_check #define constant #define pure -#define __packed__ #define flatten + #define page_aligned #endif +@@ -67,6 +65,8 @@ + #if HAS_GCC(4, 6) && defined(__OPTIMIZE__) + #define fast __attribute__((optimize("Ofast"))) ++#else ++#define fast + #endif + + #if HAS_GCC(4, 6) && defined(__OPTIMIZE__) 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 index 4cc70fb..39f3729 100644 --- a/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c +++ b/x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c @@ -1,78 +1,14 @@ ---- src/sna/kgem.c.orig 2013-07-14 10:05:25.000000000 +0200 -+++ src/sna/kgem.c 2013-07-17 15:53:23.800554823 +0200 -@@ -38,7 +38,9 @@ - #include - #include - #include -+#ifdef __linux__ - #include -+#endif - - #include - -@@ -697,8 +699,9 @@ - return 0; - } - -+#ifdef __linux__ - static unsigned --cpu_cache_size(void) -+cpu_cache_size__cpuid4(void) - { - /* Deterministic Cache Parmaeters (Function 04h)": - * When EAX is initialized to a value of 4, the CPUID instruction -@@ -739,6 +742,42 @@ - - return llc_size; - } -+#endif /* __linux__ */ -+ -+static unsigned -+cpu_cache_size(void) -+{ -+ unsigned size; -+#ifdef __linux__ -+ FILE *file; -+ -+ size = cpu_cache_size__cpuid4(); -+ if (size) -+ return size; -+ -+ file = fopen("/proc/cpuinfo", "r"); -+ if (file) { -+ size_t len = 0; -+ char *line = NULL; -+ while (getline(&line, &len, file) != -1) { -+ int kb; -+ if (sscanf(line, "cache size : %d KB", &kb) == 1) { -+ /* Paranoid check against gargantuan caches */ -+ if (kb <= 1<<20) -+ size = kb * 1024; -+ break; -+ } -+ } -+ free(line); -+ fclose(file); -+ } -+ -+ if (size == 0) -+#endif /* __linux__ */ -+ size = 64 * 1024; -+ -+ return size; -+} - - static int gem_param(struct kgem *kgem, int name) - { -@@ -1242,6 +1281,7 @@ - kgem->buffer_size = kgem->half_cpu_cache_pages << 12; - DBG(("%s: buffer size=%d [%d KiB]\n", __FUNCTION__, - kgem->buffer_size, kgem->buffer_size / 1024)); -+ assert(kgem->buffer_size); - - kgem->max_object_size = 3 * (kgem->aperture_high >> 12) << 10; - kgem->max_gpu_size = kgem->max_object_size; -@@ -1831,7 +1871,8 @@ +--- src/sna/kgem.c.orig 2013-08-04 11:10:59.000000000 +0200 ++++ src/sna/kgem.c 2013-08-14 11:59:14.787060294 +0200 +@@ -25,6 +25,7 @@ + * + */ + ++#define _WITH_GETLINE + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -1890,7 +1891,8 @@ static struct kgem_bo * search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags) { @@ -82,7 +18,7 @@ DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags)); -@@ -2044,7 +2085,8 @@ +@@ -2104,7 +2106,8 @@ static bool kgem_retire__flushing(struct kgem *kgem) { @@ -92,7 +28,7 @@ bool retired = false; list_for_each_entry_safe(bo, next, &kgem->flushing, request) { -@@ -2249,7 +2291,8 @@ +@@ -2309,7 +2312,8 @@ static void kgem_commit(struct kgem *kgem) { struct kgem_request *rq = kgem->next_request; @@ -102,7 +38,7 @@ list_for_each_entry_safe(bo, next, &rq->buffers, request) { assert(next->request.prev == &bo->request); -@@ -2330,7 +2373,8 @@ +@@ -2390,7 +2394,8 @@ static void kgem_finish_buffers(struct kgem *kgem) { @@ -112,7 +48,7 @@ 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", -@@ -3191,7 +3235,8 @@ +@@ -3252,7 +3257,8 @@ static struct kgem_bo * search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags) { @@ -122,7 +58,7 @@ bool use_active = (flags & CREATE_INACTIVE) == 0; struct list *cache; -@@ -3795,7 +3840,7 @@ +@@ -3855,7 +3861,7 @@ uint32_t flags) { struct list *cache; @@ -131,7 +67,7 @@ uint32_t pitch, tiled_height, size; uint32_t handle; int i, bucket, retry; -@@ -5243,7 +5288,7 @@ +@@ -5302,7 +5308,7 @@ void kgem_clear_dirty(struct kgem *kgem) { struct list * const buffers = &kgem->next_request->buffers; @@ -140,7 +76,7 @@ list_for_each_entry(bo, buffers, request) { if (!bo->gpu_dirty) -@@ -5519,7 +5564,7 @@ +@@ -5578,7 +5584,7 @@ uint32_t size, uint32_t flags, void **ret) { @@ -149,11 +85,3 @@ unsigned offset, alloc; struct kgem_bo *old; -@@ -5612,6 +5657,7 @@ - alloc = ALIGN(size, kgem->buffer_size); - if (alloc > MAX_CACHE_SIZE) - alloc = PAGE_ALIGN(size); -+ assert(alloc); - - if (alloc > kgem->aperture_mappable / 4) - flags &= ~KGEM_BUFFER_INPLACE; -- cgit v1.2.3