From owner-freebsd-current@FreeBSD.ORG Wed Dec 28 13:53:40 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A0AE16A41F; Wed, 28 Dec 2005 13:53:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD39743D5D; Wed, 28 Dec 2005 13:53:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 4723170 for multiple; Wed, 28 Dec 2005 08:51:09 -0500 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id jBSDrAxx029623; Wed, 28 Dec 2005 08:53:10 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Eric Anholt Date: Wed, 28 Dec 2005 08:48:14 -0500 User-Agent: KMail/1.8.3 References: <20051225135216.Y1294@atlantis.atlantis.dp.ua> <20051228075749.B57227@atlantis.atlantis.dp.ua> <1135751994.933.5.camel@leguin> In-Reply-To: <1135751994.933.5.camel@leguin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200512280848.16502.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1218/Mon Dec 26 08:46:59 2005 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Dmitry Pryanishnikov , freebsd-current@freebsd.org, Norikatsu Shigemura Subject: Re: vgapci doesn't want to attach agp on ASUS M5A X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2005 13:53:40 -0000 On Wednesday 28 December 2005 01:39 am, Eric Anholt wrote: > On Wed, 2005-12-28 at 08:25 +0200, Dmitry Pryanishnikov wrote: > > Hello! > > > > On Tue, 27 Dec 2005, John Baldwin wrote: > > >> I have same problem in my i830M, too and fixed Dmitry's patch. > > >> According to my pciconf -rb, pci_find_extcap(dev, PCIY_AGP, NULL) > > >> never find PCIY_AGP(because of 0x01). > > > > > > Ok. I don't see any patch anywhere, > > > > It's trivial: > > > > --- vga_pci.c.orig Thu Dec 22 18:25:22 2005 > > +++ vga_pci.c Sun Dec 25 13:04:09 2005 > > @@ -74,7 +74,7 @@ > > * If AGP capabilities are present on this device, then create > > * an AGP child. > > */ > > - if (pci_find_extcap(dev, PCIY_AGP, NULL) =3D=3D 0) > > +// if (pci_find_extcap(dev, PCIY_AGP, NULL) =3D=3D 0) > > device_add_child(dev, "agp", -1); > > > > > but it sounds like you'll need to fix the > > > DRM driver to not expect an AGP capability for this specific card or > > > some such. > > > > I'm not sure here. Yes, Intel's Mobile 915 PM/GM/GMS and 910GML Expre= ss > > Chipsets don't claim AGP capability. But they still contain AGP-related > > registers for compatibility. Moreover, we've just added those chipsets > > support to our sys/pci/agp_i810.c! So now we have an inconsistency > > between agp_i810.c and vga_pci.c and this should be fixed in order to g= et > > working DRM on those chipsets (people DO report that this hack makes DRM > > happy, I've not tried to explore it's actual functionality under XFree > > yet). For long-term solution, maybe we should have PCI Express-specific > > module which should attach to vga_pci and provide service similar to agp > > module. > > This is my understanding: > > The PCIE i915 chipsets have an internal gart which happens to do just > the same thing for the graphics hardware as AGP did, in a rather similar > way for us to program as how AGP used to be. So Linux and FreeBSD both > just expose an AGP device using this gart, and the DRM happily uses it. > However, because it's not *actually* AGP, it doesn't have the AGP > capability set, so we need to pretend like it's set. What I will do to fix this is to change all the agp drivers to use identify= =20 routines, then the hostb and vgapci drivers won't have to know to create ag= p=20 child devices at all. Eventually I'd like to change drm in the same way, b= ut=20 I will do agp first as it's in the tree. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org