ChangeLog        |  117 +++++++++++++++++++++++++++++++++++++++++++
 NEWS             |   40 ++++++++++++++
 configure.ac     |    2 
 debian/changelog |    6 ++
 src/i830_dri.c   |    5 +
 src/i830_uxa.c   |  149 ++++++++++++++++++++++++++++++++-----------------------
 uxa/Makefile.am  |    5 -
 uxa/uxa-render.c |   22 +++++++-
 8 files changed, 280 insertions(+), 66 deletions(-)

New commits:
commit 9488748e00a2dfc1a563d38dbc477d1b0dc97d9d
Author: Brice Goglin <bgog...@debian.org>
Date:   Tue Mar 30 07:04:57 2010 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 0cec073..e2b7b7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-video-intel (2:2.11.0-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.11.0-1) experimental; urgency=low
 
   * New upstream release.
 
- -- Brice Goglin <bgog...@debian.org>  Tue, 30 Mar 2010 07:01:06 +0200
+ -- Brice Goglin <bgog...@debian.org>  Tue, 30 Mar 2010 07:04:52 +0200
 
 xserver-xorg-video-intel (2:2.10.903-1) experimental; urgency=low
 

commit ee3510dc2f48f22addbe9e658eedfdcda4374add
Author: Brice Goglin <bgog...@debian.org>
Date:   Tue Mar 30 07:04:50 2010 +0200

    New upstream release

diff --git a/ChangeLog b/ChangeLog
index 20a5740..988698a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,120 @@
+commit 440b4d207b730112169827d0b90b46596659b504
+Author: Carl Worth <cwo...@cworth.org>
+Date:   Mon Mar 29 11:20:20 2010 -0700
+
+    Increase version to 2.11.0
+    
+    In preparation for release.
+
+commit 1119c4523889ddedecf1722f0e9a2e4a7ad326b2
+Author: Carl Worth <cwo...@cworth.org>
+Date:   Mon Mar 29 11:19:31 2010 -0700
+
+    NEWS: Add release notes for the 2.11.0 release.
+    
+    Hurrah! We made it.
+
+commit df3b26847914557eb3c9c70732d91169b1936d77
+Author: Jesse Barnes <jbar...@virtuousgeek.org>
+Date:   Fri Mar 26 10:44:55 2010 -0700
+
+    DRI2: release our private front buffer ref when buffer swapping
+    
+    Pauli pointed out that we take a ref on the front buffer when exchanging
+    but forget to release it.  The ref is necessary since the set functions
+    will drop refs as necessary, but once we set the front buffer to point
+    at the back pixmap, we ned to release our private ref again, or we'll
+    leak buffers.
+    
+    Reported-by: Pauli Nieminen <suok...@gmail.com>
+    Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>
+
+commit 362a49e71fc41541b6dc121660d98e29da4b14e8
+Author: Gaetan Nadon <mems...@videotron.ca>
+Date:   Thu Mar 25 10:07:41 2010 -0400
+
+    uxa make: remove unused XORG_INCS and DIX_CFLAGS variables
+    
+    Most likely copied from xserver makefile.
+    
+    Acked-by: Dan Nicholson <dbn.li...@gmail.com>
+    Signed-off-by: Gaetan Nadon <mems...@videotron.ca>
+
+commit 0d1ac4da5288a621d0493cb109fcd1e040e6c5a7
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Thu Mar 25 09:12:09 2010 +0000
+
+    uxa: Perform the xrgb -> argb conversion not inplace
+    
+    After reports of segmentation faults caused by
+    d6b7f96fde1add92fd11f5a75869ae6fc688bf77 and vmware, the most obvious
+    cause would be illegally writing to the src data when performing the alpha
+    fill inline. So force the image upload to go via a fresh buffer whenever
+    we need to modify the incoming data.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+    Reported-and-tested-by: Jeff Chua <jeff.chua.li...@gmail.com>
+
+commit 0c47195ca805881e3fbd5b9224be5c930feeeb8c
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Wed Mar 24 17:37:39 2010 +0000
+
+    i830: Clip solid fills to surface.
+    
+    There is a reasonable surfeit of evidence to support this error,
+    for instance: http://bugs.freedesktop.org/attachment.cgi?id=34417
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 5537079c29a56133446f1874d24d9e6516825edb
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Wed Mar 24 14:59:20 2010 +0000
+
+    uxa: After filling the alpha channel xrgb src is compatible with argb dst.
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 90a971c60769781f53827b469a9be3aab14cf71c
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Wed Mar 24 14:50:45 2010 +0000
+
+    uxa: Only reduce a composite to a BLT if it is wholly contained
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+
+commit 2eec53d0b9232970fe3d03ce6c8940ebeea44bee
+Author: Chris Wilson <ch...@chris-wilson.co.uk>
+Date:   Tue Mar 23 17:28:22 2010 +0000
+
+    uxa: Default to using TILING_X for pixmaps.
+    
+    On memory constrained hardware, tiling is vital for good performance as
+    it minimizes cache misses.  The downside is that for older hardware
+    (which often suffers from the lack of bandwidth) requires the use of
+    fences for many operations, which are in short supply and so may cause
+    shorter batchbuffers. However our batch buffers are typically short and
+    so this is unlikely to be a concern and not affect the performance wins.
+    
+    A quick bit of testing suggests the effect is inconclusive on
+    firefox/i945:
+                      linear            tiled
+      xcb             205.470           206.219
+      xcb-render-0.0  404.704           388.413
+      xlib            166.410           170.805
+    
+    A secondary effect of the patch is to workaround a G31 specific hang
+    when attempting to use linear 2048x2048 surfaces. Bonus!
+    
+    Fixes:
+      Bug 25375 - Performance issue using texture from pixmap (tfp) glx 
extension on 945
+      http://bugs.freedesktop.org/show_bug.cgi?id=25375
+    
+      Bug 27100 - GPU Hung copying a 2048x1152 pixmap
+      http://bugs.freedesktop.org/show_bug.cgi?id=27100
+    
+    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
+    Tested-by: John <jvi...@gmail.com>
+
 commit 9c037f61a490c96f9095f7ff3fecbf41f5efe9f7
 Author: Carl Worth <cwo...@cworth.org>
 Date:   Mon Mar 22 15:23:04 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index af3f09c..0cec073 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.11.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Brice Goglin <bgog...@debian.org>  Tue, 30 Mar 2010 07:01:06 +0200
