summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/drmP.h
AgeCommit message (Collapse)Author
2009-04-03Convert DRM_WAIT_ON to take additional parameters, the wmsg for msleep,Owain Ainsworth
and the lock to manipulate. first step of removing drm_irq_handler_wrap which just grabs the irq_lock, and eventually irq_lock. drivers should manage their own.
2009-04-03Cleanup. These definitions should have died when I removed the lock_timeOwain Ainsworth
member from the lock structure.
2009-03-31remove the drm_read and drm_write functions. instead just do theOwain Ainsworth
conditional on whether we treat the data like memspace or system memory into the one driver that needs this. Something similar was done upstream a while back.
2009-03-30Remove the DRM_SPIN lock macros, just expand them to mutex operations.Owain Ainsworth
2009-03-29Remove the lock_time member from the hardware lock. It's not thatOwain Ainsworth
useful, and driver shouldn't need to know about ``ticks''.
2009-03-27Push the per-driver dma hook a little further down.Owain Ainsworth
All for all the drivers using the dma-bufs interface, their per-driver ioctl hooks all started out the same way, followed by a call to another function to actually select the buffer. Save some space by moving that selection logic into the main dma_ioctl call, and make the second function the hook.
2009-03-27Rework the dma buffer api a bit to make it smaller and to have lessOwain Ainsworth
duplicated code. Also, switch the dma_lock to a rwlock (it never should have been a spinlock) and move it and some other accounting data into the dma structure, not the main softc. Finally, the funcitons in drm_dma are tiny, move them in with the rest of the dma_bufs api in drm_bufs and remove the file.
2009-03-27Remove a bunch of compat macros, just expand them to the openbsdOwain Ainsworth
equivalent.
2009-03-26Rework how we deal with the list of per-open datastructures, and theOwain Ainsworth
auth list. now we only need the one tree. Makes things a little neater, and smaller.
2009-03-26The drm_* allocation functions have been #defined to not use most ofOwain Ainsworth
their arguments for a while. Actually go through the code and remove the extraneous arguments. Makes things easier to read.
2009-02-15Remove some dead and unneeded defines, types and prototypes.Owain Ainsworth
2009-02-15Remove drm_pci_alloc and associated definitions.Owain Ainsworth
2009-02-15convert drm_scatter code over to using the new dmamem api.Owain Ainsworth
removes the custom code in there, so shrinks the kernel by a few bytes. Convert other code to deal with data structure changes.
2009-02-15convert the pcigart case where the gart table is in system memory overOwain Ainsworth
to use the new api. More cleanup to this file coming soon.
2009-02-15Convert CONSISTENT maps over to dmamem api.Owain Ainsworth
2009-02-15convert drm_addbufs_pci over to new dmamem api.Owain Ainsworth
2009-02-15introduce drm_dmamem_alloc() to allocate dma memory with bus_dma.Owain Ainsworth
The next few commits will convert calls to drm_pci_alloc (which I hate) over to this new api, and convert other handrolled stuff over too. First part of my cleaning up bus_dma useage in drm.
2009-02-05Merge the static block allocation code from {i915,radeon}_mem.c intoOwain Ainsworth
non-static code that's shared between both. While i'm here convert them to TAILQ. Eventually, both of these will die, but until then I'd rather shave the space in the kernel. Tested on radeon and intel.
2009-01-29Similar to my last commit, it's stupid to have a file with two veryOwain Ainsworth
small functions in it. Move them to main driver file.
2009-01-29Move drmmmap to the main driver file. It's stupid to have a file withOwain Ainsworth
one (not particlarly large) function in it.
2009-01-29drm_getmap and interface can die too.Owain Ainsworth
2009-01-29Rip out the drm_drawable support. There is no need for the xserver toOwain Ainsworth
push cliprects into the kernel anymore so no op the ioctls. The only consumer of this information died a couple of months ago. When i've got removal of these calls from userland upstream i'm going to remove them from the interface entirely.
2009-01-27While printing is turned off by default, the debug code was stillOwain Ainsworth
compiled into drm. I'd forgotten about that. if DRMDEBUG is defined, build in the printfs, else no-op them. Shaves a bunch of string from the kernel Fix two cases in mach64_irq.c where this would lead to unused variable warnings. Reminded by an entirely different comment by djm@.
2008-11-29Fix a possible NULL pointer dereference. Spotted by Tobias Ulmer; thanks!Owain Ainsworth
2008-11-24back out the buf_priv change. it made some incorrect assumptions andOwain Ainsworth
broke radeondrm. Fixing it is ugly, so another change will have to be made later. I /hate/ the drm_buf api, it will die as soon as it can.
2008-11-24Fixup wakeup pointers. interrupts work properly again.Owain Ainsworth
2008-11-24do the same for struct drm_file (file_priv) as previously done forOwain Ainsworth
dma_bufs; allow the driver to provide the size and not have the private data pointer. only radeon only needs this so far, but intel with GEM also needs it. Postclose was only used for freeing said private data, so this allows me to remove the postclose callback and rename preclose to close.
2008-11-24Instead of having a ``private data'' pointer in the dma buffers, justOwain Ainsworth
ask the driver how large they need the structure we allocate to be, and use inheritance like we do for struct device. Simplifies things a little bit and saves us a pointer.
2008-11-24change drm_attach_mi to drm_attach_pci. we take the pci_attach_args, andOwain Ainsworth
setup the drm_attach_args with the needed information. require interface version 1.1 libdrm has been requesting it for ages), which means that we can set the busid string at attach time. (generated in drm_attach_pci), also pass in the interrupt line and bst. Now we don't need dev->pa at all, so remove it, finally.
2008-11-24make device works out if it's agp and tells the drm driver, not theOwain Ainsworth
other way round. More dev->pa reduction
2008-11-24instead of functions that just return an error, just inline them intoOwain Ainsworth
the ioctl handler.
2008-11-23pass in the dmat when we attach the drm driver. reduces pci dependancy.Owain Ainsworth
2008-11-23#define away unused arguments for the drm_alloc functions. to save someOwain Ainsworth
size. kill (empty) drm_mem_{un,}init() while here.
2008-11-23Map device interrupts in the attach routine. and remove more need forOwain Ainsworth
dev->pa by doing the pci_intr_establish/disestablish dance in the driver function, not in drm. This removes the need for interrupt_{pre,post}install callbacks, instead just provide a interrupt_install() callback.
2008-11-23Move vblank data allocation to happening at attach, not at irq enable.Owain Ainsworth
just put a vblank_pipes argument to the driver structure which tells us how many to set up this means that intel doesn't lose all vblank count on vtswitch (it disables the interrupt there), i've heard of a few uvm_faults where this happens as well as things just going wrong. This was suggested by Keith Packard who provided a different diff for drm.git.
2008-11-22using ``wait queues' for sleep is a linuxism. Kill them and just sleepOwain Ainsworth
on the softc.
2008-11-22Make all drm drivers map their mmio register space on attach instead ofOwain Ainsworth
using the drm_maps interface (this was done for inteldrm a few days ago). All drivers now ignore the mmio_offset argument that the init ioctl takes. This clears up the code and makes sure that drm_ioremap_core() doesn't need the vga_pci_map inteface anymore, so we don't have to pass in the vga softc anymore. We also get to kill the drm_resource_{start,length} linux-alike functions since we just calculate all the requisite offsets at startup and cache those we need. This now means that technically the only driver that needs the vga_pci_map api is inteldrm (due to sharing with intagp issues), though this diff doesn't convert them over.
2008-11-22drm_device_is_pcie is only needed in one place: radeondrm_attachOwain Ainsworth
so just inline it there. also remove dev->pci_vendor and dev->pci_device, and insert pci_device into the one place any of them are needed (inteldrm's interface can give this info to the X driver. to remove that you'd need to fix X too).
2008-11-22Move the drm drivers over from:Owain Ainsworth
vga1 at pci0 inteldrm0 at vga1 to vga1 at pci0 inteldrm0 at vga1 drm0 at inteldrm0 i.e. a similar scheme to audio(4) where the interface attaches on top of the wildly different drivers. This helps to clean up the code a lot (more is coming) and help me start to move drm to being essentially bus independent, which will help in the future.
2008-11-22Remove the driver->load callback and just do all the initialization inOwain Ainsworth
the attach function. First step towards splitting drm off as it's own (bus independant) device, as it should be.
2008-11-22reduce the dependancy of drm_pci_alloc upon the drm device softc. JustOwain Ainsworth
pass in the dma tag
2008-11-22Remove dev->id_entry, it is no longer needed.Owain Ainsworth
2008-11-22Remove the strings from the pcidevs arrays. they are no longer needed and areOwain Ainsworth
just wasting space.
2008-11-18Remove dev->agp_buffer_token, linux needs it, we do not.Owain Ainsworth
2008-11-17Instead of using a width-1 bitfield for storing the driver capabilitiesOwain Ainsworth
in the callback structure, just use a bunch of ORed together bits. This has been annoying me for ages.
2008-11-17rework how we handle ioctls.Owain Ainsworth
Before it was based on a static array with flags. Instead, let the driver provide an ioctl callback, which deals with things appropriately. Makes the code a bit easier to read, and also drops just over 5k on an amd64 kernel build with all drm drivers enabled. Tested by a few.
2008-11-11Fix prototype for drm_addmap(), okay oga@.Pedro Martelletto
2008-11-06Oops. Forgot to commit this chunk with the last commit.Owain Ainsworth
Remove softc members and prototypes related to the tasklet system.
2008-10-28make DRM_INFO() a bit less gross, though getting all the grossness out at ↵Theo de Raadt
once is impossible; ok oga
2008-10-07Kill the linux-ready negative return codes in ``shared'' code. We handleOwain Ainsworth
them wrong in several cases that i've noticed and Merging when needed is still fairly simple, anyway. This shaves another 500 bytes from an amd64 kernel due to not having to flip the sign on some things. It also stops my eyes bleeding. Tested by a few along with the last diff that went in.