Date: Fri, 14 Apr 2006 10:53:17 -0500 From: Jonathan Fosburgh <jonathan@fosburgh.org> To: freebsd-x11@freebsd.org Subject: i915 DRM breakage in -CURRENT Message-ID: <200604141053.25611.jonathan@fosburgh.org>
next in thread | raw e-mail | index | archive | help
--nextPart2031531.xnWoZbegho Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The recent DRM commit broke the DRM on my i915 card. After digging around = in=20 the drm sources I came across something that didn't seem right to me and=20 after changing it DRM works again. At the bottom of i915_dma.c there is a=20 comment that reads "All Intel graphics chipsets are treated as AGP...A valu= e=20 of 1 is always retured to indictate every i9x5 is AGP." And then it is set: int i915_driver_device_is_agp(drm_device_t * dev) { return 1; } And then in i915_drc.c, device_is_agp is set to the value of=20 i915_device_is_agp, and then drm_agpsupport.c uses this to determine if it= =20 can attach an agp device. This used to work, but in digging through the=20 sources something caught my eye that doesn't make sense. There is a commen= t=20 in drm_agpsupport.c that reads: /* device_is_agp returns a tristate, 0 =3D not AGP, 1 =3D=20 definitely * AGP, 2 =3D fall back to PCI capability */ But the check in the drm_device_is_agp function to determine whether or not= to=20 attach as agp changed from if(ret !=3D 2) to if(ret !=3D DRM_MIGHT_BE_AGP) The value of DRM_MIGHT_BE_AGP is set in an enum in drmP.h enum { DRM_IS_NOT_AGP, DRM_MIGHT_BE_AGP, DRM_IS_AGP }; I read this as DRM_IS_NOT_AGP =3D=3D 0, DRM_MIGHT_BE_AGP =3D=3D 1, and DRM_= IS_AGP =3D=3D=20 2. Granted, in my limited coding skills I have never really used enum, but= =20 it at least seems to me that that is what is being set. This therefore=20 conflicts with what one would expect from the comments. And based on this,= =20 the i915 needs to be set to 2, and not 1. I have done this, and now the dr= m=20 attaches again and appears to work (Xorg says Direct Rendering is enabled a= nd=20 so far the appearance feels right.) The only problem I see is the drm atta= ch=20 message says it has 0MB instead of reporting the AGP aperture size of 256MB= ,=20 as I think it used to. agp0: <Intel 82915G (915G GMCH) SVGA controller> on vgapci0 agp0: detected 7932k stolen memory agp0: aperture size is 256M drm0: <Intel i915G> on vgapci0 info: [drm] AGP at 0xcfd00000 0MB info: [drm] Initialized i915 1.4.0 20060119 HTH. =09 =2D-=20 Jonathan Fosburgh AIX and Storage Administrator UT MD Anderson Cancer Center Houston, TX --nextPart2031531.xnWoZbegho Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEP8V1qUvQmqp7omYRAhgFAKCpVzaweqqZswFg4ZLU0VrVfhbx4gCfbc3m QmReBbwXG3sYQSgmXxINhR0= =E3VH -----END PGP SIGNATURE----- --nextPart2031531.xnWoZbegho--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604141053.25611.jonathan>