Bug 101201

Summary: [request] add support for i945 graphics
Product: Base System Reporter: Hannes Hauswedell <hannes.hauswedell>
Component: kernAssignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
intel_context.c.patch
none
intel_context.h.patch
none
intel_screen.c.patch none

Description Hannes Hauswedell 2006-08-01 17:50:11 UTC
the last generation of Intel Graphics Chips are not supported.
they are the successor of the i915 chips and can be found CoreDuo-Notebooks.
They seem not to differ much from the last i915-PCI-Express chips, at least
the official specs are the same.

dmesg lines concerning the device:
---
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
---

when hw.pci.allow_unsupported_io_range="1" is set, dmeag also shows:
---
pci0: <display, VGA> at device 2.0 (no driver attached)
pci0: <display> at device 2.1 (no driver attached)
---

pciconf -lv shows:
---
none0@pci0:2:0: class=0x030000 card=0x01d81028 chip=0x27a28086 rev=0x03 hdr=0x00
    vendor   = 'Intel Corporation'
    class    = display
    subclass = VGA
none1@pci0:2:1: class=0x038000 card=0x01d81028 chip=0x27a68086 rev=0x03 hdr=0x00
    vendor   = 'Intel Corporation'
    class    = display
---

vesa works, but widescreen resolutions set with 915resolution cant be used...
and of course DRI doesnt work. 

the chipset is supported fully on GNU/Linux with the regular intel driver
and Xorg's i810.

there are quite a few notebooks and users affected by the problem, so i set
priority to high. if that is inadequate please change it.

thanks for any help! ( this stretched resolution is terrible)

How-To-Repeat: its a constant problem ;)
Comment 1 Marcus Alves Grando freebsd_committer freebsd_triage 2006-08-27 21:15:18 UTC
Hannes,

Can you test this patch:
http://marcus.grupos.com.br:8080/patch/agp_i810.c.patch

Regards

-- 
Marcus Alves Grando
FreeBSD Security Team
Comment 2 Hannes Hauswedell 2006-08-28 12:18:33 UTC
hi marcus,
the patch actually makes the card visible to agp:

agp0: <Intel 82945GM (945GM GMCH) SVGA controller> port 0xeff8-0xefff
mem 0xdff00000-0xdff7ffff,0xc0000000-0xcfffffff,0xdfec0000-0xdfefffff
irq 16 at device 2.0 on pci0
agp0: detected 7932k stolen memory
agp0: aperture size is 256M

pciconf now shows:
-----
agp0@pci0:2:0:  class=0x030000 card=0x01d81028 chip=0x27a28086 rev=0x03 hdr=0x00
    vendor   = 'Intel Corporation'
    class    = display
    subclass = VGA
none0@pci0:2:1: class=0x038000 card=0x01d81028 chip=0x27a68086 rev=0x03 hdr=0x00
    vendor   = 'Intel Corporation'
    class    = display
------


but X still doesnt recognize the card, when set the driver to i810, it
wont start:
-----
(II) LoadModule: "i810"
(II) Loading /usr/X11R6/lib/modules/drivers/i810_drv.so
(II) Module i810: vendor="X.Org Foundation"
        compiled for 6.9.0, module version = 1.4.1
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 0.8
(II) LoadModule: "mouse"
(II) Loading /usr/X11R6/lib/modules/input/mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
        compiled for 6.9.0, module version = 1.0.3
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 0.5
(II) LoadModule: "kbd"
(II) Loading /usr/X11R6/lib/modules/input/kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
        compiled for 6.9.0, module version = 1.0.1
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 0.5
(II) I810: Driver for Intel Integrated Graphics Chipsets: i810, i810-dc100,
        i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G, E7221 (i915),
        915GM, 945G
(II) Primary Device is: PCI 00:02:0
(WW) I810: No matching Device section for instance (BusID PCI:0:2:1) found
(EE) No devices detected.

Fatal server error:
no screens found
-----

the warning about BusID PCI:0:2:1 is not critical, it appears on
gnu/linux aswell; but apparently the device is still not detected.

thanks for your help!
hannes


2006/8/27, Marcus Alves Grando <mnag@freebsd.org>:
> Hannes,
>
> Can you test this patch:
> http://marcus.grupos.com.br:8080/patch/agp_i810.c.patch
>
> Regards
>
> --
> Marcus Alves Grando
> FreeBSD Security Team
>
Comment 3 Marcus Alves Grando freebsd_committer freebsd_triage 2006-08-28 13:36:49 UTC
Hi Hannes,