+
 xserver-xorg-video-intel (2:2.10.903-1) experimental; urgency=low
 
   * New upstream release candidate.

commit 440b4d207b730112169827d0b90b46596659b504
Author: Carl Worth <cwo...@cworth.org>
Date:   Mon Mar 29 11:20:20 2010 -0700

    Increase version to 2.11.0
    
    In preparation for release.

diff --git a/configure.ac b/configure.ac
index 108e283..45663c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.10.903,
+        2.11.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit 1119c4523889ddedecf1722f0e9a2e4a7ad326b2
Author: Carl Worth <cwo...@cworth.org>
Date:   Mon Mar 29 11:19:31 2010 -0700

    NEWS: Add release notes for the 2.11.0 release.
    
    Hurrah! We made it.

diff --git a/NEWS b/NEWS
index 8fdf442..d6adb2e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,43 @@
+Release 2.11.0 (2010-03-29)
+===========================
+New in 2.11: DRI2 and page flipping
+-----------------------------------
+The most significant new feature of this release is support for new
+DRI2 APIs, allowing page flipping to occur for swaps that are
+full-screen and not rotated.
+
+Performance improvements in 2.11 compared to 2.10
+-------------------------------------------------
+Dramatically improved performance of large pixmaps on
+memory-constrained hardware, (such as 945), by using tiling.
+Note that this fix is new since the most recent release
+candidate for this release (2.10.903).
+
+    https://bugs.freedesktop.org/show_bug.cgi?id=25375
+
+Elimination of software fallback with alpha-only pixmap (a fix which
+eliminated a full second from the Moblin boot time):
+
+    https://bugs.freedesktop.org/show_bug.cgi?id=26189
+
+Notable bug fixes in 2.11 compared to 2.10
+------------------------------------------
+Fix for undesired black borders on some images, (caued several
+problems with firefox):
+
+    http://bugs.freedesktop.org/show_bug.cgi?id=17933
+
+And other fixes to provide more conformance with existing
+software-rendering, (as measures by the cairo test suite), such as the
+sampling location for nearest-neighbor sampling.
+
+Other changes
+-------------
+Eric Anholt and Daniel Vetter both removed large piles of old and
+useless code now that the driver requires kernel modesetting
+(KMS). This continues to reduce the mainteance burden of the driver,
+making it easier to isolate and fix bugs.
+
 Snapshot 2.10.903 (2010-03-22)
 ==============================
 Some notable bug fixes

