xf86-video-ati: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Wed Oct 10 21:37:15 PDT 2012


 src/radeon_dri2.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit bd9e2c064d93afbe4ab84febb2a43ae6a95ab17b
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Oct 11 14:36:11 2012 +1000

    radeon/dri2: fix damage reporting on pageflip
    
    when you use MPX or slave usb devices, the damage posting was incorrect,
    and resulted in misrendered boxes on the screen.
    
    Fix it by reporting damage correctly.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 1e04b85..f8439d2 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -907,8 +907,15 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
     struct radeon_bo *front_bo, *back_bo;
     ScreenPtr screen;
     RADEONInfoPtr info;
+    RegionRec region;
     int tmp;
 
+    region.extents.x1 = region.extents.y1 = 0;
+    region.extents.x2 = front_priv->pixmap->drawable.width;
+    region.extents.y2 = front_priv->pixmap->drawable.width;
+    region.data = NULL;
+    DamageRegionAppend(&front_priv->pixmap->drawable, &region);
+
     /* Swap BO names so DRI works */
     tmp = front->name;
     front->name = back->name;
@@ -932,15 +939,7 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
 
     radeon_glamor_exchange_buffers(front_priv->pixmap, back_priv->pixmap);
 
-    {
-        RegionRec region;
-	region.extents.x1 = region.extents.y1 = 0;
-	region.extents.x2 = front_priv->pixmap->drawable.width;
-	region.extents.y2 = front_priv->pixmap->drawable.width;
-	region.data = NULL;
-	DamageRegionAppend(&front_priv->pixmap->drawable, &region);
-	DamageRegionProcessPending(&front_priv->pixmap->drawable);
-    }
+    DamageRegionProcessPending(&front_priv->pixmap->drawable);
 }
 
 void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,


More information about the xorg-commit mailing list