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

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



 ChangeLog                                                                   | 1450 ++++++++++
 NEWS                                                                        |   66 
 configure.ac                                                                |    2 
 debian/changelog                                                            |   19 
 debian/patches/0001-Fix-build-failure-when-passing-with-builderstring.patch |   33 
 debian/patches/series                                                       |    2 
 debian/patches/uxa-flush-batch-immediately.diff                             |   46 
 man/intel.man                                                               |  132 
 src/i915_render.c                                                           |    8 
 src/intel_display.c                                                         |   26 
 src/intel_driver.c                                                          |    2 
 src/intel_driver.h                                                          |   37 
 src/intel_memory.c                                                          |    6 
 src/intel_module.c                                                          |  111 
 src/intel_options.c                                                         |    1 
 src/intel_options.h                                                         |    1 
 src/intel_uxa.c                                                             |    3 
 src/intel_video.c                                                           |    2 
 src/legacy/i810/i810_video.c                                                |    4 
 src/sna/blt.c                                                               |    5 
 src/sna/brw/brw_disasm.c                                                    |   11 
 src/sna/fb/fbbitmap.c                                                       |   16 
 src/sna/gen2_render.c                                                       |   34 
 src/sna/gen3_render.c                                                       |  101 
 src/sna/gen4_render.c                                                       |   62 
 src/sna/gen5_render.c                                                       |  152 -
 src/sna/gen6_render.c                                                       |  277 +
 src/sna/gen7_render.c                                                       |  295 +-
 src/sna/kgem.c                                                              |  425 +-
 src/sna/kgem.h                                                              |   37 
 src/sna/sna.h                                                               |    9 
 src/sna/sna_accel.c                                                         |  635 ++--
 src/sna/sna_blt.c                                                           |  460 ++-
 src/sna/sna_composite.c                                                     |   23 
 src/sna/sna_damage.c                                                        |   46 
 src/sna/sna_display.c                                                       |  167 -
 src/sna/sna_dri.c                                                           |   55 
 src/sna/sna_driver.c                                                        |   10 
 src/sna/sna_glyphs.c                                                        |  527 +--
 src/sna/sna_gradient.c                                                      |    3 
 src/sna/sna_render.c                                                        |  152 -
 src/sna/sna_render.h                                                        |   14 
 src/sna/sna_render_inline.h                                                 |   26 
 src/sna/sna_trapezoids.c                                                    |  126 
 src/sna/sna_video_overlay.c                                                 |    2 
 test/dri2.c                                                                 |    4 
 uxa/uxa-accel.c                                                             |  163 -
 47 files changed, 4222 insertions(+), 1566 deletions(-)

New commits:
commit 1eebf2719197e3ac3630159dd78c2e3e1738c0f7
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Sep 5 17:28:00 2012 +0300

    update the changelog, release to quantal

diff --git a/debian/changelog b/debian/changelog
index a2087aa..26b29b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.20.6-0ubuntu1) quantal; urgency=low
+
+  * Merge from unreleased debian git.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 05 Sep 2012 17:27:17 +0300
+
 xserver-xorg-video-intel (2:2.20.6-1) UNRELEASED; urgency=low
 
   * New upstream bugfix release.

commit ed0826b7c4078bdf1b3c2e2145bc51f2cd9e6066
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Sep 5 17:14:03 2012 +0300

    emphasize that this is a bugfix release

diff --git a/debian/changelog b/debian/changelog
index 6368c2a..8a5f8a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
 xserver-xorg-video-intel (2:2.20.6-1) UNRELEASED; urgency=low
 