Hannes Hauswedell wrote:
> hi marcus,
> the patch actually makes the card visible to agp:
> 
> agp0: <Intel 82945GM (945GM GMCH) SVGA controller> port 0xeff8-0xefff
> mem 0xdff00000-0xdff7ffff,0xc0000000-0xcfffffff,0xdfec0000-0xdfefffff
> irq 16 at device 2.0 on pci0
> agp0: detected 7932k stolen memory
> agp0: aperture size is 256M
> 
...
> but X still doesnt recognize the card, when set the driver to i810, it
> wont start:
> -----
> (II) LoadModule: "i810"
> (II) Loading /usr/X11R6/lib/modules/drivers/i810_drv.so
> (II) Module i810: vendor="X.Org Foundation"
>        compiled for 6.9.0, module version = 1.4.1
>        Module class: X.Org Video Driver
>        ABI class: X.Org Video Driver, version 0.8
> (II) LoadModule: "mouse"
> (II) Loading /usr/X11R6/lib/modules/input/mouse_drv.so
> (II) Module mouse: vendor="X.Org Foundation"
>        compiled for 6.9.0, module version = 1.0.3
>        Module class: X.Org XInput Driver
>        ABI class: X.Org XInput driver, version 0.5
> (II) LoadModule: "kbd"
> (II) Loading /usr/X11R6/lib/modules/input/kbd_drv.so
> (II) Module kbd: vendor="X.Org Foundation"
>        compiled for 6.9.0, module version = 1.0.1
>        Module class: X.Org XInput Driver
>        ABI class: X.Org XInput driver, version 0.5
> (II) I810: Driver for Intel Integrated Graphics Chipsets: i810, i810-dc100,
>        i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G, E7221 (i915),
>        915GM, 945G
> (II) Primary Device is: PCI 00:02:0
> (WW) I810: No matching Device section for instance (BusID PCI:0:2:1) found
> (EE) No devices detected.

Reinstall xorg-server. I already commit patch to X support 945GM.

Regards

> 
> Fatal server error:
> no screens found
> -----
> 
> the warning about BusID PCI:0:2:1 is not critical, it appears on
> gnu/linux aswell; but apparently the device is still not detected.
> 
> thanks for your help!
> hannes
> 
> 
> 2006/8/27, Marcus Alves Grando <mnag@freebsd.org>:
>> Hannes,
>>
>> Can you test this patch:
>> http://marcus.grupos.com.br:8080/patch/agp_i810.c.patch
>>
>> Regards
>>
>> -- 
>> Marcus Alves Grando
>> FreeBSD Security Team
>>


-- 
Marcus Alves Grando
marcus(at)corp.grupos.com.br  |  Grupos Internet S/A
  mnag(at)FreeBSD.org         |  FreeBSD.org
Comment 4 Hannes Hauswedell 2006-08-28 23:25:42 UTC
hi marcus,

IT WORKS!

:) :) :)

thank you very much! the only thing that is not working yet is DRI...
whenever i run something that would use opengl, like glxgears or glxinfo, i get:
Unrecognized deviceID 27a2

if you need more info let me know!

greetings
hannes
Comment 5 Hannes Hauswedell 2006-12-22 19:20:35 UTC
what is the state of this PR?

has there been any luck getting DRM/DRI working? i'd really like to
dump  the linux i keep around for gaming...

have the other patches already been commited to -stable or -current?

is there anything i can do to speed the development up?

thanks a lot!

greetings & happy holidays!

hannes
Comment 6 Remko Lodder freebsd_committer freebsd_triage 2006-12-25 18:24:11 UTC
Responsible Changed
From-To: freebsd-bugs->anholt

Hello Eric, can you please have a look at the mentioned PR?
Comment 7 hannes 2007-01-20 19:17:09 UTC
ok wrote patches myself and got it working:

three files 
in /usr/ports/graphics/dri/work/Mesa-6.4.1/src/mesa/drivers/dri/i915 need to 
be patched. i have attached the diffs, would be great if someone could make a 
proper patch of them and commit it to graphics/dri !
thanks!

in solidarity
hannes
Comment 8 Marcus Alves Grando freebsd_committer freebsd_triage 2007-04-06 21:43:13 UTC
State Changed
From-To: open->closed

Kernel part already added in CURRENT and RELENG_6. 

For the graphics/dri part i sent one new PR to anholt and its will be 
commited soon. Thanks for your patches. 

Now thats PR can be closed. Thanks
Comment 9 Marcus Alves Grando freebsd_committer freebsd_triage 2007-04-07 21:46:51 UTC
Hannes Hauswedell wrote:
> what is the state of this PR?
> 
> has there been any luck getting DRM/DRI working? i'd really like to
> dump  the linux i keep around for gaming...
> 
> have the other patches already been commited to -stable or -current?
> 
> is there anything i can do to speed the development up?
> 
> thanks a lot!
> 
> greetings & happy holidays!
> 
> hannes

I close this PR because src part already added. Now exists one PR in 
ports to add support in graphics/dri. Thanks for your help.

http://www.freebsd.org/cgi/query-pr.cgi?pr=111333

Regards	

-- 
Marcus Alves Grando
marcus(at)sbh.eng.br | Personal
mnag(at)FreeBSD.org  | FreeBSD.org