ChangeLog               |  263 +++++++++
 NEWS                    |   53 +
 configure.ac            |    2 
 debian/changelog        |   12 
 man/intel.man           |    9 
 src/brw_structs.h       |    5 
 src/i915_render.c       |   30 -
 src/i965_reg.h          |    1 
 src/i965_render.c       | 1320 ++++++++++++++++++++++++------------------------
 src/i965_video.c        |    6 
 src/intel.h             |   25 
 src/intel_batchbuffer.c |   24 
 src/intel_batchbuffer.h |    8 
 src/intel_display.c     |    4 
 src/intel_dri.c         |   24 
 src/intel_driver.c      |   55 +-
 src/intel_memory.c      |    7 
 src/intel_module.c      |    2 
 src/intel_uxa.c         |   46 +
 src/intel_video.c       |    4 
 20 files changed, 1158 insertions(+), 742 deletions(-)

New commits:
commit 4b21e1bf037b148ac70719c45fab5af580f02032
Author: Cyril Brulebois <k...@debian.org>
Date:   Tue Apr 19 03:37:34 2011 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index f11dae2..c938aa9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xserver-xorg-video-intel (2:2.15.0-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.15.0-1) unstable; urgency=low
 
   * New upstream release.
   * Merge from upstream master up to c9fb69cb25 to fix crashes with i965
@@ -8,7 +8,7 @@ xserver-xorg-video-intel (2:2.15.0-1) UNRELEASED; urgency=low
     - intel: Beware the unsigned promotion when checking for batch overflows
     - i965/video: We need 150 dwords of space for video state emission
 
- -- Cyril Brulebois <k...@debian.org>  Tue, 19 Apr 2011 03:29:07 +0200
+ -- Cyril Brulebois <k...@debian.org>  Tue, 19 Apr 2011 03:37:23 +0200
 
 xserver-xorg-video-intel (2:2.14.902-1) unstable; urgency=low
 

commit 0932f1927e4705730fe98c293433c258febb6059
Author: Cyril Brulebois <k...@debian.org>
Date:   Tue Apr 19 03:36:31 2011 +0200

    Bump changelogs again (Closes: #622653).

diff --git a/ChangeLog b/ChangeLog
index ad435f1..7128372 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+commit c9fb69cb2502917dfb2828c90802de7766072899
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Sun Apr 17 10:42:05 2011 +0100
+
+    i965/video: We need 150 dwords of space for video state emission
+    
+    (Actually around 131, with additional 10% just for safety.)
+    
+    Reported-by: Modestas Vainius <geroma...@mailas.com>
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36319
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit a51cd83d25f2f9f2107219d5671194f931601244
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Sun Apr 17 10:36:26 2011 +0100
+
+    intel: Beware the unsigned promotion when checking for batch overflows
+    
+    Reported-by: Modestas Vainius <geroma...@mailas.com>
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=36319
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 030aa3d13643a0acb7126fa1fa6c5a8eac134639
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 14 10:25:21 2011 +0100
+
+    NEWS: typo.
+    
+    Spotted too late...
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
 commit 0e425b30e12b11dbf51eea1d3366e3372f8b93af
 Author: Chris Wilson <ch...@chris-wilson.co.uk>
 Date:   Thu Apr 14 10:16:03 2011 +0100
diff --git a/debian/changelog b/debian/changelog
index c7a6ff0..f11dae2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,12 @@
 xserver-xorg-video-intel (2:2.15.0-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Merge from upstream master up to c9fb69cb25 to fix crashes with i965
+    and kwin in particular, thanks to Julian Andres Klode and Modestas
+    Vainius for their reports in Debian and upstream (Closes: #622653):
+    - NEWS: typo.
+    - intel: Beware the unsigned promotion when checking for batch overflows
+    - i965/video: We need 150 dwords of space for video state emission
 
  -- Cyril Brulebois <k...@debian.org>  Tue, 19 Apr 2011 03:29:07 +0200
 

commit c41e36ebc95c75b7e90af1b5accd1fd2734ea493
Author: Cyril Brulebois <k...@debian.org>
Date:   Tue Apr 19 03:29:30 2011 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index bd38e98..ad435f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,234 @@
+commit 0e425b30e12b11dbf51eea1d3366e3372f8b93af
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 14 10:16:03 2011 +0100
+
+    configure,NEWS: 2.15.0 release
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 686018f283f1d131073ef5917213e6a8ac013f26
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Tue Apr 12 08:23:04 2011 +0100
+
+    Turn relaxed-fencing off by default for older (pre-G33) chipsets
+    
+    There are still too many unresolved bugs, typically GPU hangs, that are
+    related to using relaxed fencing (i.e. only allocating the minimal
+    amount of memory required for a buffer) on older hardware, so turn off
+    the feature by default for the release.
+    
+    Reported-and-tested-by: Knut Petersen <knut_peter...@t-online.de>
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36147
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+    Acked-by: Daniel Vetter <daniel.vet...@ffwll.ch>
+
+commit 3d2b79098ccb3fed86be66f619f4ed338741d454
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 11 15:20:16 2011 +0100
+
+    dri: Rearrange code to compile against xorg-server-1.7
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 4fa35dd5e13a58070220f787fc0678f1c679808d
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 11 10:44:55 2011 +0100
+
+    NEWS: version bump for 2.14.903 snapshot
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 97e9557619e58ef769eb7cbf1a03fbd52be7f2ed
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Fri Apr 8 13:38:48 2011 +0100
+
+    intel: Restore manual flush for old kernels
+    
+    Daniel Vetter pointed out that the automagic flush by the kernel for the
+    busy-ioctl was only introduced upstream in 2.6.37. So we still need to
+    manually emit a flush on old kernels.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit fb40bf2b33a6d26f0e6a4e5798d10c905faa8aad
+Author: Daniel Vetter <daniel.vet...@ffwll.ch>
+Date:   Fri Apr 8 12:37:35 2011 +0200
+
+    Tell users to grab i915_error_state on gpu hangs
+    
+    Acked-by: Chris Wilson <ch...@chris-wilson.co.uk>
+    Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>
+
+commit 59ed6b05db99d7e5144f4f8499c67cee9b833673
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 7 15:28:46 2011 +0100
+
+    Revert "i965: Convert to relative relocations for state"
+    
+    This reverts commit d2106384be6f9df498392127c3ff64d0a2b17457.
+    
+    Breaks compiz (but not mutter/gnome-shell) on gen6. Not sure if this is
+    not seem deep interaction issue with multiple clients sharing the GPU or
+    just with compiz, but for now we have to revert and suffer the inane
+    performance hit. It looks suspiciously like another deferred damage
+    issue...
+    
+    Bugzilla: 51a27e88b073cff229fff4362cb6ac22835c4044
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 25521900df11bc71020ee80db2223f979bec5ec6
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 7 15:09:30 2011 +0100
+
+    gen6: Invalidate texture cache
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit ad22003033eb502474ae538a97e3b42cf8f83880
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 7 10:29:40 2011 +0100
+
+    i965: Avoid transform overheads for vertex emit where possible
+    
+    Minor improvement as the bottlenecks lie elsewhere. But it was annoying me.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 007c2f86cbb386861a1f711786523657f92e12cb
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Apr 7 09:53:34 2011 +0100
+
+    i965: Refactor to use constant sampler_state offsets
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 8dc99b305a514dcd42c4260698e685a66dc95518
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 22:30:29 2011 +0100
+
+    i965: Reset vertex_id after every batch
+    
+    So that we always remember to re-emit the initial vertex elements state.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 5982ed4da12a964351029c6f786348a11e33dc81
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 19:32:43 2011 +0100
+
+    i965: Always update last_floats_per_vertex
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 6f104189bb9439ab0e05f04d4be020813eb04bf9
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 19:21:10 2011 +0100
+
+    Take advantage of the kernel flush for dirty bo in the busy ioctl
+    
+    Rather than just creating and submitting a batch that simply contains a
+    flush in order to periodically ensure that rendering reaches the
+    scanout, we can simply ask the kernel whether the scanout is busy. The
+    kernel will then submit a flush on our behalf if it is dirty, which
+    takes advantage of the kernel's dirty state tracking.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 314439860e595c473d168c0cafb2b5b49b7fef30
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 17:20:04 2011 +0100
+
+    Remove unused function 'intel_bo_alloc_for_data'
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit ced747cefb5e697e6caa65296dff728904f52b93
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 17:13:50 2011 +0100
+
+    Remove the unnecessary MI_FLUSH from the flush handler
+    
+    The kernel will emit any required flushes between the dri client and the
+    ddx, and we do not rely on the MI_FLUSH here for scanout.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 79444291a39c42039192a5baa3a71d52300cf4ee
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 16:34:58 2011 +0100
+
+    i965: segregate each vertex element into its own buffer
+    
+    Reduce the number of relocations emitted by only emitting one relocation
+    per vertex element per vertex buffer.
+    
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=35733
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit d2106384be6f9df498392127c3ff64d0a2b17457
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Mon Apr 4 12:33:04 2011 +0100
+
+    i965: Convert to relative relocations for state
+    
+    References: https://bugs.freedesktop.org/show_bug.cgi?id=35733
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 972569f6fd1e14519f46e9f50d2509faf1d0aa55
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Fri Mar 25 10:46:14 2011 +0000
+
+    MI_LOAD_SCAN_LINES_INCL are inclusive and range [0, display height-1]
+    
+    We have seen GPU hangs with:
+    
+    batchbuffer at 0x0f9b4000:
+    0x0f9b4000:      0x09000000: MI_LOAD_SCAN_LINES_INCL
+    0x0f9b4004:      0x00000300:    dword 1
+    0x0f9b4008:      0x09000000: MI_LOAD_SCAN_LINES_INCL
+    0x0f9b400c:      0x00000300:    dword 1
+    0x0f9b4010:      0x01820000: MI_WAIT_FOR_EVENT
+    0x0f9b4014: HEAD 0x02000006: MI_FLUSH
+    
+    on a 1366x768 display. That according to the specs an invalid command
+    for the pipe.
+    
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35576
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 537a836dd6db384d53b52eb457a7d257c440217f
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Fri Apr 1 07:10:25 2011 +0100
+
+    946GZ is a 965G!
+    
+    Sales & Marketing score another victory in confusing me.
+    
+    Bugzila: https://bugs.freedesktop.org/show_bug.cgi?id=35854
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 630d77bf10ba6234bb9c04538636f7d8aa319aea
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Wed Mar 30 07:24:42 2011 +0100
+
+    Add a DRI2SwapEventPtr typedef for retro xservers
+    
+    Because people are still trying to build upon our solid historical
+    foundations.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit f660df2cb44b310740ed850037ff37891b671f28
+Author: Daniel Vetter <daniel.vet...@ffwll.ch>
+Date:   Tue Mar 29 18:02:24 2011 +0200
+
+    Cleanup gen2 tiling confusion
+    
+    A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows.
+    
+    Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk>
+    Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>
+
 commit a2c8442fcb29ef2d0df41518952a2d8df1671070
 Author: Chris Wilson <ch...@chris-wilson.co.uk>
 Date:   Tue Mar 29 11:38:45 2011 +0100
diff --git a/debian/changelog b/debian/changelog
index 46c13c9..c7a6ff0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.15.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Cyril Brulebois <k...@debian.org>  Tue, 19 Apr 2011 03:29:07 +0200
+
 xserver-xorg-video-intel (2:2.14.902-1) unstable; urgency=low
 
   * New upstream snapshot (2.15 rc2).

commit c9fb69cb2502917dfb2828c90802de7766072899
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Sun Apr 17 10:42:05 2011 +0100

    i965/video: We need 150 dwords of space for video state emission
    
    (Actually around 131, with additional 10% just for safety.)
    
    Reported-by: Modestas Vainius <geroma...@mailas.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36319
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/i965_video.c b/src/i965_video.c
index c757681..53a9394 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -1210,7 +1210,7 @@ I965DisplayVideoTextured(ScrnInfoPtr scrn,
                        intel_batch_submit(scrn);
                }
 
-               intel_batch_start_atomic(scrn, 100);
+               intel_batch_start_atomic(scrn, 150);
 
                i965_emit_video_setup(scrn, surface_state_binding_table_bo, 
n_src_surf, pixmap);
 

commit a51cd83d25f2f9f2107219d5671194f931601244
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Sun Apr 17 10:36:26 2011 +0100

    intel: Beware the unsigned promotion when checking for batch overflows
    
    Reported-by: Modestas Vainius <geroma...@mailas.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=36319
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h
index 605932a..2403a38 100644
--- a/src/intel_batchbuffer.h
+++ b/src/intel_batchbuffer.h
@@ -50,14 +50,14 @@ static inline int intel_vertex_space(intel_screen_private 
*intel)
 }
 
 static inline void
-intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, 
unsigned int sz)
+intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, int 
sz)
 {
        assert(sz < intel->batch_bo->size - 8);
        if (intel_batch_space(intel) < sz)
                intel_batch_submit(scrn);
 }
 
