From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 02:24:42 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324691065673; Wed, 24 Dec 2008 02:24:42 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id DA4818FC14; Wed, 24 Dec 2008 02:24:41 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LFJQD-000Mtr-CY; Wed, 24 Dec 2008 10:24:29 +0800 Message-ID: <49519D66.9090605@micom.mng.net> Date: Wed, 24 Dec 2008 10:24:38 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.12 (X11/20080415) MIME-Version: 1.0 To: Robert Noland References: <200812231616.mBNGGU9Z006874@svn.freebsd.org> In-Reply-To: <200812231616.mBNGGU9Z006874@svn.freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186434 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 02:24:42 -0000 Robert Noland wrote: > Author: rnoland > Date: Tue Dec 23 16:16:30 2008 > New Revision: 186434 > URL: http://svn.freebsd.org/changeset/base/186434 > > Log: > Fix up handling of Intel G4X chips some more. > > Note that you need at least xf86-video-intel 2.4.3 for this to work. > The G4X doesn't put the GATT into the same area of stolen memory > as all the other chips and older versions of the driver didn't > handle that properly. > > Tested by: ganbold > Approved by: kib > MFC after: 2 weeks > > Modified: > head/sys/dev/agp/agp_i810.c > > Modified: head/sys/dev/agp/agp_i810.c > ============================================================================== > --- head/sys/dev/agp/agp_i810.c Tue Dec 23 16:04:33 2008 (r186433) > +++ head/sys/dev/agp/agp_i810.c Tue Dec 23 16:16:30 2008 (r186434) > @@ -167,7 +167,7 @@ static const struct agp_i810_match { > "Intel GM965 SVGA controller"}, > {0x2A128086, CHIP_I965, 0x00020000, > "Intel GME965 SVGA controller"}, > - {0x2A428086, CHIP_I965, 0x00020000, > + {0x2A428086, CHIP_G4X, 0x00020000, > "Intel GM45 SVGA controller"}, > {0x2E028086, CHIP_G4X, 0x00020000, > "Intel 4 Series SVGA controller"}, > @@ -284,6 +284,7 @@ agp_i810_probe(device_t dev) > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); > if ((deven & AGP_I915_DEVEN_D2F0) == > AGP_I915_DEVEN_D2F0_DISABLED) { > @@ -348,6 +349,7 @@ agp_i810_dump_regs(device_t dev) > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", > pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); > device_printf(dev, "AGP_I915_MSAC: 0x%02x\n", > @@ -397,7 +399,7 @@ agp_i810_attach(device_t dev) > return error; > > if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && > - ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) > + sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) > { > device_printf(dev, "agp_i810.c does not support physical " > "memory above 4GB.\n"); > @@ -659,8 +661,7 @@ agp_i810_attach(device_t dev) > return EINVAL; > } > > - if (sc->chiptype != CHIP_G4X) > - gtt_size += 4; > + gtt_size += 4; > > sc->stolen = (stolen - gtt_size) * 1024 / 4096; > if (sc->stolen > 0) > @@ -780,6 +781,7 @@ agp_i810_set_aperture(device_t dev, u_in > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > return agp_generic_set_aperture(dev, aperture); > } > > @@ -798,7 +800,8 @@ agp_i810_write_gtt_entry(device_t dev, i > u_int32_t pte; > > pte = (u_int32_t)physical | 1; > - if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { > + if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || > + sc->chiptype == CHIP_G4X) { > pte |= (physical & 0x0000000f00000000ull) >> 28; > } else { > /* If we do actually have memory above 4GB on an older system, > @@ -825,6 +828,10 @@ agp_i810_write_gtt_entry(device_t dev, i > bus_write_4(sc->sc_res[0], > (offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte); > break; > + case CHIP_G4X: > + bus_write_4(sc->sc_res[0], > + (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte); > + break; > } > } > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > > > Thanks a lot Robert. Together with kib@'s agp patch (Revision: 186433) this makes Xorg work with G45 graphics on CURRENT. Ganbold -- A clever prophet makes sure of the event first.