From nobody@FreeBSD.org  Mon May 19 16:38:53 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B658106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 May 2008 16:38:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 73A7A8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 May 2008 16:38:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4JGbXr7028564
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 19 May 2008 16:37:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4JGbXS6028563;
	Mon, 19 May 2008 16:37:33 GMT
	(envelope-from nobody)
Message-Id: <200805191637.m4JGbXS6028563@www.freebsd.org>
Date: Mon, 19 May 2008 16:37:33 GMT
From: "Shobaki sam." <shsam@free.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 945GME no /dev/agpgart
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123820
>Category:       i386
>Synopsis:       945GME no /dev/agpgart
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 19 16:40:04 UTC 2008
>Closed-Date:    Sat Jun 21 10:49:14 UTC 2008
>Last-Modified:  Sat Jun 21 10:49:14 UTC 2008
>Originator:     Shobaki sam.
>Release:        FreeBSD 7.0 STABLE
>Organization:
none
>Environment:
Freebsd neptune.soleil 7.0-STABLE FreeBSD 7.0-STABLE #5: Mon May 19 15:59:49 CEST 2008 progen@neptune.soleil:/usr/obj/usr/src/sys/NEPTUNE i386
>Description:
Trying to install FreeBSD on a HP 530 laptop, but it seems there is no AGP.
I have the following in my KERNELCONF

device          agp             # support several AGP chipsets

I also added these even if I have no agpgart.

device          drm             # DRM core module required by DRM drivers
device          i915drm         # Intel i830 through i915

I also added this line to drm_pciids.h:

{0x8086, 0x27AE, 0, "Intel i945GME"}, \ 

But here is the result:

drm0: <Intel i945GME>  on vgapci0
error: [drm:pid0:drm_load] *ERROR* Card isn't AGP, or couldn't initialize AGP.
device_attach: drm0 attach returned 12 


VIDEO RELATED DMESG output:

vgapci0: <VGA-compatible display> port 0x3000-0x3007 mem 0xf0400000-0xf047ffff,0xe0000000-0xefffffff,0xf0480000-0xf04bffff irq 10 at device 2.0 on pci0
vgapci0: <VGA-compatible display> mem 0xf0500000-0xf057ffff at device 2.0 on pci0
drm1: <Intel i945GME> on vgapci0
error: [drm:pid0:drm_load] *ERROR* Card isn't AGP, or couldn't initialize AGP.
device_attach: drm0 attach returned 12
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0

PCICONF -lv OUTPUT:

hostb0@pci0:0:0:0:	class=0x060000 card=0x30d5103c chip=0x27ac8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:2:0:	class=0x030000 card=0x30d5103c chip=0x27ae8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = display
    subclass   = VGA
vgapci1@pci0:0:2:1:	class=0x038000 card=0x30d5103c chip=0x27a68086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Mobile 945GM/GU Express Integrated Graphics Controller'
    class      = display
none0@pci0:0:27:0:	class=0x040300 card=0x30d5103c chip=0x27d88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) High Definition Audio'
    class      = multimedia
pcib1@pci0:0:28:0:	class=0x060400 card=0x30d5103c chip=0x27d08086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:1:	class=0x060400 card=0x30d5103c chip=0x27d28086 rev=0x01 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
uhci0@pci0:0:29:0:	class=0x0c0300 card=0x30d5103c chip=0x27c88086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:29:7:	class=0x0c0320 card=0x30d5103c chip=0x27cc8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) USB 2.0 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
pcib3@pci0:0:30:0:	class=0x060401 card=0x30d5103c chip=0x24488086 rev=0xe1 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801BAM/CAM/DBM (ICH2-M/3-M/4-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:	class=0x060100 card=0x30d5103c chip=0x27b98086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801GBM (ICH7-M) LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:1:	class=0x01018a card=0x30d5103c chip=0x27df8086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801G (ICH7 Family) Ultra ATA Storage Controller'
    class      = mass storage
    subclass   = ATA
atapci1@pci0:0:31:2:	class=0x010601 card=0x30d5103c chip=0x27c58086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801GB Mobile I/O Controller Hub SATA cc=AHCI'
    class      = mass storage
none1@pci0:16:0:0:	class=0x028000 card=0x137d103c chip=0x431514e4 rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM4310 USB Controller'
    class      = network
none2@pci0:2:6:0:	class=0x060700 card=0x30d5103c chip=0x14101524 rev=0x01 hdr=0x02
    vendor     = 'ENE Technology Inc'
    device     = 'CB-1420 CardBus Controller'
    class      = bridge
    subclass   = PCI-CardBus
fxp0@pci0:2:8:0:	class=0x020000 card=0x30d5103c chip=0x10688086 rev=0x01 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82562ET/EZ/GT/GZ PRO/100 VE (LOM) Ethernet Controller Mobile'
    class      = network
    subclass   = ethernet

Can somebody work with me to solve this, I am willing to test anything anyone 
has to offer and can provide any details regarding hardware etc..



>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: shobaki sam <shsam@free.fr>
To: bug-followup@FreeBSD.org,  shsam@free.fr
Cc:  
Subject: Re: i386/123820: 945GME no /dev/agpgart
Date: Mon, 19 May 2008 19:45:51 +0200

 I managed to make that video chipset work with the last linux stable 
 kernel, and this line fixed the problem (fix found on some forums):
 
 sed -i -e 's/#define IS_I945GM(dev) ((dev)->pci_device == 
 0x27A2)/#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2 || \\ 
 \n                       (dev)->pci_device == 0x27AE)/' 
 drivers/char/drm/i915_drv.h
 
 Tried to make this with the FreeBSD kernel adding a line to drm_pciids.h 
 resulted in the error posted in my report.
 

From: shobaki sam <shsam@free.fr>
To: bug-followup@FreeBSD.org,  shsam@free.fr
Cc:  
Subject: Re: i386/123820: 945GME no /dev/agpgart
Date: Tue, 20 May 2008 00:11:09 +0200

 Some news here, at least i am trying:
 
 I noticed the agp_i810_match structure in the file 
 /usr/src/sys/pci/agp_i810.c. The 945GM and 945GME have the same devid, 
 so i changed the 945GME from 0x27A28086 to 0X27AE8086.
 
 Compiled a new kernel and after reboot:
 
 agp0: <Intel 945 GME SVGA controller> on vgapci0
 agp0: detected 7932k stolen memory
 agp0: aperture size is 256M
 
 drm0: <Intel i945GME> on vgapci0
 info: [drm] AGP at 0xe0000000 256MB
 info: [drm] Initalized i915 1.5.0 20060119
 
 I am now able to start xorg, but i have those new messages:
 
 (EE) intel(0): I830 Vblank Pipe Setup Failed 0
 
 and when i try glxgears or glxheads:
 
 libGL warning: 3D driver claims to not support visual 0x65
 Unrecognized deviceID 27ae
 
 Help please !

From: shobaki sam <shsam@free.fr>
To: bug-followup@FreeBSD.org,  shsam@free.fr
Cc:  
Subject: Re: i386/123820: 945GME no /dev/agpgart
Date: Tue, 20 May 2008 15:31:44 +0200

 I think i found something:
 
 When trying to install xorg-server from ports, it is downloading and 
 linking against mesalib 7.0.1 but only version 7.0.3 support my video 
 chipset. That must be why it can't recognize my video chipset devid 
 0xAE27. I installed mesalib 7.0.3, coming with the mesa-demos port, but 
 i have to find a way to make xorg-server using it instead of mesa 7.0.1.
 
 Any help please ?

From: shobaki sam <shsam@free.fr>
To: bug-followup@FreeBSD.org,  shsam@free.fr
Cc:  
Subject: Re: i386/123820: 945GME no /dev/agpgart
Date: Tue, 20 May 2008 23:48:54 +0200

 Done.
 
 I complied xorg with Mesa 7.0.3 and installed dri-7.0.1 libs. Direct 
 Rendering is working, no idea if i made something wrong but it's working ..
State-Changed-From-To: open->closed 
State-Changed-By: gonzo 
State-Changed-When: Sat Jun 21 10:46:10 UTC 2008 
State-Changed-Why:  
Close this PR because the same issue has bin fixed for kern/124782 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123820 
>Unformatted:
