Bug 13640

Summary: quake 3 failure due to "DRM_I830_EXECBUFFER: -16"
Product: Mesa Reporter: Alex <alex.shi>
Component: OtherAssignee: Eric Anholt <eric>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium CC: gordon.jin, shuang.he
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: xorg.conf
quake 3 log msg
xorg.0.log
q3demo's output
xorg.0.log

Description Alex 2007-12-13 02:24:53 UTC
the detailed failure status is:
1, after start “X” and “xterm” by root user, I start “q3demo”, but this program crash my system. The screen have nothing output. 
2. after kill q3demo.x86, the X  and xterm can be recoverd.  

The X system version is as below:

Xserver: 

commit eab0c4e49015fe96f6d985316f9c5fa28a7eb1fe

 

drm: 

commit 7dcaf0cdbb57dcf85aa8798736948c280d3966b2

 

xf86-video-intel:

commit e03bc385e924222d3d5f3c9a8d65e1ef63b858dc

 

mesa:

commit 00e10a1385bfd376f5f45ad94e3543ac87f15de8

 


quake 3 output
=======
[intelInitDriver:496] Failed to init TTM buffer manager, falling back to classic.
Using 8/8/8 Color bits, 24 depth, 0 stencil display.
Initializing OpenGL extensions
Comment 1 Alex 2007-12-13 02:26:50 UTC
Created attachment 13088 [details]
xorg.conf
Comment 2 Alex 2007-12-13 02:27:20 UTC
Created attachment 13089 [details]
quake 3 log msg
Comment 3 Alex 2007-12-13 02:27:44 UTC
Created attachment 13090 [details]
xorg.0.log
Comment 4 Gordon Jin 2007-12-18 01:32:22 UTC
q3demo is running fine on our Q965 with the latest git code.
Comment 5 Alex 2007-12-18 01:45:28 UTC
which the commit number are you using for those X components?  
Or it is just the Q965 is different from my 965GM chipset? 
Comment 6 Alex 2007-12-18 01:47:26 UTC
Forget to mention my base system is FC8 IA32. of cause, the whole X system use upstream tree. 
Comment 7 Alex 2007-12-18 23:32:48 UTC
Created attachment 13207 [details]
q3demo's output
Comment 8 Alex 2007-12-18 23:33:20 UTC
I have tried the latest X system and installed the ko file in drm, The TTM error was not be output. and the q3demo can be opened but it fail quickly and output a error:

DRM_I830_EXECBUFFER: -16

The mesa version: 4cca760a9b7fe120ed92257a6a6c4a3a6e929ba8 
The DRM version: 2db6400396ea5c8a5ce54fe9e211b9d01a11d506
Xf86-video-intel version: f69b48fe24ef94dac44b8123884ca71df675be4b
Xserver version: bcad2a5a24f30cfdf9eca31915ed5a55ed094285
Comment 9 Alex 2007-12-18 23:34:44 UTC
add Gordon to CC list 
Comment 10 Alex 2007-12-19 01:21:38 UTC
Created attachment 13213 [details]
xorg.0.log
Comment 11 Alex 2007-12-20 01:37:52 UTC
This bug also be found at G33 Video on x86_64 platform. 
the openarena or quake3 game also failed on this bug. 
Comment 12 Alex 2007-12-20 06:13:12 UTC
Eric:
I am quite a newbie on X system.
The function stack of this bug is : 
drmCommandWriteRead
intel_exec_ioctl
do_flush_locked
intel_batchbuffer_flush
and I found you do changes on drmCommandWriteRead. Does this change cause the issue? 

Alex 
commit 7c71ef3a3d0cf2620525f468960cdc76a0fb0d33
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Dec 12 10:25:19 2007 -0800

    [intel] Move bufmgr back to context instead of screen, fixing glthreads.

    Putting the bufmgr in the screen is not thread-safe since the emit_reloc
    changes.  It also led to a significant performance hit from pthread usage
    for the attempted thread-safety (up to 12% of a cpu spent on refcounting
    protection in single-threaded 965).  The motivation had been to allow
    multi-context bufmgr sharing in classic mode, but it wasn't worth the cost.

diff --git a/src/mesa/drivers/dri/i915/intel_ioctl.c b/src/mesa/drivers/dri/i915/intel_ioctl.c
index 94f7e73..37704d6 100644
--- a/src/mesa/drivers/dri/i915/intel_ioctl.c
+++ b/src/mesa/drivers/dri/i915/intel_ioctl.c
@@ -47,15 +47,14 @@
 #define FILE_DEBUG_FLAG DEBUG_IOCTL

 int
-intelEmitIrqLocked(intelScreenPrivate *intelScreen)
+intelEmitIrqLocked(struct intel_context *intel)
 {
    drmI830IrqEmit ie;
    int ret, seq;

    ie.irq_seq = &seq;

-   ret = drmCommandWriteRead(intelScreen->driScrnPriv->fd,
-                            DRM_I830_IRQ_EMIT, &ie, sizeof(ie));
+   ret = drmCommandWriteRead(intel->driFd, DRM_I830_IRQ_EMIT, &ie, sizeof(ie));
    if (ret) {
       fprintf(stderr, "%s: drmI830IrqEmit: %d\n", __FUNCTION__, ret);
       exit(1);
@@ -67,7 +66,7 @@ intelEmitIrqLocked(intelScreenPrivate *intelScreen)
 }
Comment 13 Eric Anholt 2007-12-20 07:33:49 UTC
If you think it's that commit, did you try checking out just before it to see if 
that fixes your problem?  git-bisect is a tool to help you track down what commit broke things.
Comment 14 WuNian 2007-12-20 16:51:06 UTC
Is this duplicated with bug #13732?
q3demo only has 32-bit binary. And, Alex, you also met this bug on 64-bit system, right?
Comment 15 Shuang He 2007-12-20 17:05:14 UTC
I agree with Nian
Alex, is your system x86-64?
Comment 16 Alex 2007-12-20 17:28:26 UTC
re-clarify the bug scenes. I have met the problem twice:
1, 32bits q3demo on G965 with IA32 kernel
2, 64bits openarena on G33 with IA32e kernel. 

Alex 
Comment 17 Michael Fu 2007-12-24 16:47:38 UTC
should be a dup of bug# 13732...

*** This bug has been marked as a duplicate of bug 13732 ***
Comment 18 Adam Jackson 2009-08-24 12:28:43 UTC
Mass version move, cvs -> git

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.