On Sun, Oct 25, 2015 at 09:38:14PM +0100, Mark Kettenis wrote: > > Date: Sun, 25 Oct 2015 15:51:54 +1100 > > From: Jonathan Gray <[email protected]> > > > > On Sat, Oct 24, 2015 at 11:48:01PM +0200, Mark Kettenis wrote: > > > The diff below makes inteldrm(4) attach directly to pci(4) instead of > > > vga(1). Because inteldrm(4) depends on intagp(4), this also make > > > intagp(4) a child of inteldrm(4). Ultimately I'd like to integrate > > > intagp(4) into inteldrm(4), but that's going to be a bit more work. > > > > > > This diff is needed to make inteldrm(4) work when OpenBSD gets booted > > > by UEFI firmware. It will also make inteldrm(4) work on machines with > > > discrete graphics. > > > > > > This diff needs to be tested on a wide range of hardware. So if you > > > have a machine with inteldrm(4), please give it a shot. I'm > > > particularly interested in testing on an x40. > > > > after with serial console: > > > > inteldrm0 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02 > > intagp0 at inteldrm0 > > agp0 at intagp0: aperture at 0xe0000000, size 0x8000000 > > drm0 at inteldrm0 > > inteldrm0: can't map mmio space > > inteldrm1 at pci0 dev 2 function 1 "Intel 82855GM Video" rev 0x02 > > intagp at inteldrm1 not configured > > drm1 at inteldrm1 > > inteldrm1: couldn't map interrupt > > Memory manager not clean. Delaying takedown > > The diff below should fix the issue on the x40 and similar machines > with 2nd generation Intel graphics.
With that the screen goes black on attaching inteldrm and hangs. When booting with serial the last output is: inteldrm0 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02 intagp0 at inteldrm0 agp0 at intagp0: aperture at 0xe0000000, size 0x8000000 drm0 at inteldrm0 inteldrm0: apic 1 int 16 It looks like we need to map more than 64, the i815 registers are documented to go up to 512/0x80000 "Cursor, Display, and Pixel Pipe Registers (70000h-7FFFFh)" When trying to map 512 with the attach diff it seems pci_mapreg_map() fails in it's bus_space_map() call bus_space_map_failed base 0xd0000000 size 0x80000 flags 0x0