-static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, unsigned int sz)
+static inline void intel_batch_start_atomic(ScrnInfoPtr scrn, int sz)
 {
        intel_screen_private *intel = intel_get_screen_private(scrn);
 

commit 030aa3d13643a0acb7126fa1fa6c5a8eac134639
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Thu Apr 14 10:25:21 2011 +0100

    NEWS: typo.
    
    Spotted too late...
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/NEWS b/NEWS
index ea92bcf..bf55b4b 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ We are pleased to announce this major release of the 
xf86-video-intel
 driver, roughly on schedule at 3 months since 2.14.0. With the many bug
 fixes in this release, we encourage everyone to upgrade to 2.14.
 
-The priority for this quarter has been simply to unexciting and stabilise
+The priority for this quarter has been simply to be unexciting and stabilise
 the driver further, seeking to capitalise upon the improvements elsewhere
 in the stack.
 

commit 0e425b30e12b11dbf51eea1d3366e3372f8b93af
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Thu Apr 14 10:16:03 2011 +0100

    configure,NEWS: 2.15.0 release
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/NEWS b/NEWS
index d292704..ea92bcf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,30 @@
+Release 2.15.0 (2011-04-14)
+==============================
+We are pleased to announce this major release of the xf86-video-intel
+driver, roughly on schedule at 3 months since 2.14.0. With the many bug
+fixes in this release, we encourage everyone to upgrade to 2.14.
+
+The priority for this quarter has been simply to unexciting and stabilise
+the driver further, seeking to capitalise upon the improvements elsewhere
+in the stack.
+
+Bugs fixed in this snapshot (compared to 2.14.903)
+--------------------------------------------------
+
+* Turn off relaxed fencing by default for older chipsets
+  This was continuing to destabilize those system, so for the release
+  we disabled the feature. If you wish to help us debug this, you can
+  re-enable the optimisation with Option "RelaxedFencing" "True".
+  Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36147
+
+* Build fix for xserver-1.7.7
+
+* KDE glitches on SNB
+  [Technically fixed in the previous snapshot, but I'm really pleased
+   that this got fixed in time for the release!]
+  https://bugs.freedesktop.org/show_bug.cgi?id=35808
+
+
 Snapshot 2.14.903 (2011-04-11)
 ==============================
 This is the third release candidate in preparation for the upcoming
diff --git a/configure.ac b/configure.ac
index bc9a868..fd5a3cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.63])
 AC_INIT([xf86-video-intel],
-        [2.14.903],
+        [2.15.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 686018f283f1d131073ef5917213e6a8ac013f26
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Tue Apr 12 08:23:04 2011 +0100

    Turn relaxed-fencing off by default for older (pre-G33) chipsets
    
    There are still too many unresolved bugs, typically GPU hangs, that are
    related to using relaxed fencing (i.e. only allocating the minimal
    amount of memory required for a buffer) on older hardware, so turn off
    the feature by default for the release.
    
    Reported-and-tested-by: Knut Petersen <knut_peter...@t-online.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36147
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
    Acked-by: Daniel Vetter <daniel.vet...@ffwll.ch>

diff --git a/man/intel.man b/man/intel.man
index 4fd0ce7..85e2b2e 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -195,6 +195,15 @@ you may wish to override this and force a linear layout.
 .IP
 Default: disabled
 .TP
+.BI "Option \*qRelaxedFencing\*q \*q" boolean \*q
+This option controls whether we attempt to allocate the minimal amount of
+memory required for the buffers. The reduction in working set has a substantial
+improvement on system performance. However, this has been demonstrate to be
+buggy on older hardware (845-865 and 915-945, but ok on PineView and later)
+so on those chipsets defaults to off.
+.IP
+Default: Enabled for G33 (includes PineView), and later, class machines.
+.TP
 .BI "Option \*qXvMC\*q \*q" boolean \*q
 Enable XvMC driver. Current support MPEG2 MC on 915/945 and G33 series.
 User should provide absolute path to libIntelXvMC.so in XvMCConfig file.
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 1b0d740..e867351 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -101,6 +101,7 @@ typedef enum {
    OPTION_DEBUG_FLUSH_CACHES,
    OPTION_DEBUG_WAIT,
    OPTION_HOTPLUG,
+   OPTION_RELAXED_FENCING,
 } I830Opts;
 
 static OptionInfoRec I830Options[] = {
@@ -121,6 +122,7 @@ static OptionInfoRec I830Options[] = {
    {OPTION_DEBUG_FLUSH_CACHES, "DebugFlushCaches", OPTV_BOOLEAN, {0}, FALSE},
    {OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, FALSE},
    {OPTION_HOTPLUG,    "HotPlug",      OPTV_BOOLEAN,   {0},    TRUE},
+   {OPTION_RELAXED_FENCING,    "RelaxedFencing",       OPTV_BOOLEAN,   {0},    
TRUE},
    {-1,                        NULL,           OPTV_NONE,      {0},    FALSE}
 };
 /* *INDENT-ON* */
@@ -448,23 +450,33 @@ static void I830XvInit(ScrnInfoPtr scrn)
                   intel->colorKey);
 }
 
-static Bool has_kernel_flush(struct intel_screen_private *intel)
+static Bool drm_has_boolean_param(struct intel_screen_private *intel,
+                                 int param)
 {
        drm_i915_getparam_t gp;
        int value;
 
-       /* The BLT ring was introduced at the same time as the
-        * automatic flush for the busy-ioctl.
-        */
-
        gp.value = &value;
-       gp.param = I915_PARAM_HAS_BLT;
+       gp.param = param;
        if (drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GETPARAM, &gp))
                return FALSE;
 
        return value;
 }
 