commit df3b26847914557eb3c9c70732d91169b1936d77
Author: Jesse Barnes <jbar...@virtuousgeek.org>
Date:   Fri Mar 26 10:44:55 2010 -0700

    DRI2: release our private front buffer ref when buffer swapping
    
    Pauli pointed out that we take a ref on the front buffer when exchanging
    but forget to release it.  The ref is necessary since the set functions
    will drop refs as necessary, but once we set the front buffer to point
    at the back pixmap, we ned to release our private ref again, or we'll
    leak buffers.
    
    Reported-by: Pauli Nieminen <suok...@gmail.com>
    Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 7c595dd..321faf6 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -446,12 +446,17 @@ I830DRI2ExchangeBuffers(DrawablePtr draw, DRI2BufferPtr 
front,
        back->name = tmp;
 
        /* Swap pixmap bos */
+
+       /* Hold a ref on the front so the set calls below don't destroy it */
        dri_bo_reference(i830_get_pixmap_bo(front_priv->pixmap));
 
        tmp_bo = i830_get_pixmap_bo(front_priv->pixmap);
        i830_set_pixmap_bo(front_priv->pixmap,
                           i830_get_pixmap_bo(back_priv->pixmap));
        i830_set_pixmap_bo(back_priv->pixmap, tmp_bo); /* should be screen */
+
+       /* Release our ref, the last set should have bumped it */
+       dri_bo_unreference(tmp_bo);
 }
 
 /*

commit 362a49e71fc41541b6dc121660d98e29da4b14e8
Author: Gaetan Nadon <mems...@videotron.ca>
Date:   Thu Mar 25 10:07:41 2010 -0400

    uxa make: remove unused XORG_INCS and DIX_CFLAGS variables
    
    Most likely copied from xserver makefile.
    
    Acked-by: Dan Nicholson <dbn.li...@gmail.com>
    Signed-off-by: Gaetan Nadon <mems...@videotron.ca>

diff --git a/uxa/Makefile.am b/uxa/Makefile.am
index 0dfad48..c875b63 100644
--- a/uxa/Makefile.am
+++ b/uxa/Makefile.am
@@ -4,10 +4,7 @@ noinst_LTLIBRARIES = libuxa.la
 # built (in hw/xfree86/os-support/solaris) until after UXA is built
 SOLARIS_ASM_CFLAGS=""
 
-INCLUDES = \
-       $(XORG_INCS)
-
-AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS)
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS)
 
 libuxa_la_SOURCES = \
        uxa.c \

commit 0d1ac4da5288a621d0493cb109fcd1e040e6c5a7
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Thu Mar 25 09:12:09 2010 +0000

    uxa: Perform the xrgb -> argb conversion not inplace
    
    After reports of segmentation faults caused by
    d6b7f96fde1add92fd11f5a75869ae6fc688bf77 and vmware, the most obvious
    cause would be illegally writing to the src data when performing the alpha
    fill inline. So force the image upload to go via a fresh buffer whenever
    we need to modify the incoming data.
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
    Reported-and-tested-by: Jeff Chua <jeff.chua.li...@gmail.com>

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 3af4042..589e16d 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -650,6 +650,54 @@ static void i830_uxa_finish_access(PixmapPtr pixmap)
        pixmap->devPrivate.ptr = NULL;
 }
 
+static Bool i830_bo_put_image(PixmapPtr pixmap, dri_bo *bo, char *src, int 
src_pitch, int w, int h)
+{
+       int stride = i830_pixmap_pitch(pixmap);
+
+       /* fill alpha channel */
+       if (pixmap->drawable.depth == 24) {
+               pixman_image_t *src_image, *dst_image;
+
+               src_image = pixman_image_create_bits (PIXMAN_x8r8g8b8,
+                                                     w, h,
+                                                     (uint32_t *) src, 
src_pitch);
+
+               dst_image = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+                                                     w, h,
+                                                     (uint32_t *) bo->virtual, 
stride);
+
+               if (src_image && dst_image)
+                       pixman_image_composite (PictOpSrc,
+                                               src_image, NULL, dst_image,
+                                               0, 0,
+                                               0, 0,
+                                               0, 0,
+                                               w, h);
+
+               if (src_image)
+                       pixman_image_unref (src_image);
+
+               if (dst_image)
+                       pixman_image_unref (dst_image);
+
+               if (src_image == NULL || dst_image == NULL)
+                       return FALSE;
+       } else if (src_pitch == stride) {
+               memcpy (bo->virtual, src, stride * h);
+       } else {
+               char *dst = bo->virtual;
+               int row_length = w * pixmap->drawable.bitsPerPixel/8;
+               int num_rows = h;
+               while (num_rows--) {
+                       memcpy (dst, src, row_length);
+                       src += src_pitch;
+                       dst += stride;
+               }
+       }
+
+       return TRUE;
+}
+
 static Bool
 i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
                                   char *src, int src_pitch)
