Age | Commit message (Collapse) | Author |
|
in the callback structure, just use a bunch of ORed together bits. This
has been annoying me for ages.
|
|
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.
|
|
|
|
Remove softc members and prototypes related to the tasklet system.
|
|
once is impossible; ok oga
|
|
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.
|
|
filling in a pre-allocated one on each attach.
Makes the code a bunch nicer, shrinks a kernel by about 1.5k on amd64,
helps with my sanity, and paves way for later changes.
Tested by a few for a couple of weeks now.
|
|
actually compile again (no one's tested it yet, still and I don't have
one).
|
|
held a lock over all driver ioctls in order to be ``mpsafe''. Stop lying
to ourselves for a start. This code is not fully mpsafe, and should not
pretend to be so. Put the locking around where it should, and rely on
biglock for the rest. This will need to be fixed, but avoids some of the
horrible that we have right now.
Tested by many over a long time and several iterations.
|
|
|
|
directly. While i'm here, factor out some common functionality into a
separate function, and kill some typedefs (man this code is full of
them...). Shaves another 450 bytes off the kernel.
Tested by ckuethe and Paul de Weerd, thanks.
|
|
|
|
|
|
userland asks for these stats, and we stopped recording anything
interesting a while back.
|
|
is the same. Factor them into one function. Saves another 450 bytes on
amd64.
|
|
|
|
edmonton, but I forgot.
ok and extra testing phessler@.
|
|
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!
|
|
it's stupid anyway. Most of this was ifdefed out.
|
|
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.
|
|
|
|
touches it.
|
|
|
|
|
|
pci_read_capability while i'm at it.
|
|
|
|
softc into file_priv since otherwise the wrong value could rarely be
used.
|
|
parameter, this makes things a little cleaner and removes the need to
pass in the softc for some functions.
|
|
done a little nicer.
Advice from deraadt@.
|
|
bit so we don't sleep with a spinlock.
ok djm@.
|
|
xserver only actually uses a small part of it nowadays.
Kill a few other dead bits from the drmP.h while i'm here.
|
|
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@.
|
|
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@
|
|
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@.
|
|
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.
|
|
``struct drm_device'' and ``struct drm_file'' respectively. Since i'm
changing a lot of prototypes anyway, remove all parameter names from
prototypes, in accordance with style(9) (and sanity).
|
|
|
|
drm_{open,close,poll,read,mmap,ioctl} into the form that cdev_decl()
likes, and nuke the #defines.
|
|
While i'm here cleanup some duplicated #includes and reorder slightly.
|
|
All the code was ifdefed out anyway and it wasn't really useful.
|
|
address. This is just plain wrong. scatter/gather on amd64 didn't work
here, since char device mmap doesn't take negative offsets so higher
kvas fail.
Instead, prematurely import drm_memrange which is needed for the memory
managers (GEM or TTM), and is used to manage GART space. Then, horribly
abuse it to allocate mmap offsets, fixes up the issues.
"just commit it" art@.
|
|
card-specific files with a few minor changes elsewhere.
The main change to the OpenBSD specific stuff is the change to the irq
api due to the vblank rework.
4 more large bugs known, I have a fix for one.
Tested by many. prompted by deraadt@.
|
|
i'm modifying this code anyway, prepare for privsep by making it so that
"master" openers must be root, and remove some spurious suser() checks.
For example, every DRM_ROOT_ONLY ioctl is also DRM_MASTER. Without this
change, privsep wouldn't work since the fd is no longer root owned.
With this, X privsep should work as soon as the userland bits are done
(currently unwritten).
Looked over by kettenis@, ok thib@.
|
|
|
|
relavent config goo.
DRM_NO_MTRR is still needed on amd64 since the mtrr apis differ between
it and i386.
ok kettenis@.
|
|
api. So drm_locked_tasklet() is wrong.
Fix this up to be at least mostly correct.
|
|
|
|
The code we inherited from FreeBSD used vtophys is a fair few places,
nuke that and replace with bus_dma. technically _DRM_SHM should be
managed with uao_create(), but until we move away from mmap and into an
ioctl to map, this will do.
This also paves the way for amd64 support (it lacks vtophys).
ok kettenis, miod looked at it a while back too.
|
|
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.
|
|
inherited from the original drm driver.
input and ok oga@.
|