Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 May 2009 17:31:04 -0500
From:      Robert Noland <rnoland@FreeBSD.org>
To:        David Johnson <david@usermode.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Xorg hangs with drmwtq in 7.2-RELEASE
Message-ID:  <1241821864.1733.51.camel@balrog.2hip.net>
In-Reply-To: <200905081458.53651.david@usermode.org>
References:  <200905042015.29394.david@usermode.org> <200905072229.17798.david@usermode.org> <1241793345.1733.5.camel@balrog.2hip.net> <200905081458.53651.david@usermode.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-D0bQcSOzGXYMt3hJuZLW
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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 an=
d
> > 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=3D1
> > then startx.
>=20
> I've got all the updated ports as of last night, so that wasn't it.
>=20
> I turned AIGLX back on, and it promptly locked up again. This time, howev=
er,
> the screen went black instead of freezing, but otherwise the same as alwa=
ys.
> I then turned on hw.dri.0.debug, and messages quickly filled up with the
> following repeated message:
>=20
> [drm:pid1195:drm_ioctl]     returning 4
> [drm:pid1195:drm_ioctl] pid=3D1195, cmd=3D0x80046457, nr=3D0x57, dev 0xc6=
15fa00, auth=3D1
>=20

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.=20

static int radeon_wait_irq(struct drm_device * dev, int swi_nr)
{
        drm_radeon_private_t *dev_priv =3D
            (drm_radeon_private_t *) dev->dev_private;
        int ret =3D 0;
=20
        if (RADEON_READ(RADEON_LAST_SWI_REG) >=3D swi_nr)
                return 0;

        dev_priv->stats.boxes |=3D RADEON_BOX_WAIT_IDLE;
=20
        DRM_WAIT_ON(ret, dev_priv->swi_queue, 3 * DRM_HZ,
                    RADEON_READ(RADEON_LAST_SWI_REG) >=3D swi_nr);

        if (ret =3D=3D -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.

--=20
Robert Noland <rnoland@FreeBSD.org>
FreeBSD

--=-D0bQcSOzGXYMt3hJuZLW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)

iEYEABECAAYFAkoEsqgACgkQM4TrQ4qfROOaRQCcCJnWOQUp5M/COKSDS0g4Th8j
qjsAnRBC7vRUfaHLh8UqLNcoKxLBD4gI
=NtzA
-----END PGP SIGNATURE-----

--=-D0bQcSOzGXYMt3hJuZLW--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1241821864.1733.51.camel>