Bug 20286 - [945GM UXA] Some xdemos with tiling on will crash X
Summary: [945GM UXA] Some xdemos with tiling on will crash X
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: highest critical
Assignee: Jesse Barnes
QA Contact:
Keywords: NEEDINFO
Depends on:
Blocks: intel-3d-release
  Show dependency treegraph
Reported: 2009-02-23 23:16 UTC by zhao jian
Modified: 2009-03-17 19:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

xorg.conf (3.81 KB, text/plain)
2009-02-23 23:16 UTC, zhao jian
xorg.0.log (49.54 KB, text/plain)
2009-02-23 23:16 UTC, zhao jian
dmesg of the system crashed by xdemos (26.95 KB, text/plain)
2009-02-25 04:35 UTC, zhao jian

Description zhao jian 2009-02-23 23:16:11 UTC
Created attachment 23245 [details]

System Environment:
Platform:               945gm
Arch:           i386
OSD:            Fedora release 9 (Sulphur)
Libdrm:         (master)4a0d19ef4f210cea9e60c5acc355df03723ef808
Mesa:            (mesa_7_4_branch)e2092bb23c956ba9ab940935f803ef843db81af2
Xserver:         (server-1.6-branch)4557b3f6c4273cd83b701beaf7a150c806fed298
Xf86_video_intel:  (master)81c652e9a666a7459bcc5217c8a5ec518b6e00da
Kernel:           (for-airlied)66647dc60d16fae9f6963fd98b6d9baa1a8dac69

Bug Description:
In UXA mode, set the tiling on, run the glthreads and manywin with './glthreads(manywin) -n 8' then the X was crashed. But if set the tiling off, glthreads runs well and manywin will be the same as bug #20052.      

Reproduce Steps:
1. enable tiling
2. xinit&
3. mesa/progs/xdemos/manywin -n 8  (or mesa/progs/xdemos/glthreads -n 8)
Comment 1 zhao jian 2009-02-23 23:16:52 UTC
Created attachment 23246 [details]
Comment 2 zhao jian 2009-02-23 23:32:42 UTC
Its backtrace: 
(gdb) bt
#0  0xb80d7424 in __kernel_vsyscall ()
#1  0x03200c89 in ioctl () from /lib/libc.so.6
#2  0xb7e13783 in drmIoctl (fd=13, request=25688, arg=0x0) at xf86drm.c:187
#3  0xb7e13902 in drmCommandNone (fd=13, drmCommandIndex=24) at xf86drm.c:2313
#4  0xb7d9e85f in I830BlockHandler (i=0, blockData=0x0, pTimeout=0xbffd70c8,
    pReadmask=0x81df3a0) at i830_driver.c:2729
#5  0x0816a98e in AnimCurScreenBlockHandler (screenNum=0, blockData=0x0,
    pTimeout=0xbffd70c8, pReadmask=0x81df3a0) at animcur.c:222
#6  0x08136725 in compBlockHandler (i=0, blockData=0x0, pTimeout=0xbffd70c8,
    pReadmask=0x81df3a0) at compinit.c:158
#7  0x08089f1a in BlockHandler (pTimeout=0xbffd70c8, pReadmask=0x81df3a0)
    at dixutils.c:384
#8  0x081245e0 in WaitForSomething (pClientsReady=0x85033b0) at WaitFor.c:215
#9  0x0808637d in Dispatch () at dispatch.c:367
#10 0x0806c55d in main (argc=2, argv=0xbffd7214, envp=Cannot access memory at address 0x6460
) at main.c:397
Comment 3 zhao jian 2009-02-25 04:35:38 UTC
Created attachment 23281 [details]
dmesg of the system crashed by xdemos
Comment 4 zhao jian 2009-02-25 04:48:40 UTC
I tested these xdemos again only change the kernel to the 2.6.28(has some patches on its release), it runs well. So it probably relates to the kernel change. And I will continue to try with the kernels after that. 
Comment 5 zhao jian 2009-03-05 00:21:09 UTC
I find it was caused by the commit 0f973f27888e4664b253ab2cf69c67c2eb80ab1b in the for-airlied branch. 
Comment 6 zhao jian 2009-03-05 00:46:02 UTC
The commit's detail is as following:

commit 0f973f27888e4664b253ab2cf69c67c2eb80ab1b
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Mon Jan 26 17:10:45 2009 -0800

    drm/i915: add fence register management to execbuf

    Adds code to set up fence registers at execbuf time on pre-965 chips as
    necessary.  Also fixes up a few bugs in the pre-965 tile register support
    (get_order != ffs).  The number of fences available to the kernel defaults
    to the hw limit minus 3 (for legacy X front/back/depth), but a new  
    parameter allows userspace to override that as needed.
Comment 7 Gordon Jin 2009-03-10 06:31:38 UTC
reassign to Jesse.
Comment 8 zhao jian 2009-03-10 23:52:28 UTC
Only glxcontexts under xdemo also has such problem. Others such as glxgears, glxinfo, glxpixmap, texture_from_pixmap, xfont are OK. 
Comment 9 Eric Anholt 2009-03-11 15:57:39 UTC
May or may not be fixed by:

commit dc529a4fe1ae4667c819437a94185e8581e1e680
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Mar 10 22:34:49 2009 -0700

    drm/i915: fix 945 fence register writes for fence 8 and above.
    The last 8 fence registers sit at a different offset, so when we went to set
    fence number 8 in the lower offset, we instead set PGETBL_CTL, and the GPU
    got all sorts of angry at us.
    fd.o bug #20567.  Easily reproducible by running glxgears and killing it about
    6 times.
    Signed-off-by: Eric Anholt <eric@anholt.net>

Comment 10 Jesse Barnes 2009-03-16 14:07:20 UTC
Jian, have you had a chance to try a newer kernel with the fix Eric mentioned?
Comment 11 zhao jian 2009-03-17 02:36:58 UTC
(In reply to comment #10)
> Jian, have you had a chance to try a newer kernel with the fix Eric mentioned?
Yes. I tried with commit dc529a4fe1ae4667c819437a94185e8581e1e680. Now glthreads runs well and manywin will be the same as bug #20052. 

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.