+static Bool has_kernel_flush(struct intel_screen_private *intel)
+{
+       /* The BLT ring was introduced at the same time as the
+        * automatic flush for the busy-ioctl.
+        */
+       return drm_has_boolean_param(intel, I915_PARAM_HAS_BLT);
+}
+
+static Bool has_relaxed_fencing(struct intel_screen_private *intel)
+{
+       return drm_has_boolean_param(intel, I915_PARAM_HAS_RELAXED_FENCING);
+}
+
 static Bool can_accelerate_blt(struct intel_screen_private *intel)
 {
        if (0 && (IS_I830(intel) || IS_845G(intel))) {
@@ -630,6 +642,18 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
                           " 2D GPU acceleration disabled.\n");
        }
 
+       intel->has_relaxed_fencing =
+               xf86ReturnOptValBool(intel->Options,
+                                    OPTION_RELAXED_FENCING,
+                                    INTEL_INFO(intel)->gen >= 33);
+       /* And override the user if there is no kernel support */
+       if (intel->has_relaxed_fencing)
+               intel->has_relaxed_fencing = has_relaxed_fencing(intel);
+
+       xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
+                  "Relaxed fencing %s\n",
+                  intel->has_relaxed_fencing ? "enabled" : "disabled");
+
        /* SwapBuffers delays to avoid tearing */
        intel->swapbuffers_wait = xf86ReturnOptValBool(intel->Options,
                                                       OPTION_SWAPBUFFERS_WAIT,
diff --git a/src/intel_memory.c b/src/intel_memory.c
index 64dfd8e..763a6ad 100644
--- a/src/intel_memory.c
+++ b/src/intel_memory.c
@@ -294,8 +294,6 @@ void intel_set_gem_max_sizes(ScrnInfoPtr scrn)
 {
        intel_screen_private *intel = intel_get_screen_private(scrn);
        struct drm_i915_gem_get_aperture aperture;
-       drm_i915_getparam_t gp;
-       int ret, value;
 
        aperture.aper_available_size = 0;
        drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture);
@@ -303,9 +301,4 @@ void intel_set_gem_max_sizes(ScrnInfoPtr scrn)
        intel_set_max_bo_size(intel, &aperture);
        intel_set_max_gtt_map_size(intel, &aperture);
        intel_set_max_tiling_size(intel, &aperture);
-
-       gp.value = &value;
-       gp.param = I915_PARAM_HAS_RELAXED_FENCING;
-       ret = drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GETPARAM, &gp);
-       intel->has_relaxed_fencing = ret == 0;
 }