@@ -662,6 +710,7 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
        int stride;
        int w = pixmap->drawable.width;
        int h = pixmap->drawable.height;
+       Bool ret;
 
        priv = i830_get_pixmap_intel(pixmap);
 
@@ -702,22 +751,11 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
                return FALSE;
        }
 
-       if (src_pitch == stride) {
-               memcpy (bo->virtual, src, src_pitch * h);
-       } else {
-               char *dst = bo->virtual;
-
-               w *= pixmap->drawable.bitsPerPixel/8;
-               while (h--) {
-                       memcpy (dst, src, w);
-                       src += src_pitch;
-                       dst += stride;
-               }
-       }
+       ret = i830_bo_put_image(pixmap, bo, src, src_pitch, w, h);
 
        drm_intel_gem_bo_unmap_gtt(bo);
 
-       return TRUE;
+       return ret;
 }
 
 static Bool i830_uxa_put_image(PixmapPtr pixmap,
@@ -733,33 +771,6 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
        GCPtr gc;
        Bool ret;
 
-       if (pixmap->drawable.depth == 24) {
-           /* fill alpha channel */
-           pixman_image_t *src_image, *dst_image;
-
-           src_image = pixman_image_create_bits (PIXMAN_x8r8g8b8,
-                                                 w, h,
-                                                 (uint32_t *) src, src_pitch);
-
-           dst_image = pixman_image_create_bits (PIXMAN_a8r8g8b8,
-                                                 w, h,
-                                                 (uint32_t *) src, src_pitch);
-
-           if (src_image && dst_image)
-               pixman_image_composite (PictOpSrc,
-                                       src_image, NULL, dst_image,
-                                       0, 0,
-                                       0, 0,
-                                       0, 0,
-                                       w, h);
-
-           if (src_image)
-               pixman_image_unref (src_image);
-
-           if (dst_image)
-               pixman_image_unref (dst_image);
-       }
-
        if (x == 0 && y == 0 &&
            w == pixmap->drawable.width &&
            h == pixmap->drawable.height)
@@ -770,9 +781,10 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
        }
 
        priv = i830_get_pixmap_intel(pixmap);
