Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2009 14:18:17 -0500
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Tijl Coosemans <tijl@ulyssis.org>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: [new port] graphics/linux-dri74
Message-ID:  <1242760698.1752.21.camel@balrog.2hip.net>
In-Reply-To: <200905192012.06401.tijl@ulyssis.org>
References:  <92596693@bb.ipt.ru> <20090515145252.GA69488@yamagi.org> <20090519165039.GA12505@yamagi.org> <200905192012.06401.tijl@ulyssis.org>

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

--=-1+LxFuJAo2WPGi6ytpd6
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2009-05-19 at 20:12 +0200, Tijl Coosemans wrote:
> On Tuesday 19 May 2009 18:50:39 Yamagi Burmeister wrote:
> > Okay, I investigated further. First I tried a FreeBSD/i386 version of
> > ioQuake3 on a FreeBSD/amd64 host. After some minor and unrelated
> > problems it worked.
> >=20
> > After that I tried to debug the linux-dri74. Reading the source and
> > doing a lot test runs I realized, that there are in fact two
> > problems. Every ten starts or so the userland side of drm crashes:
> >=20
> >   yamagi@saya:ttyp3 ~: /usr/compat/linux/usr/bin/glxinfo
> >   name of display: :0.0
> >   libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)
> >   libGL: OpenDriver: trying /usr/lib/dri/tls/r300_dri.so
> >   libGL: OpenDriver: trying /usr/lib/dri/r300_dri.so
> >   drmOpenDevice: node name is /dev/dri/card0
> >   drmOpenDevice: open result is 4, (OK)
> >   DRM_IOCTL_VERSION: Bad address
> >   Segmentation fault (core dumped)
> >=20
> > The other times the userland side of drm is able to open the
> > drm-device bit is unable to initalize it. The error message is
> > somewhat missleading:
> >=20
> >   yamagi@saya:ttyp3 ~: /usr/compat/linux/usr/bin/glxinfo
> >   name of display: :0.0
> >   libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)
> >   libGL: OpenDriver: trying /usr/lib/dri/tls/r300_dri.so
> >   libGL: OpenDriver: trying /usr/lib/dri/r300_dri.so
> >   drmOpenDevice: node name is /dev/dri/card0
> >   drmOpenDevice: open result is 4, (OK)
> >   drmOpenByBusid: Searching for BusID pci:0000:01:00.0
> >   drmOpenDevice: node name is /dev/dri/card0
> >   drmOpenDevice: open result is 4, (OK)
> >   drmOpenByBusid: drmOpenMinor returns 4
> >   drmOpenByBusid: drmGetBusid reports (null)
> >   drmOpenDevice: node name is /dev/dri/card1
> >   drmOpenByBusid: drmOpenMinor returns -1
> >   drmOpenDevice: node name is /dev/dri/card2
> >   drmOpenByBusid: drmOpenMinor returns -1
> >   drmOpenDevice: node name is /dev/dri/card3
> >   drmOpenByBusid: drmOpenMinor returns -1
> >   drmOpenDevice: node name is /dev/dri/card4
> >   drmOpenByBusid: drmOpenMinor returns -1
> >    [..]
> >   drmOpenDevice: node name is /dev/dri/card14
> >   drmOpenByBusid: drmOpenMinor returns -1
> >   libGL error: drmOpenOnce failed (Operation not permitted)
> >   libGL error: reverting to software direct rendering
> >   libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
> >   libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
> >   display: :0  screen: 0
> >   direct rendering: Yes
> >=20
> > So I added debug printf() into the code. I stepped through it. After
> > some hours of intesive debugging im 99% sure, that both of the above
> > failures of linux-drm74 are originating at the kernel side. It's most
> > likely NOT a problem of the userland side and therefor not a problem
> > of the port.
> >=20
> > I'll investigate further at the kernel side, but that'll need some
> > time. So, while it's the fault linux-drm74, what about a little
> > warning message in the install message of the port? Just to be sure,
> > that other users experiencing the same problem know, that it is not a
> > bug of linux-dr74.
>=20
> I noticed you use the r300 driver so maybe this patch helps:
> http://people.freebsd.org/~rnoland/drm_radeon-copyin-fix-try2.patch

This patch, while it may be useful isn't related to the issue.

> Robert Noland (CCed) probably knows more about this though.
> http://lists.freebsd.org/pipermail/freebsd-emulation/2009-May/005995.html

It looks like the linux version of drmOpen is behaving badly.  Possibly,
it needs linproc mounted.  drmOpen appears to be returning file
descriptor 4, which may be being mis-interpreted, but in any case it
really shouldn't need keep looking for more cards.

robert.

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

--=-1+LxFuJAo2WPGi6ytpd6
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)

iEYEABECAAYFAkoTBfkACgkQM4TrQ4qfROPnfACfUvIoP/Ds4KVVVSv0lNWoh39B
bOMAn3d6qDu8VEB1+okhFEMS0+W6M8OM
=VxOQ
-----END PGP SIGNATURE-----

--=-1+LxFuJAo2WPGi6ytpd6--




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