summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
AgeCommit message (Collapse)Author
2008-09-05The helper functions in this file are only used in one place andOwain Ainsworth
relatively small, so inline them. This shrinks the kernel by about 500 bytes and saves a tree lookup.
2008-09-05fix vblank interrupt mask. Unbreaks sync-to-vblank and anything thatOwain Ainsworth
needs the actual interrupts. Oops!
2008-09-02If we need a physical hardware status page, initialise it at device attachOwain Ainsworth
instead of putting up and tearing down on open and close, some chips got unstable with it being done repeatedly. From drm git. Tested by several.
2008-09-02Track progress inside of batchbuffers so we know the hardware isn'tOwain Ainsworth
wedged. This avoids early temination of long-running commands. From Keith Packard, via drm git. Tested by several on various chipsets.
2008-09-02detypedef some more. No functional change.Owain Ainsworth
2008-09-01avoid loosing return value from copyin, and properly return it.Charles Longeau
initial patch from me, reworked by oga@. found by LLVM/Clang Static Analyzer. ok oga@
2008-09-01fix null dereference.Charles Longeau
initial patch from me, reworked by oga@. found by LLVM/Clang Static Analyzer. ok oga@
2008-09-01convert a tsleep back to msleep that got lost in a previous upstream merge.Owain Ainsworth
Won't sleep with a spinlock here anymore.
2008-09-01Add Interrupt mitigation for the i9XX user_irq, should save a bit of power;Owain Ainsworth
from drm git.
2008-08-29Build with mtrr support on amd64. This really should have gone in inOwain Ainsworth
edmonton, but I forgot. ok and extra testing phessler@.
2008-08-29Don't memcpy too far whem drm_realloc() is called with a smaller size.Owain Ainsworth
This was never noticed since it's always used with a larger size. Noticed by Stephane Marchesin.
2008-08-28Ignore xserver provided mmio address. We already have it. From git.Owain Ainsworth
2008-08-28Ignore userland provided batchbuffer start parameter, we can determineOwain Ainsworth
it ourselves. From drm git.
2008-08-28set sarea_priv to NULL to prevent possible access on next open/close.Owain Ainsworth
From Robert Noland via drm git.
2008-08-28Kill the ifdefed out ttm interface stuff. The intel driver hasOwain Ainsworth
definitively gone for GEM so this will not be needed. No binary change.
2008-08-28This file was meant to be removed with the last commit, it's now emptyOwain Ainsworth
and unused.
2008-08-28replace usage of drm_memrange with extent(9). No functional change, butOwain Ainsworth
should shrink the kernel somewhat. For some strange reason I was unaware of this api when I pulled in these changes. tested by myself and Paul de Weerd, thanks!
2008-08-21Rip out the remnants of the vblank signal stuff. Nothing uses it, andOwain Ainsworth
it's stupid anyway. Most of this was ifdefed out.
2008-08-21Instead of having a number of malloced arrays for vblank handling, justOwain Ainsworth
put them in a structure and malloc free an array of those, it is nicer that way and They're all needed at the same time, anyway. Idea taken from a suggestion on the dri-devel mailing list.
2008-08-18Another dead struct member.Owain Ainsworth
2008-08-17kill struct drm_freelist, after removing markbufs and infobufs nothingOwain Ainsworth
touches it.
2008-08-17Kill a dead function and a dead struct member.Owain Ainsworth
2008-08-17Check the return value of agp_enable() instead of assuming it completed.Owain Ainsworth
apply some knf and other formatting while i'm at it. problem originally pointed out by Tobias Ulmer, thanks!
2008-08-17Kill the infobufs and markbufs calls. Nothing uses them.Owain Ainsworth
2008-08-17kill the stupid pci capability defines, we have our own. Don't wrapOwain Ainsworth
pci_read_capability while i'm at it.
2008-08-17drm_load() and drm_unload() are a remnant of code meant to be sharedOwain Ainsworth
between the bsds. Just put them in attach/detach instead. Kills a little bit of dead code, too.
2008-08-17Kill some redundant ifdefs, they're taken care of elsewhere.Owain Ainsworth
2008-08-17Make sure we can't sleep with a spinlock heldOwain Ainsworth
2008-08-16Apply a light paddling with the knf stick. No binary change.Owain Ainsworth
2008-08-13Make sure that we don't sleep with a lock held, some small cleanup whileOwain Ainsworth
i'm here.
2008-08-13Check for zero in drm_calloc() to prevent divide-by-zero. Also rearrangeOwain Ainsworth
the two calls to drm_calloc() that had nmemb and size the wrong way around.
2008-08-13Kill file_priv->refs, it is always 1. Also move two things from theOwain Ainsworth
softc into file_priv since otherwise the wrong value could rarely be used.
2008-08-13Change the drm_lock*() api to take a pointer to the struct as aOwain Ainsworth
parameter, this makes things a little cleaner and removes the need to pass in the softc for some functions.
2008-08-13idgen32 wasn't really right here. Change back to how it was, butOwain Ainsworth
done a little nicer. Advice from deraadt@.
2008-08-13Generate the magic id using idgen32(). While i'm here fix the locking aOwain Ainsworth
bit so we don't sleep with a spinlock. ok djm@.
2008-08-13Kill a bunch of the drm context code that nothing uses anymore, theOwain Ainsworth
xserver only actually uses a small part of it nowadays. Kill a few other dead bits from the drmP.h while i'm here.
2008-08-10'flus' -> 'flush', 'waitinf' -> 'waiting'. From Dawe via tech@.Kenneth R Westerback
2008-08-02Make the drm attach messages a lot prettier.Owain Ainsworth
the DRM_{INFO,ERROR,DEBUG} printf macros still need some __VA_ARGS__ love. reyk@ and marco@ liked this, prompted by deraadt.
2008-07-30fix up a few free -> drm_free() cases that were missed before.Owain Ainsworth
2008-07-29Update to DRM git.Owain Ainsworth
Some stability fixes for radeon. The most part of this diff is related to fixing up the VBLANK (vertical blank interrupt) handling. Now, if the X driver supports the DRM_IOCTL_MODESET_CTL ioctl, (to be used when changing the video modes), then allow the vblank to be disabled once that ioctl has been called. Otherwise, keep the interrupt enabled at all time, since disabling it otherwise will lead to problems. Tested by a few. "no problem" on API/ABI deraadt@.
2008-07-29Switch all instances of malloc/free in the DRM to drm_alloc, drm_freeOwain Ainsworth
and drm_calloc. With the recent change to check overflow in drm_calloc, this means that all allocations that require multiplication are now checked. Also use drm_calloc() when zeroing is needed and drop the bzero/memset afterwards. Finally, make drm_free() check for NULL, so we don't need to do so every time. ok miod@, deraadt@
2008-07-29Stricter bounds checking for values controlling loops or memory allocations,Miod Vallat
which may come from userland via ioctls. ok oga@
2008-07-29Check for multiplication overflow in drm_calloc(). ok oga@Miod Vallat
2008-07-15Remove some debug code that i forgot to remove in a previous commit.Owain Ainsworth
Pointed out by Chris Cappuccio, thanks!
2008-07-10the DRM_{READ,WRITE}$NUMBER() macros currently useOwain Ainsworth
bus_space_{read,write}(). A bug in the code this was based on means that this is also used for scatter gather maps, which are bus_dma memory, not pci memory. This obviously fails. Pull them out into a function and Special case scatter gather to use the mapped virtual address to write instead. Makes writeback test pass on pci and pci express radeon cards. Tested by, among others ckuethe@ and sthen@.
2008-07-07The current drm_locked_task*() code sometimes tries to sleep in anOwain Ainsworth
interrupt handler. This is bad and wrong. So change it so that if we can't immediately grab the hardware lock, to just leave the task flagged so that we can run it when we release the lock. The linux implementation uses a similar scheme. Tested by guenther@, landry@ and bernd@. Also tested by many a while ago as part of a larger diff.
2008-07-03Add the pci id and driver flags flags parts for the previous two updatesOwain Ainsworth
(radeon and intel) tested by a few (as part of the updates)
2008-07-03Oops.. missed these files out of the radeon git update.Owain Ainsworth
>Update the radeondrm driver to be level with drm git. > >adds: > >- support for RS400 chips >- some cleanup of a few things >- fixes a hard lockup for r3-500 cards. > >Tested by a few
2008-07-03Update the inteldrm driver to drm git.Owain Ainsworth
changes: - Support for intel 4 series chipsets (i'll do any relavent agp bits for these as soon as i grab the datasheet and find a testcase) - fix scheduled buffer swaps on non 965 chipsets - major reorder, dedup and general cleanup of register definition and the header file Tested by a few, no regressions
2008-07-03Update the radeondrm driver to be level with drm git.Owain Ainsworth
adds: - support for RS400 chips - some cleanup of a few things - fixes a hard lockup for r3-500 cards. Tested by a few