From: Steven Newbury Subject: Re: R200 DRM/KMS Date: Tue, 07 Jul 2015 14:46:58 +0100 Message-ID: <1436276818.19963.5.camel@snewbury.org.uk> References: <1436189945.21533.12.camel@snewbury.org.uk> <1436208021.24965.31.camel@snewbury.org.uk> <1436213188.24965.37.camel@snewbury.org.uk> <20150706212625.GN7568@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1261824276==" Return-path: Received: from know-smtprelay-omc-10.server.virginmedia.net (know-smtprelay-omc-10.server.virginmedia.net [80.0.253.74]) by gabe.freedesktop.org (Postfix) with ESMTP id B81866E9FB for ; Tue, 7 Jul 2015 06:47:11 -0700 (PDT) In-Reply-To: <20150706212625.GN7568@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Maling list - DRI developers List-Id: dri-devel@lists.freedesktop.org --===============1261824276== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Jq20T2tp1UjYgyA0IaR7" --=-Jq20T2tp1UjYgyA0IaR7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-07-06 at 23:26 +0200, Daniel Vetter wrote: > On Mon, Jul 06, 2015 at 09:06:28PM +0100, Steven Newbury wrote: > > On Mon, 2015-07-06 at 15:42 -0400, Alex Deucher wrote: > > > On Mon, Jul 6, 2015 at 2:40 PM, Steven Newbury < > > > steve@snewbury.org.uk > > > > wrote: > > > > On Mon, 2015-07-06 at 12:25 -0400, Alex Deucher wrote: > > > > > On Mon, Jul 6, 2015 at 9:39 AM, Steven Newbury < > > > > > steve@snewbury.org.uk > > > > > > wrote: > > > > > > Hi, > > > > > > I've been trying to get DRM/KMS working with the current=20 > > > > > > graphics > > > > > > stack (xf86-video-ati 7.5, xserver-1.17) on a R200 series=20 > > > > > > card. I > > > > > > assumed this should be working since KMS was implemented=20 > > > > > > for=20 > > > > > > it a > > > > > > while back, and it has been working with xf86-video-ati > > > > > > -6.x. > > > > > >=20 > > > > > > Unfortunately, it doesn't seem to work. > > > > > >=20 > > > > > > I've narrowed it down to drmSetInterfaceVersion() failing=20 > > > > > > when > > > > > > called > > > > > > from the ATI driver (in radeon_kms.c). This is a bit=20 > > > > > > strange > > > > > > since, > > > > > > /sys/class/drm/version correctly reports 1.1.0 20060810.=20 > > > > > > Presuably > > > > > > it's getting the correct fd for the DRM master otherwise=20 > > > > > > it=20 > > > > > > should > > > > > > bail earlier? > > > > > >=20 > > > > > >=20 > > > > > > Googling confirms others have had the same issue, and=20 > > > > > > generally the > > > > > > resolution has been to stick with the old driver. > > > > > >=20 > > > > > > Should this be working? Is it known to be broken? > > > > >=20 > > > > > It should be working. Make sure the kernel driver has kms=20 > > > > > enabled, > > > > > firmware available, and that the kernel driver is loaded=20 > > > > > before > > > > > starting X. If the kernel driver is not loaded before X=20 > > > > > starts=20 > > > > > you > > > > > can get a version mis-match error. > > > >=20 > > > > Yes, using Gentoos 4.1.1 kernel, driver is definitely loaded,=20 > > > > with > > > > modeset=3D1, which is working, all sysfs entries are there. gdm= =20 > > > > manages > > > > to fall back to starting up an X session without using DRM=20 > > > > swrast > > > > -only, not something you want to experience on such a weak CPU! > > > >=20 > > >=20 > > > If the kernel driver loads properly and you get a kms console you > > > should be good to go. > > >=20 > > > > Manually starting X fails with the "[drm] failed to set drm=20 > > > > interface > > > > version." error. > > > >=20 > > >=20 > > > Maybe the ddx with that old system was build without KMS support? > > Everything is freshly compiled. The error itself is coming from > > radeon_kms.c:651 in the ddx. >=20 > Do you have latest libdrm? We might have accidentally broken this=20 > for very > old versions of libdrm (although surprising this would compile with > everything else). > -Daniel > >=20 > > >=20 > > > Alex > > >=20 > > > > It's a very old system, PCI-only(!) Coppermine-128, belonging=20 > > > > to a > > > > friend. The system previously was (very slowly) running=20 > > > > Ubuntu 10 > > > > LTS, I think. It's not my machine so I'm not able to have=20 > > > > continuous > > > > access, but R200 DRM/KMS was working. Apparently, Ubuntu no=20 > > > > longer > > > > support R200, so no further updates were possible. > > > >=20 > > > > My friend can't afford a new machine at the moment; and since=20 > > > > I'm a > > > > long time Gentoo dev I took it upon myself to build him a=20 > > > > optimized > > > > desktop with gcc-5, where possible LTO, -Os, -march=3Dpentium3=20 > > > > with=20 > > > > the > > > > system L1 and L2 cache size information. It's quite possible=20 > > > > some > > > > part of the gfx stack is miscompiled, I tested it pretty=20 > > > > throughly > > > > under qemu (with qxl) before deployment, but that of course=20 > > > > didn't > > > > exercise the R200 driver. FWIW, other than the failing DRI, > > > > performance is surprisingly OK, not super fast obviously, but=20 > > > > a=20 > > > > *lot* > > > > better than under Ubuntu! (start-up time is alot quicker, by=20 > > > > an=20 > > > > order > > > > of magnitude!) > > > >=20 > > > > I'm attempting to downgrade the xserver and drivers (on the=20 > > > > live > > > > system) to see if that works, you can imagine that takes a=20 > > > > little > > > > while on a Coppermine-128! I'll find out tomorrow.=20 > > > > Otherwise, I > > > > guess I'm recompiling the stack with gcc-4.9 and no-LTO... >=20 Sorry about the accidental e-mail. I've tried an xserver-1.16, and ddx, libdrm without LTO and with gcc4.9. Exactly the same thing. I wondered whether the unused i810 could be interfering but triggering a device "remove" before starting=20 X made no difference. I'm a bit of a loss. I suppose I could try writing a simple test for drmSetInterfaceVersion(). At least that should determine whether the xserver/ddx is in the clear. Any other ideas? --=-Jq20T2tp1UjYgyA0IaR7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlWb2FgACgkQGcb56gMuC62WWACgoQmw3hCq7Vc+htqA3x38rXbH 0OkAoLZvzvkVh/CXshaCWwKgOrh52LLQ =hJLS -----END PGP SIGNATURE----- --=-Jq20T2tp1UjYgyA0IaR7-- --===============1261824276== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1261824276==--