[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-intel: Changes to 'ubuntu'



 Makefile.am                                                         |    2 
 NEWS                                                                |   14 
 benchmarks/.gitignore                                               |    2 
 benchmarks/Makefile.am                                              |   14 
 benchmarks/dri2-swap.c                                              |  588 ++
 benchmarks/dri3-swap.c                                              |  595 ++
 configure.ac                                                        |  110 
 debian/README.source                                                |    6 
 debian/changelog                                                    |   81 
 debian/control                                                      |    8 
 debian/patches/fix-sna-external-slave-rotation.patch                |   70 
 debian/patches/fix-sna-fstat-include.patch                          |   55 
 debian/patches/fix-uxa-fstat-include.patch                          |   25 
 debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch            |   52 
 debian/patches/series                                               |    6 
 debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff |   62 
 debian/source/format                                                |    1 
 libobj/alloca.c                                                     |    4 
 man/intel.man                                                       |   14 
 src/backlight.c                                                     |   70 
 src/backlight.h                                                     |    2 
 src/compat-api.h                                                    |   27 
 src/i915_pciids.h                                                   |   81 
 src/intel_device.c                                                  |   53 
 src/intel_driver.h                                                  |    1 
 src/intel_list.h                                                    |   31 
 src/intel_module.c                                                  |   73 
 src/intel_options.c                                                 |   88 
 src/intel_options.h                                                 |    4 
 src/legacy/i810/i810_common.h                                       |    4 
 src/legacy/i810/i810_hwmc.c                                         |    2 
 src/legacy/i810/i810_memory.c                                       |    6 
 src/legacy/i810/i810_reg.h                                          |    2 
 src/legacy/i810/xvmc/I810XvMC.c                                     |    6 
 src/render_program/exa_wm.g4i                                       |    2 
 src/render_program/exa_wm_yuv_rgb.g8a                               |    4 
 src/render_program/exa_wm_yuv_rgb.g8b                               |    2 
 src/sna/blt.c                                                       |  840 ++--
 src/sna/brw/brw_eu_emit.c                                           |    2 
 src/sna/compiler.h                                                  |   16 
 src/sna/fb/fb.h                                                     |    4 
 src/sna/fb/fbpict.h                                                 |    4 
 src/sna/gen2_render.c                                               |    6 
 src/sna/gen3_render.c                                               |   85 
 src/sna/gen4_render.c                                               |   27 
 src/sna/gen5_render.c                                               |   20 
 src/sna/gen6_common.h                                               |  127 
 src/sna/gen6_render.c                                               |   95 
 src/sna/gen7_render.c                                               |  111 
 src/sna/gen8_render.c                                               |  144 
 src/sna/kgem.c                                                      | 1268 ++++--
 src/sna/kgem.h                                                      |   60 
 src/sna/kgem_debug_gen4.c                                           |    2 
 src/sna/kgem_debug_gen5.c                                           |    2 
 src/sna/kgem_debug_gen6.c                                           |    2 
 src/sna/sna.h                                                       |  126 
 src/sna/sna_accel.c                                                 |  697 ++-
 src/sna/sna_blt.c                                                   |  206 -
 src/sna/sna_composite.c                                             |  104 
 src/sna/sna_display.c                                               | 2022 +++++++---
 src/sna/sna_display_fake.c                                          |    3 
 src/sna/sna_dri2.c                                                  | 1459 ++++---
 src/sna/sna_dri3.c                                                  |   13 
 src/sna/sna_driver.c                                                |  318 -
 src/sna/sna_glyphs.c                                                |   94 
 src/sna/sna_io.c                                                    |   31 
 src/sna/sna_present.c                                               |  510 ++
 src/sna/sna_render.c                                                |   20 
 src/sna/sna_render.h                                                |    9 
 src/sna/sna_render_inline.h                                         |    6 
 src/sna/sna_tiling.c                                                |    4 
 src/sna/sna_trapezoids_boxes.c                                      |    4 
 src/sna/sna_trapezoids_imprecise.c                                  |  344 -
 src/sna/sna_trapezoids_mono.c                                       |  125 
 src/sna/sna_trapezoids_precise.c                                    |  344 -
 src/sna/sna_video.c                                                 |   66 
 src/sna/sna_video.h                                                 |    3 
 src/sna/sna_video_overlay.c                                         |   12 
 src/sna/sna_video_sprite.c                                          |   27 
 src/sna/sna_video_textured.c                                        |    5 
 src/sna/xassert.h                                                   |   17 
 src/uxa/i965_video.c                                                |    1 
 src/uxa/intel.h                                                     |   16 
 src/uxa/intel_display.c                                             |  174 
 src/uxa/intel_dri.c                                                 |  484 +-
 src/uxa/intel_driver.c                                              |   36 
 src/uxa/intel_memory.c                                              |    2 
 src/uxa/intel_present.c                                             |   24 
 test/.gitignore                                                     |    5 
 test/Makefile.am                                                    |    5 
 test/basic-copyplane.c                                              |   99 
 test/dri2-race.c                                                    |  274 +
 test/dri2-speed.c                                                   |  342 +
 test/dri2-test.c                                                    |   78 
 test/dri3-test.c                                                    |   62 
 test/dri3.c                                                         |   34 
 test/present-speed.c                                                |  615 +++
 test/present-test.c                                                 | 1432 ++++++-
 test/render-glyphs.c                                                |  441 ++
 test/render-trapezoid.c                                             |  125 
 test/render-triangle.c                                              |  180 
 test/test.h                                                         |    9 
 test/test_image.c                                                   |   36 
 tools/.gitignore                                                    |    4 
 tools/Makefile.am                                                   |   21 
 tools/backlight_helper.c                                            |    6 
 tools/cursor.c                                                      |  111 
 tools/dri3info.c                                                    |  329 +
 tools/virtual.c                                                     |  261 -
 109 files changed, 12527 insertions(+), 4230 deletions(-)

New commits:
commit 5254fdd5cfe1b8cf673eda161f8fcc597e240e3c
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Wed Aug 19 00:47:38 2015 -0400

    Drop upstream patches

diff --git a/debian/changelog b/debian/changelog
index e139932..0e7222c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu1) UNRELEASED; urgency=medium
+
+  * Merge from debian-experimental
+    - debian/patches/fix-sna-external-slave-rotation.patch
+      debian/patches/fix-sna-fstat-include.patch
+      debian/patches/fix-uxa-fstat-include.patch
+      debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch
+      debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff
+      Drop all upstream patches.
+
+ -- Robert Hooker <sarvatt@ubuntu.com>  Wed, 19 Aug 2015 00:42:34 -0400
+
 xserver-xorg-video-intel (2:2.99.917+git20150808-1~exp1) UNRELEASED; urgency=medium
 
   * New upstream snapshot.