-       if (priv->batch_read_domains || drm_intel_bo_busy(priv->bo)) {
+       if (priv->batch_read_domains ||
+           drm_intel_bo_busy(priv->bo) ||
+           pixmap->drawable.depth == 24) {
                dri_bo *bo;
-               int stride;
 
                /* Partial replacement, copy incoming image to a bo and blit. */
                scratch = (*screen->CreatePixmap)(screen, w, h,
@@ -789,22 +801,15 @@ static Bool i830_uxa_put_image(PixmapPtr pixmap,
                        return FALSE;
                }
 
-               stride = i830_pixmap_pitch(scratch);
-               if (src_pitch == stride) {
-                       memcpy (bo->virtual, src, stride * h);
-               } else {
-                       char *dst = bo->virtual;
-                       int row_length = w * pixmap->drawable.bitsPerPixel/8;
-                       int num_rows = h;
-                       while (num_rows--) {
-                               memcpy (dst, src, row_length);
-                               src += src_pitch;
-                               dst += stride;
-                       }
-               }
+               ret = i830_bo_put_image(scratch, bo, src, src_pitch, w, h);
 
                drm_intel_gem_bo_unmap_gtt(bo);
                scratch_pixmap = FALSE;
+
+               if (!ret) {
+                       (*screen->DestroyPixmap) (scratch);
+                       return FALSE;
+               }
        } else {
                /* bo is not busy so can be mapped without a stall, upload 
in-place. */
                scratch = GetScratchPixmapHeader(screen, w, h,

commit 0c47195ca805881e3fbd5b9224be5c930feeeb8c
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Wed Mar 24 17:37:39 2010 +0000

    i830: Clip solid fills to surface.
    
    There is a reasonable surfeit of evidence to support this error,
    for instance: http://bugs.freedesktop.org/attachment.cgi?id=34417
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 22792fe..3af4042 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -264,6 +264,15 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int 
y1, int x2, int y2)
        unsigned long pitch;
        uint32_t cmd;
 
+       if (x1 < 0)
+               x1 = 0;
+       if (y1 < 0)
+               y1 = 0;
+       if (x2 > pixmap->drawable.width)
+               x2 = pixmap->drawable.width;
+       if (y2 > pixmap->drawable.height)
+               y2 = pixmap->drawable.height;
+
        pitch = i830_pixmap_pitch(pixmap);
 
        {

commit 5537079c29a56133446f1874d24d9e6516825edb
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Wed Mar 24 14:59:20 2010 +0000

    uxa: After filling the alpha channel xrgb src is compatible with argb dst.
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index bcfe20e..30934d0 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -963,6 +963,10 @@ compatible_formats (CARD8 op, PicturePtr dst, PicturePtr 
src)
 
                if (src->format == PICT_a8b8g8r8 && dst->format == 
PICT_x8b8g8r8)
                        return 1;
+
+               /* xrgb is promoted to argb during image upload... */
+               if (dst->format == PICT_a8r8g8b8 && src->format == 
PICT_x8r8g8b8)
+                       return 1;
        } else if (op == PictOpOver) {
                if (src->alphaMap || dst->alphaMap)
                        return 0;

commit 90a971c60769781f53827b469a9be3aab14cf71c
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Wed Mar 24 14:50:45 2010 +0000

    uxa: Only reduce a composite to a BLT if it is wholly contained
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index ca46a2a..bcfe20e 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -977,6 +977,21 @@ compatible_formats (CARD8 op, PicturePtr dst, PicturePtr 
src)
        return 0;
 }
 
+static int
+drawable_contains (DrawablePtr drawable, int x1, int y1, int x2, int y2)
+{
+       if (x1 < 0 || y1 < 0)
+               return FALSE;
+
+       if (x2 > drawable->width)
+               return FALSE;
+
+       if (y2 > drawable->height)
+               return FALSE;
+
+       return TRUE;
+}
+
 void
 uxa_composite(CARD8 op,
              PicturePtr pSrc,
@@ -1026,7 +1041,8 @@ uxa_composite(CARD8 op,
                                                                width, height);
                                if (ret == 1)
                                        goto done;
-                       } else if (!pSrc->repeat && !pSrc->transform) {
+                       } else if (!pSrc->repeat && !pSrc->transform &&
+                                  drawable_contains(pSrc->pDrawable, xSrc, 
ySrc, xSrc + width, ySrc + height)) {
                                xDst += pDst->pDrawable->x;
                                yDst += pDst->pDrawable->y;
                                xSrc += pSrc->pDrawable->x;

commit 2eec53d0b9232970fe3d03ce6c8940ebeea44bee
Author: Chris Wilson <ch...@chris-wilson.co.uk>
Date:   Tue Mar 23 17:28:22 2010 +0000

    uxa: Default to using TILING_X for pixmaps.
    
    On memory constrained hardware, tiling is vital for good performance as
    it minimizes cache misses.  The downside is that for older hardware
    (which often suffers from the lack of bandwidth) requires the use of
    fences for many operations, which are in short supply and so may cause
    shorter batchbuffers. However our batch buffers are typically short and
    so this is unlikely to be a concern and not affect the performance wins.
    
    A quick bit of testing suggests the effect is inconclusive on
    firefox/i945:
                      linear            tiled
      xcb             205.470           206.219
      xcb-render-0.0  404.704           388.413
      xlib            166.410           170.805
    
    A secondary effect of the patch is to workaround a G31 specific hang
    when attempting to use linear 2048x2048 surfaces. Bonus!
    
    Fixes:
      Bug 25375 - Performance issue using texture from pixmap (tfp) glx 
extension on 945
      http://bugs.freedesktop.org/show_bug.cgi?id=25375
    
      Bug 27100 - GPU Hung copying a 2048x1152 pixmap
      http://bugs.freedesktop.org/show_bug.cgi?id=27100
    
    Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
    Tested-by: John <jvi...@gmail.com>

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index fec5378..22792fe 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -135,8 +135,20 @@ i830_uxa_pixmap_compute_size(PixmapPtr pixmap,
                pitch_align = intel->accel_pixmap_pitch_alignment;
                size = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) / 8,
                                pitch_align) * ALIGN (h, 2);
-               if (size < 4096)
+               if (!IS_I965G(intel)) {
+                       /* Older hardware requires fences to be pot size
+                        * aligned with a minimum of 1 MiB, so causes
+                        * massive overallocation for small textures.
+                        */
+                       if (size < 1024*1024/2)
+                               *tiling = I915_TILING_NONE;
+               } else if (size <= 4096) {
+                       /* Disable tiling beneath a page size, we will not see
+                        * any benefit from reducing TLB misses and instead
+                        * just incur extra cost when we require a fence.
+                        */
                        *tiling = I915_TILING_NONE;
+               }
        }
 
   repeat:
@@ -863,11 +875,14 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, 
int depth,
                        return NullPixmap;
                }
 
-               if (usage == INTEL_CREATE_PIXMAP_TILING_X)
-                       priv->tiling = I915_TILING_X;
-               else if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
+               /* Always attempt to tile, compute_size() will remove the
+                * tiling for pixmaps that are either too large or too small
+                * to be effectively tiled.
+                */
+               priv->tiling = I915_TILING_X;
+               if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
                        priv->tiling = I915_TILING_Y;
-               else
+               if (usage == UXA_CREATE_PIXMAP_FOR_MAP)
                        priv->tiling = I915_TILING_NONE;
 
                size = i830_uxa_pixmap_compute_size(pixmap, w, h,


-- 
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/e1nwgta-0008bg...@alioth.debian.org

Reply via email to