Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2010 09:56:58 -0600
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Martin Kristensen <mik@pc.dk>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: freebsd7 (and 8), radeon, xorg-server -> deadlock or so
Message-ID:  <1266249418.11131.7.camel@balrog.2hip.net>
In-Reply-To: <20100215142305.3f0d7e65@miknet.dk>
References:  <6101e8c41002091524q25a7e026u585e575eb4f1589c@mail.gmail.com> <20100211074933.GJ9748@acme.spoerlein.net> <1266080709.89452.21.camel@balrog.2hip.net> <201002131137.34812.npapke@acm.org> <1266096425.89452.30.camel@balrog.2hip.net> <20100215142305.3f0d7e65@miknet.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2010-02-15 at 14:23 +0100, Martin Kristensen wrote:
> On Sat, 13 Feb 2010 15:27:04 -0600
> Robert Noland <rnoland@FreeBSD.org> wrote:
> 
> > On Sat, 2010-02-13 at 11:37 -0800, Norbert Papke wrote:
> > > On February 13, 2010, Robert Noland wrote:
> > > > Ok, I've put up a patch at:
> > > > 
> > > > http://people.freebsd.org/~rnoland/drm-radeon-test.patch
> > > >
> > 
> > http://people.freebsd.org/~rnoland/drm-radeon-8-test.patch
> > 
> > This one should work on 8...
> > 
> > robert.
> > 
> > > > This is sort of a mega patch and includes:
> > > > 
> > > > Re-worked drm mapping code, that ensures that we don't end up
> > > > incorrectly mapping certain maps with overlapping offsets.  This
> > > > generally shows up as the ring buffer not being cleared
> > > > (contents != 0 in xorg.log) which leads to corruption and other
> > > > bad behavior.
> > > > 
> > > > Re-written scatter gather allocation code.  This interacts
> > > > directly with the VM system, rather than using bus_dma to allow
> > > > us to grab non-contiguous pages for the scatter gather backing of
> > > > the GART.  It also makes it easier to handle the caching mode of
> > > > the backing pages.
> > > > 
> > > > Disable cache snooping on radeon cards, since we have write
> > > > combining set properly now.
> > > > 
> > > > I have at least done a test build on -CURRENT with this patch,
> > > > but I haven't had time to do much else without the rest of the
> > > > code in my tree.  I've been running most all of this code for a
> > > > month or two now at least, so it is mostly just a question of
> > > > whether or not I got all of the conflicts sorted out properly
> > > > when I made this patch.
> > > > 
> > > > The re-mapping code has the most widespread impact and has been
> > > > tested on radeon r600 amd64, intel g45 i386 and mga amd64.
> > > > 
> > > > robert.
> 
> The patch applied cleanly. I have applied the patch to a clean 8-STABLE
> environment with WITNESS, INVARIANTS and KDB_UNATTENDED in the kernel.
> I still see the crashes when starting X with DRI on. This is what I see
> in messages:
> 
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_mmap] called with offset 0000070001c7b000
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_mmap] called with offset 0000070001c7c000
> Feb 14 19:13:44 alpha kernel: 
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_mmap] called with offset 0000070001c7d000
> Feb 14 19:13:44 alpha kernel: 
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_mmap] called with offset 0000070001c7e000
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_mmap] called with offset 0000070001c7f000
> Feb 14 19:13:44 alpha kernel: 
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_ioctl] pid=30467, cmd=0xc0286415, nr=0x15, dev 0xffffff0001a79400, auth=1
> Feb 14 19:13:44 alpha kernel: 
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_addmap] offset = 0xfe8e0000, size = 0x00010000, type = 1
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_addmap] Found kernel map 1
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_addmap] Added map 1 0xfe8e0000/0x10000
> Feb 14 19:13:44 alpha kernel: [drm:pid30467:drm_ioctl] pid=30467, cmd=0x80106459, nr=0x59, dev 0xffffff0001a79400, auth=1
> 
> 
> There has been one odd development. If I startx with DRI off or NoAccel
> set it starts as usual. If I then quit and to cli and restart, I see the
> same crash as if I had DRI on.

I'm really starting to think that this is a bug in the Xserver
somewhere... If DRI is off, the kernel drm is not involved at all.  The
radeon driver does grope around on the pci bus (via libpciaccess) which
could potentially cause issues, but... miwi and a few other folks have
picked up the ball to get us up to xorg 7.5, since I just don't have
time to do it all now.  That might be a good thing to try, I expect that
they will have a patch ready soon, like within a few days.

robert.

> Martin
-- 
Robert Noland <rnoland@FreeBSD.org>
FreeBSD




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