/bin/rcp/

ockdoc-10.99.5'>lockdoc-10.99.5 NetBSD fork for lockdoc analysismerlin@scholz.ruhr
summaryrefslogtreecommitdiff
path: root/sys/dev/drm/drm_memory.c
AgeCommit message (Collapse)Author
2009-06-21remove the old drm sources.mrg
2009-02-15Only pull in genfb.h if _KERNEL_OPT is defined. Reported by Kurt Schreinerjmcneill
2009-02-15Use genfb_borrow; drm works with genfb now.jmcneill
2008-06-29Revert previous, i915drm works again.jmcneill
2008-06-20- Use the extent manager to track mappings and provide sane offsetbjs
"cookies" for mmap. Now the radeon driver works on amd64! - Use bus_dma for nearly all map types (carried over from prior patch). - Plug some lock leaks in drm_bufs.c and remove superfluous locking in drm_add_magic() (from git). - Lower spl of mutexes to IPL_NONE (and so are now adaptive instead of spin mutexes), save for irq_lock which is a spin mutex at IPL_VM. Use mutex_spin_enter()/mutex_spin_exit() for irq_lock. ok jmcneill@
2008-05-19Don't use MALLOC_DECLARE / MALLOC_DEFINE if building as a module.jmcneill
2008-05-18Allow building as a module.jmcneill
2008-05-06Revert last commit -- breaks i915.bjs
2008-05-06 A few steps down the yellow brick road toward bus_dma-ification:bjs
- Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up the bus_dma API. - Start using the above in drm_pci.c. - Add DRM_NETBSD_DMA_ADDR/DRM_NETBSD_DMA_VADDR macros. Locking: - Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM. - Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's sake. These two changes seem to eliminate the presistent lockups I was having (NetBSD-current/amd64 r300). - Start getting rid of DRM_SPININIT/DRM_SPINUNINIT and DRM_SPINLOCK/ DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they locks may or may not be spinlocks! It's a linux frob, really. We're way beyond merging any useful bsd-core code on a large scale, which was the only good reason to keep them around. Memory allocation: - Change drm_memory.c so that it contains generally useful, memory allocation functions using kmem(9) (mostly used by the drivers themselves). However, I expect to use this more in the future in the "bsd core". These functions always use KM_NOSLEEP. The new drm_dmamem_alloc function has a wait argument which takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma counterparts), and honors this hint in its calls to kmem(9) and bus_dma(9) functions. - Got rid of these functions' "area" argument--it's been deprecated for ages. Provide macros in drmP.h to deal with the os-independent code. - Declare these functions inline -- I believe they're used enough by the i915 and radeon drivers to justify it. Please let me know if I am mistaken. NOTE: With these changes, a glxgears score which was previously ~3900fps is now ~4400fps (same setup as mentioned above). I realize that using kmem(9) could cause problems, but I can't seem to run into any with my test setup. If anyone smells regression, please let me know.
2008-03-13Don't include i810 hack if DRM_NO_AGP is defined, as it results inbjs
an undefined symbol (agp_i810_borrow) at kernel link time.
2008-03-04-map 64-bit PCI BARsdrochner
-integrate some bits from upstream to support i965 from Yorick Hardy per PM
2008-02-22Add a horrible hack to allow the DRM driver to get at the bus_space_handledrochner
allocated by the AGP driver in the case of Intel chipset graphics. This is different from the patch by Yorick Hardy circulated a while ago in that it doesn't change the semantics of reference counting within the (3rd-party) DRM code -- it just bypasses it. Needless to say that it is uglier, but it eases future updates to the DRM code because the change there is just 2 LOC. Imo, a cleaner solution for all that would be to attach "agp" to "vga" in the intel chipset graphics case, which better reflects how the hardware is structured. This would still need a hack to the DRM code, but it would be confined to childs of the "vga" device, without need for global variables. Since there is a variety of intel chipsets with AGP and/or builtin graphics options, this would need a considerable testing effort.
2007-12-11use __KERNEL_RCSID()lukem
2007-11-21Remove #ifdef __OpSys__ sections to make this readable. Add RCS tags.bjs
Nothing done in header files, nor in dev/pci/drm (we might not want to touch this for the sake of merging) yet. Compile tested; please let me know if this broke anything.
2007-03-28Introduce options DRM_NO_AGP and DRM_NO_MTRR, so I can run this onjmcneill
platforms that don't provide these services. In drm_mmap, don't wrap the return value with atop() if we're on macppc. While we're here, fix: pci_intr_establish(&dev->pa.pa_pc, ...); to: pci_intr_establish(dev->pa.pa_pc, ...); The former doesn't even compile on macppc, and I'm amazed that it works at all anywhere else.
2007-03-21In drm_ioremap, provide extra slots for mapping AGP memory space; it's notjmcneill
reasonable to assume that these regions will show up in a VGA BAR.
2007-03-20Import DRM drivers, brought into shape by Yorick Hardy, posted to tech-x11.drochner
Minor modifications by me: -use an mi device major number -(coarsly) divided into pci card specific and less specific parts, moved the latter to dev/drm -renamed autoconf attributes to reflect this Todo: -adapt all card frontends but i915 to drm include file location -review the mtrr change -make the change to agp_i810.c coexist with the fix for buggy VESA BIOSes which is commented out temporarily -RCS IDs etc style stuff -LKM support (rescan support for vga) -test