Bug 123820

Summary: 945GME no /dev/agpgart
Product: Base System Reporter: Shobaki sam. <shsam>
Component: i386Assignee: freebsd-i386 (Nobody) <i386>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Shobaki sam. 2008-05-19 17:40:04 UTC
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..
Comment 1 Shobaki sam. 2008-05-19 18:45:51 UTC
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.
Comment 2 Shobaki sam. 2008-05-19 23:11:09 UTC
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 !
Comment 3 Shobaki sam. 2008-05-20 14:31:44 UTC
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 ?
Comment 4 Shobaki sam. 2008-05-20 22:48:54 UTC
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 ..
Comment 5 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2008-06-21 11:46:10 UTC
State Changed
From-To: open->closed

Close this PR because the same issue has bin fixed for kern/124782