-  * New upstream release.
+  * New upstream bugfix release.
   * Added uxa-flush-batch-immediately.diff. (LP: #912134)
 
  -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 05 Sep 2012 17:07:07 +0300

commit 601651ad8311d9080059efbe96da1ccf2709bd05
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Sep 5 17:13:01 2012 +0300

    Added uxa-flush-batch-immediately.diff. (LP: #912134)

diff --git a/debian/changelog b/debian/changelog
index 8d06a80..6368c2a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-intel (2:2.20.6-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Added uxa-flush-batch-immediately.diff. (LP: #912134)
 
  -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 05 Sep 2012 17:07:07 +0300
 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0d37a5d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+uxa-flush-batch-immediately.diff
diff --git a/debian/patches/uxa-flush-batch-immediately.diff b/debian/patches/uxa-flush-batch-immediately.diff
new file mode 100644
index 0000000..debd632
--- /dev/null
+++ b/debian/patches/uxa-flush-batch-immediately.diff
@@ -0,0 +1,46 @@
+commit 6211d0914e2ed1cdd4cc2e170ee16129fc9f0d73
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Wed Sep 5 12:33:08 2012 +0100
+
+    uxa: Flush batch immediately after queuing a WAIT_FOR_EVENT
+    
+    We still encounter hangs with kernel-3.5 with the culprit being a wait
+    on a disabled pipe. As we thoroughly check before that the pipe is still
+    disabled and flush before a modeset, the only possibility that remains
+    is that DPMS is disabling the pipe before we submit. Close that race by
+    always submitting the batch immediately after a WAIT_FOR_EVENT.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+diff --git a/src/intel_dri.c b/src/intel_dri.c
+index fa1660c..a1bac9a 100644
+--- a/src/intel_dri.c
++++ b/src/intel_dri.c
+@@ -540,6 +540,11 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
+ 			  0, 0);
+ 
+ 	FreeScratchGC(gc);
++
++	/* And make sure the WAIT_FOR_EVENT is queued before any
++	 * modesetting/dpms operations on the pipe.
++	 */
++	intel_batch_submit(scrn);
+ }
+ 
+ #if DRI2INFOREC_VERSION >= 4
+diff --git a/src/intel_video.c b/src/intel_video.c
+index 0be72e2..09782aa 100644
+--- a/src/intel_video.c
++++ b/src/intel_video.c
+@@ -1585,6 +1585,11 @@ I830PutImageTextured(ScrnInfoPtr scrn,
+ 	intel_get_screen_private(scrn)->needs_flush = TRUE;
+ 	DamageDamageRegion(drawable, clipBoxes);
+ 
++	/* And make sure the WAIT_FOR_EVENT is queued before any
++	 * modesetting/dpms operations on the pipe.
++	 */
++	intel_batch_submit(scrn);
++
+ 	return Success;
+ }
+ 

commit 24900ff2ffc679d34696e584737e3c86b54210d1
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Sep 5 17:07:59 2012 +0300

    update the changelogs

diff --git a/ChangeLog b/ChangeLog
index c1223d4..65449c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,353 @@
+commit d933f3a7965c9aa70f70477be3bfe94d5ded948b
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Sep 2 10:29:49 2012 +0100
+
+    2.20.6 release
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 62e7e69d88f7e5c8b0f0931fe887ee0c3bddb43f
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Sep 2 09:55:07 2012 +0100
+
+    sna: Tweak placement rules if we already have a CPU bo
+    
+    If we have a CPU bo, consider if it may be quicker to render to it then
+    create a GPU bo.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f837807cc257fbedd35fa6101dc0b4a57e5ad78d
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Sep 1 10:36:09 2012 +0100
+
+    sna/dri: Remove busy-wait spin from vblank chaining of swapbuffers
+    
+    The issue being that, due to the delay, the chained swap would miss its
+    intended vblank and so cause an unwanted reduction in frame throughput
+    and increase output latency even further. Since both client and server
+    have other rate-limiting processes in place, we can forgo the stall here
+    and still keep the clients in check.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54274
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit b56e8c5105c858452ca4eabf15b298fc06dfd3c8
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Sep 1 12:15:47 2012 +0100
+
+    sna: Nullify gpu_bo after free in case final release is deferred in destroy
+    
+    As we may defer the actual release of the pixmap until after completion
+    of the last shm operation, we need to make sure in that case we mark the
+    GPU bo as released to prevent a use-after-free.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit c4d994014160d8c946af731196a908991c77d9f9
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Sep 1 10:44:24 2012 +0100
+
+    sna/gen2+: Add the missing assertions in case the drawrect is invalid
+    
+    Only the later gen had these useful assertions, add them to the rest
+    just in case.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 25c1b478a957ceb0474e7121840b7eed1ba2e140
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Sep 1 09:49:34 2012 +0100
+
+    sna: Discard cached CPU upload early when clearing with a solid fill
+    
+    Otherwise we end up considering the GPU bo as a real target, causing
+    confusion and failed asserts.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 530b1d1516595cf14c5112d8833b870cd50eca46
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu Aug 30 22:21:57 2012 +0100
+
+    sna/dri: Use common routine for testing busyness after flush
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 00d8c776b3607dbdab32c1126f91a7a38b8065f6
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Thu Aug 30 21:47:17 2012 +0100
+
+    sna/dri: Hold a reference to the vsync blit
+    
+    Fixes regression from
+    
+    commit 96a921487ef00db03a12bec7b0821410d6b74c31
+    Author: Chris Wilson <chris@chris-wilson.co.uk>
+    Date:   Mon Aug 27 21:50:32 2012 +0100
+    
+        sna: Track outstanding requests per-ring
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit b2a6c74c2159c9968c19400d61a11f4773724b4a
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Wed Aug 29 14:51:40 2012 +0100
+
+    sna: Remove inconsistent assertion
+    
+    As we now may not prefer to use the GPU even if all-damaged and clear,
+    asserting that if we choose to use the CPU if clear is now bogus.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit deaa1cac269be03f4ec44092f70349ff466d59de
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Tue Aug 28 22:23:22 2012 +0100
+
+    sna: Align active upload buffers to the next page for reuse
+    
+    If we write to the same page as it already active on the GPU then
+    despite the invalidation performed at the beginning of each batch, we do
+    not seem to correctly sample the new data.
+    
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=51422
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=52299
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 9e0305a3928f253ded6c8e141a4dd42be3952eb9
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Tue Aug 28 20:49:20 2012 +0100
+
+    sna: Discard inplace flag if we create a CPU map for the upload buffer
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f3e122554e88da0351bfb9a7a722f0715553689b
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Tue Aug 28 21:27:04 2012 +0100
+
+    sna: Propagate the request to flush rather than directly submit the batch
+    
+    The subtly is that we need to reset the mode correctly after
+    submitting the batch which was not handled by kgem_flush(). If we fail
+    to set the appropriate mode then the next operation will be on a random
+    ring, which can prove fatal with SandyBridge+.
+    
+    Reported-by: Reinis Danne <reinis.danne@gmail.com>
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit b5c8efe4309248e62d94d80b37a70775284ae985
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Tue Aug 28 08:33:00 2012 +0100
+
+    sna: Make sure we reset the domain tracking when exporting DRI bo
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 96a921487ef00db03a12bec7b0821410d6b74c31
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 21:50:32 2012 +0100
+
+    sna: Track outstanding requests per-ring
+    
+    In order to properly track when the GPU is idle, we need to account for
+    the completion order that may differ on architectures like SandyBridge
+    with multiple mostly independent rings.
+    
+    Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54127
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 26c731efc2048663b6a19a7ed7db0e94243ab30f
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 20:50:08 2012 +0100
+
+    sna: Ensure that we create a GTT mapping for the inplace upload buffer
+    
+    As the code will optimistically convert a request for a GTT mapping into
+    a CPU mapping if the object is still in the CPU domain, we need to
+    overrule that in this case where we explicitly want to write directly
+    into the GTT and furthermore keep the buffer around in an upload cache.
+    
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=51422
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=52299
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 2cbf88980ede50370b97f32e565dea33db16ac44
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 20:07:17 2012 +0100
+
+    sna: Force the stall if using a busy ShmPixmap bo with PutImage
+    
+    As we will stall in the near future to serialise access with the
+    ShmPixmap, we may as well stall first and do a simple copy using the
+    CPU in this highly unlikely scenario.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 705103d77e6b80d796a4535cade96cb6e9ebece3
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 20:07:19 2012 +0100
+
+    sna: Add a modicum of DBG to kgem_is_idle()
+    
+    Print out the handle of the bo we just checked.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 8218e5da2b177ca9cd0e2b1e7dbe114e5ef2ebf0
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 19:36:03 2012 +0100
+
+    sna: Fix crash with broken DBG missing one of its arguments
+    
+    Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54127
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 593f549b45fbb1528472feed51207d84901d142e
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 16:43:19 2012 +0100
+
+    sna: A little more DBG to try and identify ratelimiting ops
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 71ac12e9b6ed00c28993637aafd5186a2ba26256
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 15:49:59 2012 +0100
+
+    sna: Assert that the bo is marked as 'flush' when exported to DRI clients
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit cf64c8ce758cfa5d3bcd1b7626ff94cce7a84636
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 13:59:56 2012 +0100
+
+    sna: Upload PutImage inplace to a fresh GPU bo if the device doesn't snoop
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 3c6758fc4a50ecfce9ed317fec669cc48addedcf
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 11:58:05 2012 +0100
+
+    sna: Flush the batch if it references a ShmPixmap and the GPU is idle
+    
+    This helps minimise the stall when syncing with the GPU before sending
+    the next reply to the Client.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit f21079bad6e8316baf5d0295d6e7a809041bce06
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Mon Aug 27 11:25:28 2012 +0100
+
+    Revert "sna: Cleanup composite redirection after substituting the BLT"
+    
+    This reverts commit 5a5212117e7a73ce3fffb87c60a505a849e38c36.
+    
+    The clean up is in effect too early, as this is during preparation and
+    the actual work is already being correctly done at the end.
+
+commit 414e87255cdee6eb556703ddefd194af71b985ed
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 19:47:31 2012 +0100
+
+    Add Option "Backlight" to override the probed backlight control interface
+    
+    The automatic selection may not correspond with the correct backlight
+    (such as in a multi-gpu, multi-panel device) or the user may simply
+    prefer another control interface. This allows them to override the
+    chosen interface using
+    
+      Option "Backlight" "my-backlight"
+    
+    to specify '/sys/class/backlight/my-backlight' as the interface to use
+    instead.
+    
+    Suggested-by: Alon Levy <alevy@redhat.com>
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=29273
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit d4f7c58186849374cd929e20fa49ea2e93939a69
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 17:01:55 2012 +0100
+
+    sna/gen5+: Use the common methods for choosing the render targets
+    
+    This should afford us much more flexibility in where we render.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 3c88b5f693c29b990d69f96508b121ce97a7209e
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sat Aug 25 11:49:30 2012 +0100
+
+    sna: Use a fast span emitter for mono trapezoids without damage or clipping
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 8e10a5b348a37feadcf935ec7694e46cc0802bdf
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 14:53:12 2012 +0100
+
+    sna/gen6+: Do not call sna_blt_composite() after prepping the composite op
+    
+    As sna_blt_composite() will overwrite parts of the composite op as it
+    checks whether or not it can execute that operation, it will lead to a
+    crash as the normal render path finds the op corrupt. (The BLT
+    conversion functions cater for the cases where we may wish to switch
+    pipelines after choosing src/dst bo.)
+    
+    Reported-by: rei4dan@gmail.com
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit cbbe7727e766a5ee8767673feb6c8cdec38a7051
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 14:43:47 2012 +0100
+
+    sna/gen6+: Simplify prefer_blt_bo
+    
+    As we already check the tiling state, so all we need to then check is
+    that the pitch is within the BLT constraint.
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 0c15824a8143a288716d2eacf03252cc54eb9466
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 14:29:41 2012 +0100
+
+    sna: Add some DBG to kgem_is_idle()
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit d432983421286d343f7c487c12c7244b711f5a66
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 13:43:35 2012 +0100
+
+    sna: Add some DBG to BLT composite substitute to show if redirection is used
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 5a5212117e7a73ce3fffb87c60a505a849e38c36
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 13:38:23 2012 +0100
+
+    sna: Cleanup composite redirection after substituting the BLT
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 335821d588460c253b2ba2c8616a7c46e5ad0150
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date:   Sun Aug 26 13:29:04 2012 +0100
+
+    sna/gen4+: Check for allocation failure for the clear solid bo
+    
+    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+
 commit b5c77a6aaf520e331e82409b2592911cb1bb3100
 Author: Chris Wilson <chris@chris-wilson.co.uk>
 Date:   Sun Aug 26 12:48:18 2012 +0100
diff --git a/debian/changelog b/debian/changelog
index 6d26eef..8d06a80 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.20.6-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 05 Sep 2012 17:07:07 +0300
+
 xserver-xorg-video-intel (2:2.20.5-1) experimental; urgency=low
 
   * New upstream release.

commit d933f3a7965c9aa70f70477be3bfe94d5ded948b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 2 10:29:49 2012 +0100

    2.20.6 release
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/NEWS b/NEWS
index 54f2caa..a2caaa7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,24 @@
+Release 2.20.6 (2012-09-02)
+===========================
+A serious bug that caused a crash on SandyBridge and IvyBridge when
+mixing CPU and GPU operations on the same buffer, and an annoyance from
+bad scheduling of windowed swapbuffer updates causing low framerates and
+jitter. Plus the usual smattering of assertion fixes and a long standing
+issue with incoherent page access to a streaming buffer.
+
+ * Low frame rates in Blobby Valley when "fullscreen"
+   https://bugs.freedesktop.org/show_bug.cgi?id=54274
+
+ * Incoherent concurrent access with the CPU and GPU
+   https://bugs.freedesktop.org/show_bug.cgi
+   https://bugs.freedesktop.org/show_bug.cgi
+
+ * Add Option "Backlight" to override automatic selection of the
+   backlight interface.
+
+ * Avoid overwriting the composite operation info when testing if we
+   can transfer the operation to the BLT.
+
 Release 2.20.5 (2012-08-26)
 ===========================
 Another silly bug found, another small bugfix release. The goal was for
diff --git a/configure.ac b/configure.ac
index 114e721..c401a61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-intel],
-        [2.20.5],
+        [2.20.6],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 62e7e69d88f7e5c8b0f0931fe887ee0c3bddb43f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 2 09:55:07 2012 +0100

    sna: Tweak placement rules if we already have a CPU bo
    
    If we have a CPU bo, consider if it may be quicker to render to it then
    create a GPU bo.
    
    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 7c598f1..bb7cda2 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2427,23 +2427,43 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box,
 			goto use_cpu_bo;
 		}
 