commit 3d2b79098ccb3fed86be66f619f4ed338741d454
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Mon Apr 11 15:20:16 2011 +0100

    dri: Rearrange code to compile against xorg-server-1.7
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/intel_dri.c b/src/intel_dri.c
index 720820f..a39b512 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -398,14 +398,6 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, 
DRI2Buffer2Ptr buffer)
 
 #endif
 
-static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer)
-{
-       if (buffer) {
-               I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
-               private->refcnt++;
-       }
-}
-
 static void
 I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
                   DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer)
@@ -553,6 +545,13 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 
 #if DRI2INFOREC_VERSION >= 4
 
+static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer)
+{
+       if (buffer) {
+               I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
+               private->refcnt++;
+       }
+}
 
 static int
 I830DRI2DrawablePipe(DrawablePtr pDraw)
@@ -1291,9 +1290,9 @@ out_complete:
        DRI2WaitMSCComplete(client, draw, target_msc, 0, 0);
        return TRUE;
 }
-#endif
 
 static int dri2_server_generation;
+#endif
 
 Bool I830DRI2ScreenInit(ScreenPtr screen)
 {
@@ -1321,6 +1320,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
                return FALSE;
        }
 
+#if DRI2INFOREC_VERSION >= 4
        if (serverGeneration != dri2_server_generation) {
            dri2_server_generation = serverGeneration;
            if (!i830_dri2_register_frame_event_resource_types()) {
@@ -1329,6 +1329,8 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
                return FALSE;
            }
        }
