xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Wed Oct 5 18:08:17 UTC 2016


 glamor/glamor_copy.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 1c2fcb95484777ca9aa80b3f814ad64e81f825f1
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Oct 5 08:36:21 2016 +0200

    glamor: Fix pixmap offset for bitplane in glamor_copy_fbo_cpu
    
    Commit cba28d5 - "glamor: Handle bitplane in glamor_copy_fbo_cpu"
    introduced a regression as the computed pixmap offset would not match
    the actual coordinates and write data elsewhere in memory causing a
    segfault in fbBltOne().
    
    Translate the pixmap coordinates so that the data is read and written at
    the correct location.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97974
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c
index 8a329d2..3ca56fb 100644
--- a/glamor/glamor_copy.c
+++ b/glamor/glamor_copy.c
@@ -230,20 +230,22 @@ glamor_copy_cpu_fbo(DrawablePtr src,
             goto bail;
         }
 
+        src_pix->drawable.x = -dst->x;
+        src_pix->drawable.y = -dst->y;
+
         fbGetDrawable(&src_pix->drawable, src_bits, src_stride, src_bpp, src_xoff,
                       src_yoff);
 
         if (src->bitsPerPixel > 1)
-            fbCopyNto1(src, &src_pix->drawable, gc, box, nbox,
-                       dst_xoff + dx, dst_yoff + dy, reverse, upsidedown,
-                       bitplane, closure);
+            fbCopyNto1(src, &src_pix->drawable, gc, box, nbox, dx, dy,
+                       reverse, upsidedown, bitplane, closure);
         else
-            fbCopy1toN(src, &src_pix->drawable, gc, box, nbox,
-                       dst_xoff + dx, dst_yoff + dy, reverse, upsidedown,
-                       bitplane, closure);
+            fbCopy1toN(src, &src_pix->drawable, gc, box, nbox, dx, dy,
+                       reverse, upsidedown, bitplane, closure);
 
-        glamor_upload_boxes(dst_pixmap, box, nbox, 0, 0, 0, 0,
-                            (uint8_t *) src_bits, src_stride * sizeof(FbBits));
+        glamor_upload_boxes(dst_pixmap, box, nbox, src_xoff, src_yoff,
+                            dst_xoff, dst_yoff, (uint8_t *) src_bits,
+                            src_stride * sizeof(FbBits));
         fbDestroyPixmap(src_pix);
     } else {
         fbGetDrawable(src, src_bits, src_stride, src_bpp, src_xoff, src_yoff);


More information about the xorg-commit mailing list