diff --git a/debian/patches/fix-sna-external-slave-rotation.patch b/debian/patches/fix-sna-external-slave-rotation.patch
deleted file mode 100644
index 5251194..0000000
--- a/debian/patches/fix-sna-external-slave-rotation.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-commit 1cffbd9a8e96642bdbabf4e40829a5f1473b5bf9
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date:   Tue Jan 13 10:50:36 2015 +0000
-Bug-Ubuntu: https://launchpad.net/bugs/1410238
-
-    sna: Combine slave CRTC offsets with rotation
-    
-    When applying both a slave offset and an output rotation, order is
-    important. To get the order right, we need to combine the two into a
-    single transformation.
-    
-    Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
-    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-Index: xserver-xorg-video-intel-2.99.917/src/sna/sna_display.c
-===================================================================
---- xserver-xorg-video-intel-2.99.917.orig/src/sna/sna_display.c
-+++ xserver-xorg-video-intel-2.99.917/src/sna/sna_display.c
-@@ -6644,6 +6644,7 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr
- 	ScreenPtr screen = sna->scrn->pScreen;
- 	DrawablePtr draw = crtc_source(crtc, &sx, &sy);
- 	PictFormatPtr format;
-+	PictTransform T;
- 	PicturePtr src, dst;
- 	PixmapPtr pixmap;
- 	int depth, error;
-@@ -6683,9 +6684,14 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr
- 	if (!src)
- 		goto free_pixmap;
- 
--	error = SetPictureTransform(src, &crtc->crtc_to_framebuffer);
--	if (error)
--		goto free_src;
-+	pixman_transform_init_translate(&T, sx << 16, sy << 16);
-+	pixman_transform_multiply(&T, &T, &crtc->crtc_to_framebuffer);
-+	if (!sna_transform_is_integer_translation(&T, &sx, &sy)) {
-+		error = SetPictureTransform(src, &T);
-+		if (error)
-+			goto free_src;
-+		sx = sy = 0;
-+	}
- 
- 	if (crtc->filter && crtc->transform_in_use)
- 		SetPicturePictFilter(src, crtc->filter,
-@@ -6737,6 +6743,7 @@ sna_crtc_redisplay__composite(xf86CrtcPt
- 	DrawablePtr draw = crtc_source(crtc, &sx, &sy);
- 	struct sna_composite_op tmp;
- 	PictFormatPtr format;
-+	PictTransform T;
- 	PicturePtr src, dst;
- 	PixmapPtr pixmap;
- 	const BoxRec *b;
-@@ -6777,9 +6784,14 @@ sna_crtc_redisplay__composite(xf86CrtcPt
- 	if (!src)
- 		goto free_pixmap;
- 
--	error = SetPictureTransform(src, &crtc->crtc_to_framebuffer);
--	if (error)
--		goto free_src;
-+	pixman_transform_init_translate(&T, sx << 16, sy << 16);
-+	pixman_transform_multiply(&T, &T, &crtc->crtc_to_framebuffer);
-+	if (!sna_transform_is_integer_translation(&T, &sx, &sy)) {
-+		error = SetPictureTransform(src, &T);
-+		if (error)
-+			goto free_src;
-+		sx = sy = 0;
-+	}
- 
- 	if (crtc->filter && crtc->transform_in_use)
- 		SetPicturePictFilter(src, crtc->filter,
diff --git a/debian/patches/fix-sna-fstat-include.patch b/debian/patches/fix-sna-fstat-include.patch
deleted file mode 100644
index ba2248a..0000000
--- a/debian/patches/fix-sna-fstat-include.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-commit 12af8a575d1518d40416f83195049157c3a062a5
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date:   Tue Feb 24 15:25:40 2015 +0000
-
-    sna: udev integration depends on fstat and sys/stat.h
-    
-    src/sna/sna_driver.c: In function 'sna_handle_uevents':
-    src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
-    
-    Also take the opportunity to include udev support in the configure
-    summary.
-    
-    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-<<<<<<< HEAD
-Index: xserver-xorg-video-intel-2.99.917/configure.ac
-===================================================================
---- xserver-xorg-video-intel-2.99.917.orig/configure.ac
-+++ xserver-xorg-video-intel-2.99.917/configure.ac
-=======
-diff --git a/configure.ac b/configure.ac
-index 7476e2b..de3a4b3 100644
---- a/configure.ac
-+++ b/configure.ac
->>>>>>> debian-experimental
-@@ -197,11 +197,15 @@ AC_ARG_ENABLE(udev,
- 
- if test "x$UDEV" != "xno"; then
- 	PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"])
-+	AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"])
- 	if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then
- 		AC_MSG_ERROR([udev support requested but not found (libudev)])
- 	fi
- 	if test "x$udev" = "xyes"; then
- 		AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
-+		udev_msg=" yes"
-+	else
-+		udev_msg=" no"
- 	fi
- fi
- 
-<<<<<<< HEAD
-@@ -902,6 +906,7 @@ echo "  Support for Kernel Mode Setting?
-=======
-@@ -911,6 +915,7 @@ echo "  Support for Kernel Mode Setting? $KMS"
->>>>>>> debian-experimental
- echo "  Support for legacy User Mode Setting (for i810)? $UMS"
- echo "  Support for Direct Rendering Infrastructure:$dri_msg"
- echo "  Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg"
-+echo "  Support for display hotplug notifications (udev):$udev_msg"
- echo "  Build additional tools and utilities?$tools_msg"
- if test -n "$xp_msg"; then
- echo "  Experimental support:$xp_msg"
-<<<<<<< HEAD
-Index: xserver-xorg-video-intel-2.99.917/src/sna/sna_driver.c
-===================================================================
---- xserver-xorg-video-intel-2.99.917.orig/src/sna/sna_driver.c
-+++ xserver-xorg-video-intel-2.99.917/src/sna/sna_driver.c
-@@ -780,6 +780,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DE
-=======
-diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
-index 8c0d0b5..bc20ef0 100644
---- a/src/sna/sna_driver.c
-+++ b/src/sna/sna_driver.c
-@@ -740,6 +740,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL)
->>>>>>> debian-experimental
- }
- 
- #if HAVE_UDEV
-+#include <sys/stat.h>
-+
- static void
- sna_handle_uevents(int fd, void *closure)
- {
diff --git a/debian/patches/fix-uxa-fstat-include.patch b/debian/patches/fix-uxa-fstat-include.patch
deleted file mode 100644
index d7989d1..0000000
--- a/debian/patches/fix-uxa-fstat-include.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-commit 369ceec0e4910ba2c37736a59c55c0d6c26433bf
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date:   Tue Feb 24 15:25:40 2015 +0000
-
-    uxa: udev integration depends on fstat and sys/stat.h
-    
-    src/uxa/intel_driver.c: In function 'I830HandleUEvents':
-    src/uxa/intel_driver.c:738:14: error: storage size of 's' isn't known
-    src/uxa/intel_driver.c:746:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
-    
-    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-<<<<<<< HEAD
-Index: xserver-xorg-video-intel-2.99.917/src/uxa/intel_driver.c
-===================================================================
---- xserver-xorg-video-intel-2.99.917.orig/src/uxa/intel_driver.c
-+++ xserver-xorg-video-intel-2.99.917/src/uxa/intel_driver.c
-@@ -735,6 +735,8 @@ intel_flush_callback(CallbackListPtr *li
-=======
-diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
-index c554124..6e64b8c 100644
---- a/src/uxa/intel_driver.c
-+++ b/src/uxa/intel_driver.c
-@@ -728,6 +728,8 @@ intel_flush_callback(CallbackListPtr *list,
->>>>>>> debian-experimental
- }
- 
- #if HAVE_UDEV
-+#include <sys/stat.h>
-+
- static void
- I830HandleUEvents(int fd, void *closure)
- {
diff --git a/debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch b/debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch
deleted file mode 100644
index 6c1a7f1..0000000
--- a/debian/patches/fix-yuv-to-rgb-shared-on-intel-gen8.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b6029105e404c9a7f7cdd230012cd5063c824ed4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Mon, 30 Mar 2015 16:51:29 +0300
-Subject: [PATCH] gen8: Fix the YUV->RGB shader
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-<<<<<<< HEAD
-Bug-Ubuntu: https://launchpad.net/bugs/1449892
-=======
->>>>>>> debian-experimental
-
-Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
----
- src/render_program/exa_wm_yuv_rgb.g8a | 4 ++--
- src/render_program/exa_wm_yuv_rgb.g8b | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8a b/src/render_program/exa_wm_yuv_rgb.g8a
-index 7def093..34973ba 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8a
-+++ b/src/render_program/exa_wm_yuv_rgb.g8a
-@@ -76,7 +76,7 @@ add (16)    Cbn<1>F		Cb<8,8,1>F	-0.501961F  { compr align1 };
-     /* 
-      * R = Y + Cr * 1.596
-      */
--mov (8)    acc0<1>F		Yn<8,8,1>F		    { compr align1 };
-+mov (8)    acc0<1>F		Yn_01<8,8,1>F		    { compr align1 };
- mac.sat(8) src_sample_r_01<1>F	Crn_01<8,8,1>F	1.596F	    { compr align1 };
-      
- mov (8)    acc0<1>F		Yn_23<8,8,1>F		    { compr align1 };
-@@ -84,7 +84,7 @@ mac.sat(8) src_sample_r_23<1>F	Crn_23<8,8,1>F	1.596F	    { compr align1 };
-     /*
-      * G = Crn * -0.813 + Cbn * -0.392 + Y
-      */
--mov (8)    acc0<1>F		Yn_23<8,8,1>F		    { compr align1 };
-+mov (8)    acc0<1>F		Yn_01<8,8,1>F		    { compr align1 };
- mac (8)    acc0<1>F		Crn_01<8,8,1>F    	-0.813F	    { compr align1 };
- mac.sat(8) src_sample_g_01<1>F	Cbn_01<8,8,1>F    	-0.392F	    { compr align1 };
- 
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8b b/src/render_program/exa_wm_yuv_rgb.g8b
-index 4494953..2cd6fc4 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8b
-+++ b/src/render_program/exa_wm_yuv_rgb.g8b
-@@ -6,7 +6,7 @@
-    { 0x80600048, 0x21c03ae8, 0x3e8d02c0, 0x3fcc49ba },
-    { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
-    { 0x80600048, 0x21e03ae8, 0x3e8d02e0, 0x3fcc49ba },
--   { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
-+   { 0x00600001, 0x24003ae0, 0x008d0300, 0x00000000 },
-    { 0x00600048, 0x24003ae0, 0x3e8d02c0, 0xbf5020c5 },
-    { 0x80600048, 0x22003ae8, 0x3e8d0340, 0xbec8b439 },
-    { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
--- 
-2.0.5
diff --git a/debian/patches/series b/debian/patches/series
index 309cac2..792f381 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1 @@
-fix-sna-external-slave-rotation.patch
-sna-force-frontbuffer-to-cpu-for-randr-fallback.diff
-fix-yuv-to-rgb-shared-on-intel-gen8.patch
-fix-sna-fstat-include.patch
-fix-uxa-fstat-include.patch
+#no patches
diff --git a/debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff b/debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff
deleted file mode 100644
index 71f0084..0000000
--- a/debian/patches/sna-force-frontbuffer-to-cpu-for-randr-fallback.diff
+++ /dev/null
@@ -1,62 +0,0 @@
-commit 15c307d70e00bc035bb61be5d8b6f727925e3d34
-Author: Chris Wilson <chris@chris-wilson.co.uk>
-Date:   Tue Mar 10 08:48:48 2015 +0000
-Bug-Ubuntu: https://launchpad.net/bugs/1447143
-
-    sna: Force frontbuffer to CPU for randr fallback
-    
-    When we are using the fallback method, we need to make sure the source
-    is on the CPU.
-    
-    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89053
-    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-Index: xserver-xorg-video-intel-2.99.917/src/sna/sna_display.c
-===================================================================
---- xserver-xorg-video-intel-2.99.917.orig/src/sna/sna_display.c
-+++ xserver-xorg-video-intel-2.99.917/src/sna/sna_display.c
-@@ -6665,6 +6665,14 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr
- 	     __FUNCTION__, format->format, depth, draw->bitsPerPixel,
- 	     bo->pitch, crtc->mode.HDisplay, crtc->mode.VDisplay));
- 
-+	if (sx | sy)
-+		RegionTranslate(region, sx, sy);
-+	error = !sna_drawable_move_region_to_cpu(draw, region, MOVE_READ);
-+	if (sx | sy)
-+		RegionTranslate(region, -sx, -sy);
-+	if (error)
-+		return;
-+
- 	ptr = kgem_bo_map__gtt(&sna->kgem, bo);
- 	if (ptr == NULL)
- 		return;
-@@ -6687,6 +6695,29 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr
- 	pixman_transform_init_translate(&T, sx << 16, sy << 16);
- 	pixman_transform_multiply(&T, &T, &crtc->crtc_to_framebuffer);
- 	if (!sna_transform_is_integer_translation(&T, &sx, &sy)) {
-+#define f2d(x) (((double)(x))/65536.)
-+		DBG(("%s: transform=[[%f %f %f], [%f %f %f], [%f %f %f]] (raw [[%x %x %x], [%x %x %x], [%x %x %x]])\n",
-+		     __FUNCTION__,
-+		     f2d(T.matrix[0][0]),
-+		     f2d(T.matrix[0][1]),
-+		     f2d(T.matrix[0][2]),
-+		     f2d(T.matrix[1][0]),
-+		     f2d(T.matrix[1][1]),
-+		     f2d(T.matrix[1][2]),
-+		     f2d(T.matrix[2][0]),
-+		     f2d(T.matrix[2][1]),
-+		     f2d(T.matrix[2][2]),
-+		     T.matrix[0][0],
-+		     T.matrix[0][1],
-+		     T.matrix[0][2],
-+		     T.matrix[1][0],
-+		     T.matrix[1][1],
-+		     T.matrix[1][2],
-+		     T.matrix[2][0],
-+		     T.matrix[2][1],
-+		     T.matrix[2][2]));
-+#undef f2d
-+
- 		error = SetPictureTransform(src, &T);
- 		if (error)
- 			goto free_src;

commit 5b46aa159b7aab0943d2fe21e8420047a2341ad6
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Tue Aug 11 08:43:17 2015 +0300

    update the changelog

diff --git a/debian/changelog b/debian/changelog
index a930f6d..ab4bbab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-xserver-xorg-video-intel (2:2.99.917+git20150618-1~exp1) UNRELEASED; urgency=medium
+xserver-xorg-video-intel (2:2.99.917+git20150808-1~exp1) UNRELEASED; urgency=medium
 
-  * New snapshot.
+  * New upstream snapshot.
   * rules: Fix valgrind-enabling check.
   * README.source: Mention that dpkg-source complains about symlinks
     which are real files on the tarball, and add a command to clean

commit 4cea8037984c3d5e171be22710384f66660ca4c6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 8 22:10:20 2015 +0100

    sna/dri2: Restore caching of fullscreen triple buffers
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 7a2d9d0..bae9314 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -360,7 +360,7 @@ sna_dri2_get_back(struct sna *sna,
 	}
 	assert(bo->active_scanout == 0);
 
-	if (reuse && get_private(back)->bo->refcnt == 1) {
+	if (reuse && get_private(back)->bo->refcnt == 1 + get_private(back)->bo->active_scanout) {
 		if (&c->link == &priv->cache)
 			c = malloc(sizeof(*c));
 		if (c != NULL) {

commit fd5f44f4d27e7a28221ea9755664a6da6dd14cd8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 8 22:09:53 2015 +0100

    sna: A couple more asserts for valid flip data and handling
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 606c3bd..5b975c1 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6244,6 +6244,7 @@ error:
 
 		if (data) {
 			assert(crtc->flip_bo == NULL);
+			assert(handler);
 			crtc->flip_handler = handler;
 			crtc->flip_data = data;
 			crtc->flip_bo = kgem_bo_reference(bo);
@@ -8564,6 +8565,7 @@ again:
 					crtc->swap.tv_usec = vbl->tv_usec;
 					crtc->swap.msc = msc;
 				}
+				assert(crtc->flip_pending);
 				crtc->flip_pending = false;
 
 				assert(crtc->flip_bo);

commit cadea260de76a398f9141b18ae91d1646e9a305e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Aug 8 15:39:05 2015 +0100

    sna/dri2: Add the old buffer from a chain swap to the swap cache
    
    Rather than just discarding the old buffer, we want to add it to the swap
    cache and so hand it back to the client in the near future.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 1872d0c..7a2d9d0 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -214,6 +214,8 @@ sna_dri2_cache_bo(struct sna *sna,
 {
 	struct dri_bo *c;
 
+	DBG(("%s(handle=%d, name=%d)\n", __FUNCTION__, bo->handle, name));
+
 	if (draw == NULL) {
 		DBG(("%s: no draw, releasing handle=%d\n",
 		     __FUNCTION__, bo->handle));
@@ -2405,10 +2407,13 @@ static void chain_swap(struct sna_dri2_event *chain)
 				chain->back->flags = tmp.flags;
 				chain->back->pitch = tmp.bo->pitch;
 
-				tmp.bo = get_private(chain->back)->copy.bo;
-			}
-
-			kgem_bo_destroy(&chain->sna->kgem, tmp.bo);
+				sna_dri2_cache_bo(chain->sna, chain->draw,
+						  get_private(chain->back)->copy.bo,
+						  get_private(chain->back)->copy.name,
+						  get_private(chain->back)->copy.size,
+						  get_private(chain->back)->copy.flags);
+			} else
+				kgem_bo_destroy(&chain->sna->kgem, tmp.bo);
 
 			get_private(chain->back)->copy.bo = ref(get_private(chain->back)->bo);
 			get_private(chain->back)->copy.name = chain->back->name;
@@ -2668,6 +2673,8 @@ sna_dri2_immediate_blit(struct sna *sna,
 		assert(chain->bo == NULL);
 		assert(chain->queued);
 
+		DBG(("%s: stealing placeholder\n", __FUNCTION__));
+
 		_sna_dri2_destroy_buffer(chain->sna, chain->draw, chain->front);
 		_sna_dri2_destroy_buffer(chain->sna, chain->draw, chain->back);
 
@@ -2711,6 +2718,8 @@ sna_dri2_immediate_blit(struct sna *sna,
 	    chain->chain->type == SWAP_THROTTLE) {
 		struct sna_dri2_event *tmp = chain->chain;
 
+		DBG(("%s: replacing next swap\n", __FUNCTION__));
+
 		assert(!tmp->queued);
 
 		assert(info->chain == NULL);

commit 611ec7d7d476c47eefc35e2857bc6b87af819e43
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 17:19:25 2015 +0100

    sna: Remove incorrect assertion
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 34893d7..33c48fd 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3997,7 +3997,6 @@ void _kgem_submit(struct kgem *kgem)
 	assert(kgem->nreloc <= ARRAY_SIZE(kgem->reloc));
 	assert(kgem->nexec < ARRAY_SIZE(kgem->exec));
 	assert(kgem->nfence <= kgem->fence_max);
-	assert(kgem->ring < ARRAY_SIZE(kgem->requests));
 
 	kgem_finish_buffers(kgem);
 

commit f324506f7da369222b6c5dd65dfddaea65b7cb41
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 16:44:19 2015 +0100

    sna: Prefer direct writes if the target is LLC
    
    If we can use WB CPU writes into the target, prefer to do so.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index f6418cd..d32bd58 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -794,6 +794,9 @@ static bool __upload_inplace(struct kgem *kgem,
 	if (bo->flush)
 		return true;
 
+	if (kgem_bo_can_map__cpu(kgem, bo, true))
+		return true;
+
 	/* If we are writing through the GTT, check first if we might be
 	 * able to almagamate a series of small writes into a single
 	 * operation.

commit 095528e6c3ca6aba2b141f451d0e1f14f3e57a59
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 16:29:54 2015 +0100

    sna: Tweak the semantics for small uploads into Damage tracked pixmaps
    
    Based on further study of behaviour under a compositing manager, always
    prefer to upload directly into the flushed bo, with a couple of
    exceptions.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 6bf87ee..f6418cd 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -788,6 +788,12 @@ static bool __upload_inplace(struct kgem *kgem,
 	if (FORCE_INPLACE)
 		return FORCE_INPLACE > 0;
 
+	if (bo->exec)
+		return false;
+
+	if (bo->flush)
+		return true;
+
 	/* If we are writing through the GTT, check first if we might be
 	 * able to almagamate a series of small writes into a single
 	 * operation.
@@ -797,7 +803,7 @@ static bool __upload_inplace(struct kgem *kgem,
 		bytes += (box->x2 - box->x1) * (box->y2 - box->y1);
 		box++;
 	}
-	if (!bo->flush && __kgem_bo_is_busy(kgem, bo))
+	if (__kgem_bo_is_busy(kgem, bo))
 		return bytes * bpp >> 12 >= kgem->half_cpu_cache_pages;
 	else
 		return bytes * bpp >> 12;

commit 07bcd3f0c715a37ac24a630173e0e28056567421
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 15:26:30 2015 +0100

    sna: Use direct uploads into a Damage tracked for v.small operations
    
    If the batch is being frequently flushed due to Damage+Composite
    tracking, we cannot amalgamate the small copies into the destination and
    so end up sending thousands and thousands of tiny batches with tiny
    render copies hogging the GPU.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=91577
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index db317ee..6bf87ee 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -797,7 +797,7 @@ static bool __upload_inplace(struct kgem *kgem,
 		bytes += (box->x2 - box->x1) * (box->y2 - box->y1);
 		box++;
 	}
-	if (__kgem_bo_is_busy(kgem, bo))
+	if (!bo->flush && __kgem_bo_is_busy(kgem, bo))
 		return bytes * bpp >> 12 >= kgem->half_cpu_cache_pages;
 	else
 		return bytes * bpp >> 12;

commit 3f128867d957e30690218404337b00bb327e647b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 15:19:17 2015 +0100

    sna: Skip a no-op copy
    
    If the source has no contents, the destination is equally undefined.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index a816b77..c624d9e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6445,6 +6445,15 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 
 	assert(region_num_rects(region));
 
+	if (src_priv &&
+	    src_priv->gpu_damage == NULL &&
+	    src_priv->cpu_damage == NULL) {
+		/* Rare but still happens, nothing to copy */
+		DBG(("%s: src pixmap=%ld is empty\n",
+		     __FUNCTION__, src_pixmap->drawable.serialNumber));
+		return;
+	}
+
 	if (src_pixmap == dst_pixmap)
 		return sna_self_copy_boxes(src, dst, gc,
 					   region, dx, dy,

commit a3ac461a302498335fc7b03ec3a59e9a2fd61a75
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 15:18:49 2015 +0100

    sna: Add a handle=%d to a DBG for consistency
    
    Helps with grepping if the DBG are consistent.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 86356af..34893d7 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4339,7 +4339,7 @@ bool kgem_expire_cache(struct kgem *kgem)
 				count++;
 				size += bytes(bo);
 				kgem_bo_free(kgem, bo);
-				DBG(("%s: expiring %d\n",
+				DBG(("%s: expiring handle=%d\n",
 				     __FUNCTION__, bo->handle));
 			}
 		}

commit 5ef9d68043dac2628695b145846e724c2fa98abc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 14:04:31 2015 +0100

    sna: More simple DBG tracing around cleanup/retire handling
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 064853c..86356af 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -661,10 +661,11 @@ static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
 	struct local_i915_gem_mmap arg;
 	int err;
 
-retry:
 	VG_CLEAR(arg);
-	arg.handle = bo->handle;
 	arg.offset = 0;
+
+retry:
+	arg.handle = bo->handle;
 	arg.size = bytes(bo);
 	if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
 		DBG(("%s: failed %d, throttling/cleaning caches\n",
@@ -2518,6 +2519,8 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
 
 	if (bucket(bo) >= NUM_CACHE_BUCKETS) {
 		if (bo->map__gtt) {
+			DBG(("%s: relinquishing large GTT mapping for handle=%d\n",
+			     __FUNCTION__, bo->handle));
 			munmap(bo->map__gtt, bytes(bo));
 			bo->map__gtt = NULL;
 		}
@@ -3381,8 +3384,10 @@ static void kgem_close_inactive(struct kgem *kgem)
 {
 	unsigned int i;
 
-	for (i = 0; i < ARRAY_SIZE(kgem->inactive); i++)
+	for (i = 0; i < ARRAY_SIZE(kgem->inactive); i++) {
 		kgem_close_list(kgem, &kgem->inactive[i]);
+		assert(list_is_empty(&kgem->inactive[i]));
+	}
 }
 
 static void kgem_finish_buffers(struct kgem *kgem)

commit fd0236bb8e2e15665d72b8eb7f5ff15571a5c60b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 13:48:38 2015 +0100

    sna: Release the reference on the rq->bo during forced cleanup
    
    Since the switch to preallocating the batch buffer, the request owns its
    reference to the rq->bo. However, dropping that reference was missed
    during the cleanup.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 33f9f7e..064853c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3594,6 +3594,9 @@ static void kgem_cleanup(struct kgem *kgem)
 					kgem_bo_free(kgem, bo);
 			}
 
+			if (--rq->bo->refcnt == 0)
+				kgem_bo_free(kgem, rq->bo);
+
 			__kgem_request_free(rq);
 		}
 	}

commit 6bab82b91d64af2e31d9f5fe7705c68caf09004b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 13:25:14 2015 +0100

    sna: Always prefer a fresh allocation for the batch if !llc
    
    An unwanted subtle change in preference from
    
    commit 8c465d0fbf84b1d29c54d620f09063d2b7ccfeb8
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri Aug 7 10:15:42 2015 +0100
    
        sna: Fallback after a bo allocation failure for the batch
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 9925628..33f9f7e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3858,7 +3858,7 @@ out_16384:
 		size = kgem->nbatch * sizeof(uint32_t);
 #endif
 
-	if (!kgem->batch_bo) {
+	if (!kgem->batch_bo || !kgem->has_llc) {
 		bo = kgem_create_linear(kgem, size, CREATE_NO_THROTTLE);
 		if (bo) {
 write:

commit a00fdce1fdf21379887511e7d4247ca401dc3a77
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 13:24:13 2015 +0100

    sna: Add a little more DBG information to kgem_retire()
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 30058dc..9925628 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3012,7 +3012,7 @@ static bool kgem_retire__flushing(struct kgem *kgem)
 		int count = 0;
 		list_for_each_entry(bo, &kgem->flushing, request)
 			count++;
-		DBG(("%s: %d bo on flushing list\n", __FUNCTION__, count));
+		DBG(("%s: %d bo on flushing list, retired? %d\n", __FUNCTION__, count, retired));
 	}
 #endif
 
@@ -3111,6 +3111,8 @@ static bool kgem_retire__requests_ring(struct kgem *kgem, int ring)
 	while (!list_is_empty(&kgem->requests[ring])) {
 		struct kgem_request *rq;
 
+		DBG(("%s: retiring ring %d\n", __FUNCTION__, ring));
+
 		rq = list_first_entry(&kgem->requests[ring],
 				      struct kgem_request,
 				      list);
@@ -3135,8 +3137,8 @@ static bool kgem_retire__requests_ring(struct kgem *kgem, int ring)
 					      struct kgem_request,
 					      list)->bo;
 
-		DBG(("%s: ring=%d, %d outstanding requests, oldest=%d\n",
-		     __FUNCTION__, ring, count, bo ? bo->handle : 0));
+		DBG(("%s: ring=%d, %d outstanding requests, oldest=%d, retired? %d\n",
+		     __FUNCTION__, ring, count, bo ? bo->handle : 0, retired));
 	}
 #endif
 

commit d78685787a595ca68aec08074744fa23ed4f3d93
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 12:59:57 2015 +0100

    sna: Fix sync'ing to the most recent request on forced cache cleanup
    
    We picked the oldest, not most recent and so were not recovering as much
    memory as desired.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index be0480c..30058dc 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4369,13 +4369,14 @@ bool kgem_cleanup_cache(struct kgem *kgem)
 		if (!list_is_empty(&kgem->requests[n])) {
 			struct kgem_request *rq;
 
-			rq = list_first_entry(&kgem->requests[n],
-					      struct kgem_request,
-					      list);
+			rq = list_last_entry(&kgem->requests[n],
+					     struct kgem_request,
+					     list);
 
 			DBG(("%s: sync on cleanup\n", __FUNCTION__));
 			kgem_bo_wait(kgem, rq->bo);
 		}
+		assert(list_is_empty(&kgem->requests[n]));
 	}
 
 	kgem_retire(kgem);

commit 862c0d3cc9634923f4c6db987c658164e6de50da
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 12:57:31 2015 +0100

    sna/dri2: Make event chaining DBG clearer
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e64c8ac..1872d0c 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2325,6 +2325,9 @@ static void chain_swap(struct sna_dri2_event *chain)
 	union drm_wait_vblank vbl;
 	struct copy tmp;
 
+	DBG(("%s: draw=%ld, queued?=%d, type=%d\n",
+	     __FUNCTION__, (long)chain->draw->id, chain->queued, chain->type));
+
 	if (chain->draw == NULL) {
 		sna_dri2_event_free(chain);
 		return;
@@ -2333,8 +2336,6 @@ static void chain_swap(struct sna_dri2_event *chain)
 	if (chain->queued) /* too early! */
 		return;
 
-	DBG(("%s: chaining draw=%ld, type=%d\n",
-	     __FUNCTION__, (long)chain->draw->id, chain->type));
 	assert(chain == dri2_chain(chain->draw));
 	chain->queued = true;
 
@@ -2583,6 +2584,7 @@ void sna_dri2_vblank_handler(struct drm_event_vblank *event)
 	}
 
 	if (info->chain) {
+		DBG(("%s: continuing chain\n", __FUNCTION__));
 		assert(info->chain != info);
 		assert(info->draw == draw);
 		sna_dri2_remove_event((WindowPtr)draw, info);

commit f1b1baa7ffe55a78537160d8b679ce0225f06d63
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Aug 7 12:45:26 2015 +0100

    sna: Add a DBG for when we discard an invalid old mmapping


Reply to: