Xorg hangs with drmwtq in 7.2-RELEASE
Robert Noland
rnoland at FreeBSD.org
Fri May 8 22:31:31 UTC 2009
On Fri, 2009-05-08 at 14:58 -0700, David Johnson wrote:
> On Friday 08 May 2009 07:35:45 am Robert Noland wrote:
> > I still can't reproduce this... I updated the Xserver, libGL and dri
> > ports yesterday, all of which could be related to locking up the GPU and
> > worth a shot. Failing that, I need you to enabled drm debugging. Start
> > the system without X, kldload radeon.ko, set sysctl hw.dri.0.debug=1
> > then startx.
>
> I've got all the updated ports as of last night, so that wasn't it.
>
> I turned AIGLX back on, and it promptly locked up again. This time, however,
> the screen went black instead of freezing, but otherwise the same as always.
> I then turned on hw.dri.0.debug, and messages quickly filled up with the
> following repeated message:
>
> [drm:pid1195:drm_ioctl] returning 4
> [drm:pid1195:drm_ioctl] pid=1195, cmd=0x80046457, nr=0x57, dev 0xc615fa00, auth=1
>
This is too late to really see anything... This still just suggests that
the GPU is locked up. What is happening below is that we have emitted
an "irq" to the card and we are waiting on it to parse that. The return
value 4 is EINTR which says that we were interrupted while we were
waiting. When we return EINTR, libdrm just performs the ioctl over
again. We first read the register from the card to see if it has parsed
at least up to what we are looking for, if so we just return success and
don't sleep. If the register says that we haven't parsed the command,
then we sleep for a max of 3 seconds waiting on the card to catch up.
In your case, the card is never catching up, which suggests that the
card is hung and not processing the command stream anymore.
static int radeon_wait_irq(struct drm_device * dev, int swi_nr)
{
drm_radeon_private_t *dev_priv =
(drm_radeon_private_t *) dev->dev_private;
int ret = 0;
if (RADEON_READ(RADEON_LAST_SWI_REG) >= swi_nr)
return 0;
dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;
DRM_WAIT_ON(ret, dev_priv->swi_queue, 3 * DRM_HZ,
RADEON_READ(RADEON_LAST_SWI_REG) >= swi_nr);
if (ret == -ERESTART)
DRM_DEBUG("restarting syscall");
return ret;
}
In order to guess what might be causing this, drm debugging needs to be
enabled before the hang, so that we can hopefully figure out what leads
up to the hung GPU.
robert.
--
Robert Noland <rnoland at FreeBSD.org>
FreeBSD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090508/6e95e550/attachment.pgp
More information about the freebsd-stable
mailing list