+#endif
+
        intel->deviceName = drmGetDeviceNameFromFd(intel->drmSubFD);
        memset(&info, '\0', sizeof(info));
        info.fd = intel->drmSubFD;

commit 4fa35dd5e13a58070220f787fc0678f1c679808d
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Mon Apr 11 10:44:55 2011 +0100

    NEWS: version bump for 2.14.903 snapshot
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/NEWS b/NEWS
index d163097..d292704 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,29 @@
+Snapshot 2.14.903 (2011-04-11)
+==============================
+This is the third release candidate in preparation for the upcoming
+2.15.0 release. We will appreciate any feedback we can get from
+testing of this snapshot.
+
+There was a bit of churn since 2.14.902 as a potential fix for a
+performance regression was tried but had to reverted when it was found to
+cause glitches running Compiz on SandyBridge. Otherwise, there were just a
+couple of fixes for building against old xservers and running on an
+obscure chipset.
+
+Bugs fixed in this snapshot (compared to 2.14.902)
+--------------------------------------------------
+
+* Prevent issuing an invalid scanline wait command
+  https://bugs.freedesktop.org/show_bug.cgi?id=35576
+
+* The 946GZ in not a 945, but a 965.
+  https://bugs.freedesktop.org/show_bug.cgi?id=35854
+
+* Fix tile sizes for gen2 (finally).
+
+* Allow building of recent dri2 changes against old xservers.
+
+
 Snapshot 2.14.902 (2011-03-29)
 ==============================
 This is the second release candidate in preparation for the upcoming
diff --git a/configure.ac b/configure.ac
index b90e071..bc9a868 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.63])
 AC_INIT([xf86-video-intel],
-        [2.14.902],
+        [2.14.903],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 97e9557619e58ef769eb7cbf1a03fbd52be7f2ed
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Fri Apr 8 13:38:48 2011 +0100

    intel: Restore manual flush for old kernels
    
    Daniel Vetter pointed out that the automagic flush by the kernel for the
    busy-ioctl was only introduced upstream in 2.6.37. So we still need to
    manually emit a flush on old kernels.
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/intel.h b/src/intel.h
index 48a7cf9..2b114c3 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -425,6 +425,8 @@ typedef struct intel_screen_private {
        Bool use_pageflipping;
        Bool force_fallback;
        Bool can_blt;
+       Bool has_kernel_flush;
+       Bool needs_flush;
        Bool use_shadow;
 
        /* Broken-out options. */
diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c
index 95eca43..289ed2b 100644
--- a/src/intel_batchbuffer.c
+++ b/src/intel_batchbuffer.c
@@ -175,6 +175,13 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn)
        intel_batch_do_flush(scrn);
 }
 
+static Bool intel_batch_needs_flush(intel_screen_private *intel)
+{
+       ScreenPtr screen = intel->scrn->pScreen;
+       PixmapPtr pixmap = screen->GetScreenPixmap(screen);
+       return intel_get_pixmap_private(pixmap)->batch_write;
+}
+
 void intel_batch_submit(ScrnInfoPtr scrn)
 {
        intel_screen_private *intel = intel_get_screen_private(scrn);
@@ -234,6 +241,8 @@ void intel_batch_submit(ScrnInfoPtr scrn)
                }
        }
 
+       intel->needs_flush |= intel_batch_needs_flush(intel);
+
        while (!list_is_empty(&intel->batch_pixmaps)) {
                struct intel_pixmap *entry;
 
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 9e01836..1b0d740 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -448,6 +448,23 @@ static void I830XvInit(ScrnInfoPtr scrn)
                   intel->colorKey);
 }
 
