[Pixman] Unaligned access on PXA270 system

Siarhei Siamashka siarhei.siamashka at gmail.com
Fri Nov 19 16:39:45 PST 2010


On Saturday 20 November 2010 00:58:09 Cliff Brake wrote:
> Hello,
> 
> We ran into a performance problem with pixman 0.19.6 on a PXA270 ARM
> Linux system, where we were getting unaligned exceptions.  The
> backtrace is:
> 
> #0  bits_image_fetch_bilinear_affine (image=0x177280, offset=<value
> optimized out>, line=<value optimized out>, width=500,
> buffer=0xbeba03a0, mask=0x0) at pixman-bits-image.c:885
> ‣ #1  bits_image_fetch_bilinear_affine_none_r5g6b5 (image=0x177280,
> offset=<value optimized out>, line=<value optimized out>, width=500,
> buffer=0xbeba03a0, mask=0x0) at pixman-bits-image.c:963
> ‣ #2  0x40138440 in _pixman_image_get_scanline_32 (image=0xe4, x=228,
> y=-256, width=-65536, buffer=0xbeba03a0, mask=0x0) at
> pixman-image.c:145
> ‣ #3  0x40168908 in general_composite_rect (imp=0x20505042,
> op=3657433216, src=Cannot access memory at address 0x88) at
> pixman-general.c:219
> ‣ #4  0x4016a458 in pixman_image_composite32 (op=PIXMAN_OP_SRC,
> src=0x177280, mask=0x0, dest=0x177370, src_x=11, src_y=200, mask_x=0,
> mask_y=0, dest_x=20, dest_y=400, width=500, height=33) at pixman.c:839
> ‣ #5  0x0005f4a8 in fbComposite ()
> ‣ #6  0x000cc048 in damageComposite ()
> ‣ #7  0x000b6420 in CompositePicture ()
> ‣ #8  0x000bc1a0 in ProcRenderComposite ()
> ‣ #9  0x000b9250 in ProcRenderDispatch ()
> ‣ #10 0x00097db8 in XaceCatchExtProc ()
> ‣ #11 0x0002d5e0 in Dispatch ()
> ‣ #12 0x00014604 in main ()
> 
> With pixman 0.20.0, we don't see the problem.  Just wanted to report
> in case there might still be something lurking.

Thanks for your report. I think I know where it might come from. And yes, if
that's the case, the problem is still there in 0.20.0 and in pixman git. Could
you please test the following patch (on the version of pixman that was
failing) to see if it helps?

diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
index 4d234a0..2a2021d 100644
--- a/pixman/pixman-general.c
+++ b/pixman/pixman-general.c
@@ -56,8 +56,8 @@ general_composite_rect  (pixman_implementation_t *imp,
                          int32_t                  width,
                          int32_t                  height)
 {
-    uint8_t stack_scanline_buffer[SCANLINE_BUFFER_LENGTH * 3];
-    uint8_t *scanline_buffer = stack_scanline_buffer;
+    uint64_t stack_scanline_buffer[(SCANLINE_BUFFER_LENGTH * 3 + 7) / 8];
+    uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer;
     uint8_t *src_buffer, *mask_buffer, *dest_buffer;
     fetch_scanline_t fetch_src = NULL, fetch_mask = NULL, fetch_dest = NULL;
     pixman_combine_32_func_t compose;



More information about the Pixman mailing list