-		if (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) {
-			DBG(("%s: already using CPU bo, will not force allocation\n",
-			     __FUNCTION__));
-			goto use_cpu_bo;
-		}
+		if ((flags & IGNORE_CPU) == 0) {
+			if (priv->cpu_bo) {
+				if (to_sna_from_pixmap(pixmap)->kgem.can_blt_cpu) {
+					if (kgem_bo_is_busy(priv->cpu_bo)) {
+						DBG(("%s: already using CPU bo, will not force allocation\n",
+						     __FUNCTION__));
+						goto use_cpu_bo;
+					}
 
-		if (priv->cpu_damage && flags == 0) {
-			DBG(("%s: prefer cpu", __FUNCTION__));
-			goto use_cpu_bo;
-		}
+					if ((flags & RENDER_GPU) == 0) {
+						DBG(("%s: prefer cpu", __FUNCTION__));
+						goto use_cpu_bo;
+					}
+				} else {
+					if (kgem_bo_is_busy(priv->cpu_bo)) {
+						DBG(("%s: CPU bo active, must force allocation\n",
+						     __FUNCTION__));
+						goto create_gpu_bo;
+					}
+				}
+			}
 
-		if (priv->cpu_damage && !box_inplace(pixmap, box)) {
-			DBG(("%s: damaged with a small operation, will not force allocation\n",
-			     __FUNCTION__));
-			goto use_cpu_bo;
+			if (priv->cpu_damage) {
+				if ((flags & (PREFER_GPU | FORCE_GPU)) == 0) {
+					DBG(("%s: prefer cpu", __FUNCTION__));
+					goto use_cpu_bo;
+				}
+
+				if (!box_inplace(pixmap, box)) {
+					DBG(("%s: damaged with a small operation, will not force allocation\n",
+					     __FUNCTION__));
+					goto use_cpu_bo;
+				}
+			}
 		}
 
+create_gpu_bo:
 		move = MOVE_WRITE | MOVE_READ;
 		if (flags & FORCE_GPU)
 			move |= __MOVE_FORCE;

commit f837807cc257fbedd35fa6101dc0b4a57e5ad78d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Sep 1 10:36:09 2012 +0100

    sna/dri: Remove busy-wait spin from vblank chaining of swapbuffers
    
    The issue being that, due to the delay, the chained swap would miss its
    intended vblank and so cause an unwanted reduction in frame throughput
    and increase output latency even further. Since both client and server
    have other rate-limiting processes in place, we can forgo the stall here
    and still keep the clients in check.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54274
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 0210d73..77e4e26 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1268,9 +1268,6 @@ void sna_dri_vblank_handler(struct sna *sna, struct drm_event_vblank *event)
 		break;
 
 	case DRI2_SWAP_THROTTLE:
-		if (!sna_dri_blit_complete(sna, info))
-			return;
-
 		DBG(("%s: %d complete, frame=%d tv=%d.%06d\n",
 		     __FUNCTION__, info->type,
 		     event->sequence, event->tv_sec, event->tv_usec));

commit b56e8c5105c858452ca4eabf15b298fc06dfd3c8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Sep 1 12:15:47 2012 +0100

    sna: Nullify gpu_bo after free in case final release is deferred in destroy
    
    As we may defer the actual release of the pixmap until after completion
    of the last shm operation, we need to make sure in that case we mark the
    GPU bo as released to prevent a use-after-free.
    
    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 7dad94b..7c598f1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1073,8 +1073,10 @@ static Bool sna_destroy_pixmap(PixmapPtr pixmap)
 	sna = to_sna_from_pixmap(pixmap);
 
 	/* Always release the gpu bo back to the lower levels of caching */
-	if (priv->gpu_bo)
+	if (priv->gpu_bo) {
 		kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
+		priv->gpu_bo = NULL;
+	}
 
 	if (priv->shm && kgem_bo_is_busy(priv->cpu_bo)) {
 		sna_add_flush_pixmap(sna, priv, priv->cpu_bo);

commit c4d994014160d8c946af731196a908991c77d9f9
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Sep 1 10:44:24 2012 +0100

    sna/gen2+: Add the missing assertions in case the drawrect is invalid
    
    Only the later gen had these useful assertions, add them to the rest
    just in case.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index d2f6fe7..7d51823 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -543,6 +543,7 @@ gen2_get_batch(struct sna *sna)
 
 static void gen2_emit_target(struct sna *sna, const struct sna_composite_op *op)
 {
+	assert(!too_large(op->dst.width, op->dst.height));
 	assert(op->dst.bo->pitch >= 8 && op->dst.bo->pitch <= MAX_3D_PITCH);
 	assert(sna->render_state.gen2.vertex_offset == 0);
 
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index ab94bdb..c5ec9bc 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -1341,6 +1341,8 @@ static void gen3_emit_target(struct sna *sna,
 {
 	struct gen3_render_state *state = &sna->render_state.gen3;
 
+	assert(!too_large(width, height));
+
 	/* BUF_INFO is an implicit flush, so skip if the target is unchanged. */
 	assert(bo->unique_id != 0);
 	if (bo->unique_id != state->current_dst) {
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index e732810..d8b76a1 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -1283,6 +1283,9 @@ gen4_emit_drawing_rectangle(struct sna *sna, const struct sna_composite_op *op)
 	uint32_t limit = (op->dst.height - 1) << 16 | (op->dst.width - 1);
 	uint32_t offset = (uint16_t)op->dst.y << 16 | (uint16_t)op->dst.x;
 
+	assert(!too_large(op->dst.x, op->dst.y));
+	assert(!too_large(op->dst.width, op->dst.height));
+
 	if (sna->render_state.gen4.drawrect_limit == limit &&
 	    sna->render_state.gen4.drawrect_offset == offset)
 		return;

commit 25c1b478a957ceb0474e7121840b7eed1ba2e140
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Sep 1 09:49:34 2012 +0100

    sna: Discard cached CPU upload early when clearing with a solid fill
    
    Otherwise we end up considering the GPU bo as a real target, causing
    confusion and failed asserts.
    
    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 090da91..7dad94b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4153,6 +4153,10 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 		DBG(("%s: overwritting CPU damage\n", __FUNCTION__));
 		if (region_subsumes_damage(region, dst_priv->cpu_damage)) {
 			DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
+			if (dst_priv->gpu_bo && dst_priv->gpu_bo->proxy) {
+				kgem_bo_destroy(&sna->kgem, dst_priv->gpu_bo);
+				dst_priv->gpu_bo = NULL;
+			}
 			sna_damage_destroy(&dst_priv->cpu_damage);
 			list_del(&dst_priv->list);
 		}
@@ -11580,6 +11584,10 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect)
 		    region_is_singular(gc->pCompositeClip)) {
 			if (region_subsumes_damage(&region, priv->cpu_damage)) {
 				DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
+				if (priv->gpu_bo && priv->gpu_bo->proxy) {
+					kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
+					priv->gpu_bo = NULL;
+				}
 				sna_damage_destroy(&priv->cpu_damage);
 				list_del(&priv->list);
 			}
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index d47479b..65dae9c 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -829,6 +829,10 @@ sna_composite_rectangles(CARD8		 op,
 		if (priv->cpu_damage &&
 		    region_subsumes_damage(&region, priv->cpu_damage)) {
 			DBG(("%s: discarding existing CPU damage\n", __FUNCTION__));
+			if (priv->gpu_bo && priv->gpu_bo->proxy) {
+				kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
+				priv->gpu_bo = NULL;
+			}
 			sna_damage_destroy(&priv->cpu_damage);
 			list_del(&priv->list);
 		}

commit 530b1d1516595cf14c5112d8833b870cd50eca46
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 30 22:21:57 2012 +0100

    sna/dri: Use common routine for testing busyness after flush
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 5fa17d7..0210d73 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1206,24 +1206,21 @@ static void chain_swap(struct sna *sna,
 static bool sna_dri_blit_complete(struct sna *sna,
 				  struct sna_dri_frame_event *info)
 {
-	if (info->bo && kgem_bo_is_busy(info->bo)) {
-		kgem_retire(&sna->kgem);
-		if (kgem_bo_is_busy(info->bo)) {
-			drmVBlank vbl;
+	if (info->bo && __kgem_bo_is_busy(&sna->kgem, info->bo)) {
+		drmVBlank vbl;
 
-			DBG(("%s: vsync'ed blit is still busy, postponing\n",
-			     __FUNCTION__));
+		DBG(("%s: vsync'ed blit is still busy, postponing\n",
+		     __FUNCTION__));
 
-			VG_CLEAR(vbl);
-			vbl.request.type =
-				DRM_VBLANK_RELATIVE |
-				DRM_VBLANK_EVENT |
-				pipe_select(info->pipe);
-			vbl.request.sequence = 1;
-			vbl.request.signal = (unsigned long)info;
-			if (!sna_wait_vblank(sna, &vbl))
-				return false;
-		}
+		VG_CLEAR(vbl);
+		vbl.request.type =
+			DRM_VBLANK_RELATIVE |
+			DRM_VBLANK_EVENT |
+			pipe_select(info->pipe);
+		vbl.request.sequence = 1;
+		vbl.request.signal = (unsigned long)info;
+		if (!sna_wait_vblank(sna, &vbl))
+			return false;
 	}
 
 	return true;

commit 00d8c776b3607dbdab32c1126f91a7a38b8065f6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 30 21:47:17 2012 +0100

    sna/dri: Hold a reference to the vsync blit
    
    Fixes regression from
    
    commit 96a921487ef00db03a12bec7b0821410d6b74c31
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Mon Aug 27 21:50:32 2012 +0100
    
        sna: Track outstanding requests per-ring
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ed5e342..6df5a2e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1258,8 +1258,10 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
 {
 	DBG(("%s: moving handle=%d to inactive\n", __FUNCTION__, bo->handle));
 
+	assert(bo->refcnt == 0);
 	assert(bo->reusable);
 	assert(bo->rq == NULL);
+	assert(bo->exec == NULL);
 	assert(bo->domain != DOMAIN_GPU);
 	assert(!kgem_busy(kgem, bo->handle));
 	assert(!bo->proxy);
@@ -1544,6 +1546,7 @@ destroy:
 
 static void kgem_bo_unref(struct kgem *kgem, struct kgem_bo *bo)
 {
+	assert(bo->refcnt);
 	if (--bo->refcnt == 0)
 		__kgem_bo_destroy(kgem, bo);
 }
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 06a940b..5fa17d7 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -616,7 +616,7 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
 		if (flush) { /* STAT! */
 			struct kgem_request *rq = sna->kgem.next_request;
 			kgem_submit(&sna->kgem);
-			bo = rq->bo;
+			bo = kgem_bo_reference(rq->bo);
 		}
 	}
 

commit b2a6c74c2159c9968c19400d61a11f4773724b4a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Aug 29 14:51:40 2012 +0100

    sna: Remove inconsistent assertion
    
    As we now may not prefer to use the GPU even if all-damaged and clear,
    asserting that if we choose to use the CPU if clear is now bogus.
    
    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 9c493c2..090da91 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2379,6 +2379,7 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box,
 	if (priv->gpu_bo && priv->gpu_bo->proxy) {
 		DBG(("%s: cached upload proxy, discard and revert to GPU\n",
 		     __FUNCTION__));
+		assert(priv->gpu_damage == NULL);
 		kgem_bo_destroy(&to_sna_from_pixmap(pixmap)->kgem,
 				priv->gpu_bo);
 		priv->gpu_bo = NULL;
@@ -2548,7 +2549,6 @@ use_gpu_bo:
 	return priv->gpu_bo;
 
 use_cpu_bo:
-	assert(!priv->clear);
 	if (priv->cpu_bo == NULL)
 		return NULL;
 

commit deaa1cac269be03f4ec44092f70349ff466d59de
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Aug 28 22:23:22 2012 +0100

    sna: Align active upload buffers to the next page for reuse
    
    If we write to the same page as it already active on the GPU then
    despite the invalidation performed at the beginning of each batch, we do
    not seem to correctly sample the new data.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=51422
    References: https://bugs.freedesktop.org/show_bug.cgi?id=52299
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index e51bbc0..ed5e342 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1910,13 +1910,18 @@ static void kgem_finish_buffers(struct kgem *kgem)
 		}
 
 		if (bo->mmapped) {
+			int used;
+
 			assert(!bo->need_io);
+
+			used = ALIGN(bo->used + PAGE_SIZE-1, PAGE_SIZE);
 			if (!DBG_NO_UPLOAD_ACTIVE &&
-			    bo->used + PAGE_SIZE <= bytes(&bo->base) &&
+			    used + PAGE_SIZE <= bytes(&bo->base) &&


Reply to: