Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* xrandr crashes X with a "GPU hung" in the i915 driver
@ 2010-11-05  0:12 Bryan Freed
  2010-11-05  9:16 ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Bryan Freed @ 2010-11-05  0:12 UTC (permalink / raw)
  To: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1227 bytes --]

I have a situation where unplugging an external monitor and running an
xrandr sequence to return the screen to the internal display sometimes
causes the i915 driver to wig out.

In perusing the intel-gfx archives, I see
http://lists.freedesktop.org/archives/intel-gfx/2010-May/006957.html makes a
reference to "commit 9f54107f866a25cf670f81f7c52b8c108728c6a5", but I do not
see that commit in the drm-intel kernel.  I am looking at git://
git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git.  Is this not
the right repo?


The xrandr sequence to switch from external monitor to internal display is:
xrandr --output LVDS1 --mode 1280x800
xrandr --output VGA1 --off
xrandr --fb 1280x800

To switch back to the external monitor:
xrandr --output LVDS1 --off
xrandr --output VGA1 --mode 1920x1200
xrandr --fb 1920x1200


I have tried rearranging the order of commands, and this sequence reduces
the likelihood of failure:
xrandr --output VGA1 --off
xrandr --output LVDS1 --mode 1280x800
xrandr --fb 1280x800

But I still occasionally see the failure.  Stressing the driver a bit with
"echo 7 > /sys/module/drm/parameters/debug" seems to exacerbate the
situation (ie, increase the likelihood of failure).

Any ideas?

bryan.

[-- Attachment #1.2: Type: text/html, Size: 1776 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xrandr crashes X with a "GPU hung" in the i915 driver
  2010-11-05  0:12 xrandr crashes X with a "GPU hung" in the i915 driver Bryan Freed
@ 2010-11-05  9:16 ` Chris Wilson
  2010-11-05 18:51   ` Bryan Freed
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2010-11-05  9:16 UTC (permalink / raw)
  To: Bryan Freed, intel-gfx

On Thu, 4 Nov 2010 17:12:31 -0700, Bryan Freed <bfreed@chromium.org> wrote:
> I have a situation where unplugging an external monitor and running an
> xrandr sequence to return the screen to the internal display sometimes
> causes the i915 driver to wig out.
> 
> In perusing the intel-gfx archives, I see
> http://lists.freedesktop.org/archives/intel-gfx/2010-May/006957.html makes a
> reference to "commit 9f54107f866a25cf670f81f7c52b8c108728c6a5", but I do not
> see that commit in the drm-intel kernel.  I am looking at git://
> git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git.  Is this not
> the right repo?

That's in the DDX to fix up an X crash in swapbuffers. To debug GPU hangs
you'll want to decode /sys/kernel/debug/dri/0/i915_error_state.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xrandr crashes X with a "GPU hung" in the i915 driver
  2010-11-05  9:16 ` Chris Wilson
@ 2010-11-05 18:51   ` Bryan Freed
  2010-11-05 19:01     ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Bryan Freed @ 2010-11-05 18:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2174 bytes --]

Ah.  I see 9f54107f866a25cf670f81f7c52b8c108728c6a5 in git://
anongit.freedesktop.org/xorg/driver/xf86-video-intel, but that change looks
i830-specific.  We are running i915.

My i915_error_state looks like this in a few test runs this morning:

localhost ~ # cd /sys/kernel/debug/dri/0/
localhost 0 # cat i915_error_state
Time: 1288979468 s 955942 us
EIR: 0x00000000
  PGTBL_ER: 0x00000000
  INSTPM: 0x00000000
  IPEIR: 0x00000000
  IPEHR: 0x01800002
  INSTDONE: 0x7dffffc1
  ACTHD: 0x07357014

and

Time: 1288979853 s 607750 us
EIR: 0x00000000
  PGTBL_ER: 0x00000000
  INSTPM: 0x00000000
  IPEIR: 0x00000000
  IPEHR: 0x01800002
  INSTDONE: 0x7dffffc1
  ACTHD: 0x00dbb014

and

Time: 1288979982 s 718955 us
EIR: 0x00000000
  PGTBL_ER: 0x00000000
  INSTPM: 0x00000000
  IPEIR: 0x00000000
  IPEHR: 0x01800002
  INSTDONE: 0x7dffffc1
  ACTHD: 0x058c5014


I see these values come pretty much straight from the registers.
 Unfortunately, my documentation (from
http://intellinuxgraphics.org/documentation.html) is incomplete.  I see G45
and G35 documentation there, but not G33 which is what i915 appears to be
(based on what I see in the kernel driver code).  The register addresses are
different, and who knows what else.

bryan.


On Fri, Nov 5, 2010 at 2:16 AM, Chris Wilson <chris@chris-wilson.co.uk>wrote:

> On Thu, 4 Nov 2010 17:12:31 -0700, Bryan Freed <bfreed@chromium.org>
> wrote:
> > I have a situation where unplugging an external monitor and running an
> > xrandr sequence to return the screen to the internal display sometimes
> > causes the i915 driver to wig out.
> >
> > In perusing the intel-gfx archives, I see
> > http://lists.freedesktop.org/archives/intel-gfx/2010-May/006957.htmlmakes a
> > reference to "commit 9f54107f866a25cf670f81f7c52b8c108728c6a5", but I do
> not
> > see that commit in the drm-intel kernel.  I am looking at git://
> > git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git.  Is this
> not
> > the right repo?
>
> That's in the DDX to fix up an X crash in swapbuffers. To debug GPU hangs
> you'll want to decode /sys/kernel/debug/dri/0/i915_error_state.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
>

[-- Attachment #1.2: Type: text/html, Size: 3434 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xrandr crashes X with a "GPU hung" in the i915 driver
  2010-11-05 18:51   ` Bryan Freed
@ 2010-11-05 19:01     ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2010-11-05 19:01 UTC (permalink / raw)
  To: Bryan Freed; +Cc: intel-gfx

On Fri, 5 Nov 2010 11:51:36 -0700, Bryan Freed <bfreed@chromium.org> wrote:
> Ah.  I see 9f54107f866a25cf670f81f7c52b8c108728c6a5 in git://
> anongit.freedesktop.org/xorg/driver/xf86-video-intel, but that change looks
> i830-specific.  We are running i915.
> 
> My i915_error_state looks like this in a few test runs this morning:
> 
> localhost ~ # cd /sys/kernel/debug/dri/0/
> localhost 0 # cat i915_error_state
> Time: 1288979468 s 955942 us
> EIR: 0x00000000
>   PGTBL_ER: 0x00000000
>   INSTPM: 0x00000000
>   IPEIR: 0x00000000
>   IPEHR: 0x01800002
>   INSTDONE: 0x7dffffc1
>   ACTHD: 0x07357014

That's an old kernel, not a lot of information in the i915_error_state.
0x01800002 is MI_WAIT_FOR_EVENT. The issue is that we are doing a
mode switch whilst there is a pending WAIT, so by the time the GPU
executes the wait the pipe is disabled and the GPU hangs. I just this
morning committed a patch to -intel that might help here.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-05 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-05  0:12 xrandr crashes X with a "GPU hung" in the i915 driver Bryan Freed
2010-11-05  9:16 ` Chris Wilson
2010-11-05 18:51   ` Bryan Freed
2010-11-05 19:01     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox