On Fri, 2008-01-04 at 15:17 +0800, minskey guo wrote:
> Michel Dänzer 写道:
> > On Wed, 2007-12-26 at 08:00 +0800, minskey guo wrote: 
> >   
> >> In intelWaitIrq() of intel_ioctl.c file, there is the following
> >> code:
> >>
> >> void intelWaitIrq( intelContextPtr intel, int seq )
> >> {
> >> ...
> >> do {
> >> ret = drmCommandWrite( intel->driFd, DRM_I830_IRQ_WAIT, &intel->iw,
> >> sizeof(intel->iw) );
> >> } while (ret == -EAGAIN || ret == -EINTR);
> >> ...
> >> }
> >>
> >>
> >> But the kernel i915 DRM driver doesn't return EAGAIN for
> >> ioctl DRM_I830_IRQ_WAIT. Refer to i915_wait_irq() in file
> >> i915_irq.c and DRM_WAIT_ON macro in drm_os_linux.h
> >>
> >> >From the macro of DRM_WAIT_ON, I think i915_wait_irq()/
> >> ioctl DRM_I830_IRQ_WAIT can get return value of -EBUYS
> >> or -EINTR only, no -EAGAIN.
> >>
> >>
> >> So, I guess that the checking for -EAGAIN should be replaced
> >> with the checking for -EBUSY in intelWaitIrq() of intel_ioctl.c,
> >> Is my understanding right ?
> >>     
> >
> > No. The ioctl will only return -EBUSY after a 3 second timeout, which
> > usually means the GPU has locked up, and retrying is pointless.
> >
> >   
> Generally, in my understanding, if GPU gets lock, there must be
> something wrong, software or hardware. If it is software flaw,
> we could improve it. If hardware flaw, maybe we could reset the
> GPU.

Maybe, but probably not in the Mesa driver. Also, it might not always
help much (if the cause of the lockup triggers again right away).

> Is there any better ways to solve this issue ? If we are using
> 3D desktop, the whole desktop will exit when EBUSY is encountered,
> it is difficult for end users to accept this.

Right now, the X driver will abort the X server in this case anyway.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to