Bug 45235

Summary: [uxa] large image crashes X server
Product: xorg Reporter: Bill Nottingham <notting>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium    
Version: 7.7 (2012.06)   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Bill Nottingham 2012-01-25 10:06:11 UTC
1. Download http://farm8.staticflickr.com/7151/6760135001_14c59a1490_o.jpg
2. Open it in eog
3. Oh dear, there went the X server.

Program received signal SIGBUS, Bus error.
__memcpy_ssse3_back () at
../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:820
820		movaps	%xmm9, 0x70(%rdi)
(gdb) bt
#0  __memcpy_ssse3_back ()
    at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:820
#1  0x00007f27d0da3766 in intel_uxa_pixmap_put_image (pixmap=<optimized
out>, 
    src=<optimized out>, src_pitch=32000, x=<optimized out>, 
    y=<optimized out>, w=<optimized out>, h=8)
    at /usr/include/bits/string3.h:52
#2  0x00007f27d0da4d77 in intel_uxa_put_image (pixmap=0x37de480, x=0, y=0, 
    w=<optimized out>, h=8, src=0x7f27ce703028 "", src_pitch=32000)
    at intel_uxa.c:809
#3  0x00007f27d0dc3ec4 in uxa_do_put_image (src_stride=32000, 
    bits=0x7f27ce703028 "", format=2, h=8, w=8000, y=<optimized out>, 
    x=<optimized out>, depth=<optimized out>, pGC=0x37ffb90, 
    pDrawable=0x37de480) at uxa-accel.c:160
#4  uxa_put_image (pDrawable=0x37de480, pGC=0x37ffb90, depth=<optimized
out>, 
    x=0, y=0, w=8000, h=8, leftPad=0, format=2, bits=0x7f27ce703028 "")
    at uxa-accel.c:198
#5  0x000000000050a999 in damagePutImage (pDrawable=0x37de480,
pGC=0x37ffb90, 
    depth=24, x=0, y=0, w=<optimized out>, h=8, leftPad=0, format=2, 
    pImage=0x7f27ce703028 "") at damage.c:830
#6  0x000000000043072d in ProcPutImage (client=<optimized out>)
    at dispatch.c:1999
#7  0x0000000000433ae1 in Dispatch () at dispatch.c:447
#8  0x0000000000422e15 in main (argc=<optimized out>, argv=0x7fff619374c8, 
    envp=<optimized out>) at main.c:287

xorg-x11-drv-intel-2.17.0-4.fc16.x86_64
xorg-x11-server-Xorg-1.11.3-1.fc16.x86_64
Comment 1 Chris Wilson 2012-01-25 11:43:22 UTC
Hah, I had already trimmed the maximum bo size to AGP/4 in

commit 735219cd59e6184a6622d3d429a704ca3f58b9cd
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Dec 2 10:42:00 2011 +0000

    uxa: Ensure that we can fallback with all of (src, mask, dst) as GTT mapping
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

That should be sufficient to cover this case as well.
Comment 2 Bill Nottingham 2012-01-25 13:13:52 UTC
Confirmed, the series:
85d3dc5910a2eea3a10b822e01443e11eaae9291
735219cd59e6184a6622d3d429a704ca3f58b9cd
f6c82c73b673ec3c9cce432fe38d5e0076234efd

fixes it for me.
Comment 3 Chris Wilson 2012-01-26 05:19:24 UTC
I experimented a bit with SNA to allow using such large images as a source by preventing access to them through a GTT mapping; UXA doesn't have the concept of CPU versus GPU buffers and migration. CPU usage is dramatically reduced, but the PNV box I was experimenting with, simply does have sufficient fill rate to jump through the image at 50% on an 1920x1080 screen. (Small steps, higher than 100%, are less taxing for various reasons.) However, a similar restriction on maximum GTT size applies to SNB/IVB which again may only have a 256MiB aperture and so will also benefit from loading that image into a CPU source.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.