+static Bool has_kernel_flush(struct intel_screen_private *intel)
+{
+       drm_i915_getparam_t gp;
+       int value;
+
+       /* The BLT ring was introduced at the same time as the
+        * automatic flush for the busy-ioctl.
+        */
+
+       gp.value = &value;
+       gp.param = I915_PARAM_HAS_BLT;
+       if (drmIoctl(intel->drmSubFD, DRM_IOCTL_I915_GETPARAM, &gp))
+               return FALSE;
+
+       return value;
+}
+
 static Bool can_accelerate_blt(struct intel_screen_private *intel)
 {
        if (0 && (IS_I830(intel) || IS_845G(intel))) {
@@ -597,6 +614,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
                intel->tiling &= ~INTEL_TILING_FB;
 
        intel->can_blt = can_accelerate_blt(intel);
+       intel->has_kernel_flush = has_kernel_flush(intel);
        intel->use_shadow = !intel->can_blt;
 
        if (xf86IsOptionSet(intel->Options, OPTION_SHADOW)) {
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 24ef6fa..df3adcb 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -937,7 +937,18 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
 
 static void intel_flush_rendering(intel_screen_private *intel)
 {
-    drm_intel_bo_busy(intel->front_buffer);
+       if (intel->needs_flush == 0)
+               return;
+
+       if (intel->has_kernel_flush) {
+               intel_batch_submit(intel->scrn);
+               drm_intel_bo_busy(intel->front_buffer);
+       } else {
+               intel_batch_emit_flush(intel->scrn);
+               intel_batch_submit(intel->scrn);
+       }
+
+       intel->needs_flush = 0;
 }
 
 void intel_uxa_block_handler(intel_screen_private *intel)

commit fb40bf2b33a6d26f0e6a4e5798d10c905faa8aad
Author: Daniel Vetter <daniel.vet...@ffwll.ch>
Date:   Fri Apr 8 12:37:35 2011 +0200

    Tell users to grab i915_error_state on gpu hangs
    
    Acked-by: Chris Wilson <ch...@chris-wilson.co.uk>
    Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>

diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c
index 282d8ab..95eca43 100644
--- a/src/intel_batchbuffer.c
+++ b/src/intel_batchbuffer.c
@@ -221,6 +221,7 @@ void intel_batch_submit(ScrnInfoPtr scrn)
                        /* The GPU has hung and unlikely to recover by this 
point. */
                        if (!once) {
                                xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Detected 
a hung GPU, disabling acceleration.\n");
+                               xf86DrvMsg(scrn->scrnIndex, X_ERROR, "When 
reporting this, please include i915_error_state from debugfs and the full 
dmesg.\n");
                                
uxa_set_force_fallback(screenInfo.screens[scrn->scrnIndex], TRUE);
                                intel->force_fallback = TRUE;
                                once = 1;

commit 59ed6b05db99d7e5144f4f8499c67cee9b833673
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Thu Apr 7 15:28:46 2011 +0100

    Revert "i965: Convert to relative relocations for state"
    
    This reverts commit d2106384be6f9df498392127c3ff64d0a2b17457.
    
    Breaks compiz (but not mutter/gnome-shell) on gen6. Not sure if this is
    not seem deep interaction issue with multiple clients sharing the GPU or
    just with compiz, but for now we have to revert and suffer the inane
    performance hit. It looks suspiciously like another deferred damage
    issue...
    
    Bugzilla: 51a27e88b073cff229fff4362cb6ac22835c4044
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/i965_render.c b/src/i965_render.c
index 718e2f6..bfcd3f2 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -147,7 +147,6 @@ static void i965_get_blend_cntl(int op, PicturePtr mask, 
uint32_t dst_format,
 
 static uint32_t i965_get_dest_format(PicturePtr dest_picture)
 {
-
        switch (dest_picture->format) {
        case PICT_a8r8g8b8:
        case PICT_x8r8g8b8:
@@ -628,79 +627,6 @@ static const struct wm_kernel_info wm_kernels_gen6[] = {
 
 #undef KERNEL
 
-struct i965_static_stream {
-       uint32_t size, used;
-       uint8_t *data;
-};
-
-static int i965_static_stream_init(struct i965_static_stream *stream)
-{
-       stream->used = 0;
-       stream->size = 64*1024;
-
-       stream->data = malloc(stream->size);
-       return stream->data != NULL;
-}
-
-static uint32_t i965_static_stream_add(struct i965_static_stream *stream,
-                                      const void *data, uint32_t len, uint32_t 
align)
-{
-       uint32_t offset = ALIGN(stream->used, align);
-       if (offset + len > stream->size) {
-               do
-                       stream->size *= 2;
-               while (stream->size < offset + len);
-
-               stream->data = realloc(stream->data, stream->size);
-       }
-
-       memcpy(stream->data + offset, data, len);
-       stream->used = offset + len;
-       return offset;
-}
-
-static void *i965_static_stream_map(struct i965_static_stream *stream,
-                                   uint32_t len, uint32_t align)
-{
-       uint32_t offset = ALIGN(stream->used, align);
-       if (offset + len > stream->size) {
-               do
-                       stream->size *= 2;
-               while (stream->size < offset + len);
-
-               stream->data = realloc(stream->data, stream->size);
-       }
-
-       stream->used = offset + len;
-       return memset(stream->data + offset, 0, len);
-}
-
-static uint32_t i965_static_stream_offsetof(struct i965_static_stream *stream, 
void *ptr)
-{
-       return (uint8_t *)ptr - stream->data;
-}
-
-static drm_intel_bo *i965_static_stream_fini(struct intel_screen_private 
*intel,
-                                            struct i965_static_stream *stream)
-{


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1qc02q-0001th...@alioth.debian.org

Reply via email to