summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/vga_pci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Style fixes and use of tabs for the DRM bits.brad2008-08-101-6/+6
| | | | ok oga@
* make the drm unsupported printf more in line with how the rest of themoga2008-08-021-2/+2
| | | | | | work. ok deraadt@
* Right now agp_generic_enable() is wrong. It has been since 2006. Itoga2008-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | assumes that the display device and the agp bridge are the same device. In almost all cases this is incorrect. In order to correctly enable the agp device with the correct mode, we need to set the AGP_COMMAND register on both the display and the bridge with the right bits. Since agp is currently attaching at vga(4), due to the problems with the intel integrated graphics (a problem that I still need to solve, to be honest), for now just provide both pci_attach_args to the agp init, and get what we need from there to do the enable. This fixes the "agp bug" which i have been known to rant about, a lot. So agp radeons now work with dri without needing to be forced to pci mode. This wasn't detected before, since the only non-drm consumer of agp is the intel X driver, the i810 agp driver has its own enable function. tested by many. ok kettenis@.
* Skip 64-bit BARs correctly when initing.oga2008-06-121-3/+8
| | | | ok marco@.
* Simplify the use of pci_mapreg_map().brad2008-06-031-9/+4
| | | | ok oga@
* currently agp_i810 needs to map the same BAR as inteldrm, this obviouslyoga2008-05-061-3/+107
| | | | | | | | | | fails. In order to allow this, implement an API so that drm and agp can share mappings for the BARs. Now it works as it should. tested by many. ok kettenis, miod said he'd look at it when it's in tree.
* Make agp(4) attach at vga(4) instead of pchb(4). This is because sometimesoga2008-03-161-3/+86
| | | | | | | | | | | | agp and drm need to use the same memory mapping, the best way to deal with that is to allow them to share (that's coming later), for this to work cleanly we move the attach point of agp. Ideally most agp drivers would attach at pchb, with only agp_i810 (and any that work similarly) attaching at vga, but this will do for now. ok kettenis@, miod@.
* Initial import of the DRM (direct rendering manager).oga2007-11-281-1/+16
| | | | | | | | | | | | | | | | | | | | | | This is the kernel part necessary for DRI support in X. Disabled for now because it still has a few bugs, but now I can work on it in tree. Also requires the requisite bits in X, which are currently under discussion on how to deal with them with privsep. ported from a combination of the free and netbsd implementations. Known bugs: 1) only the first occurence of X in any session will have dri, after that something prevents it working. 2) if the machine does not have a dri capable card, the kernel panics. Something's up in one of the probe functions. I haven't been able to find it though. 3) radeon cards need to be forced to use PCI mode otherwise they get into an infinite loop. This is known to at least kinda work with SiS, radeons in pci mode and intel cards. ok deraadt, kinda ok art, a few other people had a quick look.
* Make agp attach as a device. This means that many more agp bridgesoga2007-11-251-23/+1
| | | | | | | | | | actually get detected and attached. Also adds a kernel api for manipulating agp. Enable this on i386 and amd64. "I think you should commit it" deraadt@, ok matthieu. Looked over by several others.
* use DEVICE_IS_VGA_PCI in vga_pci_match()martin2007-11-031-16/+2
| | | | ok brad@ fgsch@ also tested by oga@
* Fix a number of issues with vesabios discovered by miod@gwk2007-01-281-2/+4
| | | | | | | | | | | | | | | | | 1. Add bounds checking to vga_pci_mmap, fixing a potential security issue. Limit the amount of memory to what the vbe info structure says the card card has. This should be nicely refined to limit to the amount of memory needed by the active resolution and depth but this will do for the time being. 2. Fix several places in vesafb.c where the return of kvm86_bios_addpage() isnt being checked. Also ensure that if vesafb_get_mode_info() fails that it cleans up after itself by releasing the page it added. 3. Correct the range checks in vesafb_putcmap and vesafb_getcmap, harmonize code with similar code found else where. ok miod@
* commit vesabios for matthieu@gwk2006-11-271-3/+102
| | | | ok deraadt, "slap it in" miod@
* Enable bus master; X probably needs it to do accelerated graphics.kettenis2006-07-201-1/+9
| | | | ok deraadt@
* Move the agpgart handling code to a separate file.matthieu2006-03-161-718/+15
| | | | | Ansify some remaining function declarations in vga_pci.c. ok miod@, dim@.
* bits of my tree commited by Matthieu by mistake.miod2006-03-151-1/+3
|
* Remove dead code (SUPPORTS_NON_CONSOLE and MD_DISPLAY_ISA_IOT)matthieu2006-03-151-14/+27
| | | | ok miod@, drahn@, dim@.
* Remove unnecessary lockmgr() archaism that was costing too much in termspedro2005-11-191-11/+11
| | | | | | of panics and bugfixes. Access curproc directly, do not expect a process pointer as an argument. Should fix many "process context required" bugs. Incentive and okay millert@, okay marc@. Various testing, thanks.
* be MI, use atop()martin2005-11-101-4/+2
|
* Typo in comments.miod2005-06-111-2/+2
|
* Remove OpenBSD/pegaos, this has been announced before but delayed untildrahn2004-05-031-5/+1
| | | | | the tree was stable. No point in code supporting a company which screws its employees being in the OpenBSD tree.
* Change these defines to be a display specific define and also removedrahn2004-02-041-6/+6
| | | | the really long define. ok deraadt@
* Work around a problem where the vga code expects to be able to map isadrahn2003-10-311-1/+17
| | | | io/memory space using PCI io/mem descriptors.
* remove a bunch of debugging printfs and disable agp_debug; prompted by millert@mickey2002-07-151-4/+1
|
* fix ioctl processing logic; problem reported by postman pechkinmickey2002-07-131-6/+6
|
* support for the agp gart on various agp chipsets.mickey2002-07-121-21/+758
| | | | | | | only i810 driver was tested though. based on the netbsd's lkm, initially ported by hunter@dg.net.ua and later made into shape by mickey. testing by art@ and millert@ .
* First round of __P removal in sysmillert2002-03-141-3/+3
|
* support a hook for vga_pci-based ioctls; aaron@ ookmickey2001-05-081-1/+14
|
* Don't print PCI device info twice during attach.aaron2000-11-191-3/+2
|
* Updated VGA driver; from NetBSD. Needed for wscons on i386 and alpha. Theseaaron2000-11-151-76/+28
| | | | | | | | | | | | | | | | | | | | files could probably be updated even a bit further (they are from mid-summer). In addition, I've added support for console scrollback, somewhat inspired by Linux's vgacon driver. Basically, instead of allocating our own buffer and doing lots of copies, we take advantage of Video RAM and just modify the VGA display origin register as appropriate. This approach has a few advantages: simple to implement, no wasted KVM, it's fast, and after a boot you can now scroll back all the way to the BIOS messages (assuming your msgbuf is of a typical length :). Disadvantages are that the VRAM buffer is relatively small (only 32k) and we do not support raster devices through this method. (thanks to mickey@ for pointing this out). The code for this is fairly unobtrusive, so should we come up with a better approach to console scrollback at a later time (i.e., even more platform independent) it should be easy to revert this. We're one step further in porting nice features of PCVT over to wscons.
* new style pci attach printingderaadt1998-01-051-5/+2
|
* Add some missing things for the MI vga driver. Move wscons to an MI place asniklas1997-11-061-0/+1
| | | | well. $OpenBSD$ tagging
* We need an MI vga driver. The alpha one was most MI. Not entirely yet though.niklas1997-11-061-2/+2
| | | | Some files were move behind CVS back.
* typecast vga_pci_match to cgmatch_tmickey1997-09-301-3/+5
| | | | compare pci tags w/ bcmp
* wscons -> vga_xxx -> vga mmap() support. first cutderaadt1997-08-221-0/+29
|
* alpha/common/ insults my filecderaadt1997-07-091-1/+1
|
* Sync with NetBSD 961207niklas1997-01-241-0/+155