I worked out a patch to make it wait longer under the worst situation. With 
this patch applied, parsec works fine for me.

Could anyone take a look at this patch?

 

Thanks

Haihao

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xiang, Haihao
Sent: 2007年1月4日 14:55
To: [EMAIL PROTECTED]
Cc: dri-devel@lists.sourceforge.net
Subject: X crashes when parsec runs on linux with drm/i915 and Mesa/i965_dri

 

Hi, 

         I run parsec with mode set to 1024x768 (see http://www.parsec.org 
<http://www.parsec.org/> ) on Linux with the latest Mesa/I965_dri and Drm/i915, 
but I965_dri always gets “intelWaitIrq: drmI830IrqWait: -16”, then X crashes, 
and gets the following error:

Error in I830WaitLpRing(), now is 6864091, start is 6862090

pgetbl_ctl: 0x7ff80001 pgetbl_err: 0x0

ipeir: 0 iphdr: 0

LP ring tail: cc80 head: ec98 len: 1f001 start 0

eir: 0 esr: 1 emr: ffdf

instdone: 0 instpm: 0

memmode: 0 instps: 0

hwstam: cffe ier: 22 imr: 0 iir: 1080

space: 8208 wanted 131064

 

Fatal server error:

Lockup

         

         I looked into it and noticed that drm/i915 uses a magic number 10000 
in the for_statement (see i915_wait_ring in i915_dma.c), and the driver doesn’t 
check the return value in macro BEGIN_LP_RING(in i915_drv.h). If i915_wait_ring 
returns error, BEGIN_LP_RING will destroy the entire ring buffer.  

I guess 10000 are too small in the following case: There is a Batch Buffer 
command in the ring buffer, and the Batch Buffer(or Batch Buffer chaining) are 
enough long, and the CPU is enough fast. So I try 1000000 and it works well. 
Then I notice drm/i830 uses an OS-timer(see i830_wait_ring in i830_dma.c), and 
I use the same method in drm/i915 and It works well too. 

         So I think the current method in drm/i915 has some risk: It is hard to 
control the waiting time. EBUSY will happen however the ring buffer doesn’t 
stall. But I have not a good idea to fix this issue. 

Could anyone give some comments? 

 

Thank in advance

Haihao

 

 

 

 

 

 

Attachment: i915_wait_ring.patch
Description: i915_wait_ring.patch

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to