summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
AgeCommit message (Collapse)Author
2008-11-19I'm clever and commited the wrong patch. Here's the correct one.Owain Ainsworth
This should close kernel/5995.
2008-11-18instead of going through the drm_map interface, just map the mmioOwain Ainsworth
registers directly (via the memory sharing interface that intagp uses). It doesn't need to be in a map structure. Idea taken from some of intel's work.
2008-11-18Remove a bunch of #ifdef __linux__ code that only serves to confuse me.Owain Ainsworth
2008-11-18Remove dev->agp_buffer_token, linux needs it, we do not.Owain Ainsworth
2008-11-17garbage collect i915_vblank_swap.Owain Ainsworth
2008-11-17Manage vblank interrupts using the PIPESTAT register.Owain Ainsworth
The pipestat register needs tweaking when enabling vblanks, and doing this and playing with the IMR seems to lead to problems, so just leave them always unmasked and just tweak PIPESTAT. From Keith Packard at Intel.
2008-11-17Don't put the buffer counter in a reserved part of the status page.Owain Ainsworth
From intel.
2008-11-17Conditionalise the use of the SAREA in inteldrm. In DRI2 setups (which we don'tOwain Ainsworth
support yet, but will) it won't exist, prepare for this by only writing to it if it's there. Bits of this came from Eric Anholt at intel.
2008-11-17drm advertises a read and poll method. this was there to prevent errrorsOwain Ainsworth
on rather old xservers. Said old xservers haven't been around in quite a long time so just remove them. Since the only function left in drm_fops.c is a small helper function, just move it to drm_drv.c and nuke the redundant file. no one objected when I said I was going to do this.
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-11Remove the (unworking to the point it doens't even compile) viadrm driver.Owain Ainsworth
Eventually a drm driver for via hardware may be written, but it will be utterly different to this one. No one objected, ok matthieu@.
2008-11-11Fix prototype for drm_addmap(), okay oga@.Pedro Martelletto
2008-11-10Fix the bits to enable bus mastering mode on some newer chips. FromOwain Ainsworth
Alex Deuchar via drm git.
2008-11-10Make writeback work on after a suspend. From Dave Airlie via drm git.Owain Ainsworth
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-11-06Make sure we do not unlock twice.David Hill
nice catch, oga@
2008-11-06Remove the drm_locked_tasklet interface. The only consumer that used itOwain Ainsworth
was the i915 vblank swap ioctl, which just went kaput.
2008-11-06The i915 vblank swap ioctl is fundamentally racy.Owain Ainsworth
using it allowed rendering to continue while waiting for a vblank swap, and often this lead to flickering and rendering a new scene before the swap. this broke a lot of things. With the removal of this swap, userland falls back to the old way of waiting for the vblank then doing the swap itself, this is smooth enough. I decided independantly to kill this, but the intel guys recently concurred. Comment change comes from Eric Anholt at intel.
2008-11-04If we need to call the tasklet function on unlock, we don't need to holdOwain Ainsworth
tsk_lock (which blocks irqs) for the whole call of the function, just when we manipulate the function pointer.
2008-11-04Kill some more ttm only defines. No binary change.Owain Ainsworth
2008-11-04The drawable spinlock is no longer ever held in interrupt context (andOwain Ainsworth
won't be). It doesn't need to block interrupts anymore so switch to IPL_NONE.
2008-11-04Enable IMR passthrough of vblank events before enabling it in theOwain Ainsworth
pipestat register. Fixes a nasty race where the bit would get set without being reflected in the interrupt register, so we'd never get another vblank interrupt. Also, use the user_irq_lock to also protect vblank register writes, since it covers the same register. From Eric Anholt and Keith Packard at Intel.
2008-11-04Hold the drm lock around all things that touch the ringbuffer.Owain Ainsworth
Not strictly needed in the non-gem case, but it will be needed then, and doesn't hurt now. From Eric Anholt at intel.
2008-11-04revert the pageflipping and vblank sync code to the older style thatOwain Ainsworth
doesn't handle triple buffering (which has been marked ``don't use this, it's unstable'' for ever anyway) While the code just removed is in drm git. it's not planned to go any further, due to being a horribly ugly hack. Instead a proper fix which will depend on memory management is planned. So revert this stuff here, since it's now dead. Testing shows no regressions.
2008-10-31Remove the vblank_pipe member of the softc and noop the ioctl that setsOwain Ainsworth
it. Since the vblank handling got reworked this is very much unneeded.
2008-10-31Remove another interface (this one for ARB_Occlusion_Query) that we'veOwain Ainsworth
never used (mesa did a version check that never passed on our kernel). The correct way to do this is in mesa master and requires memory management.
2008-10-30Bunch of cleanup. Kill some dead variables and some stupid code.Owain Ainsworth
Some ideas taken from upstream.
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-23Don't print redundant information in dmesg.Owain Ainsworth
Prompted by deraadt, kettenis@.
2008-10-23remove some funky charactersjoshua stein
ok oga@
2008-10-17Fix permissions on the DRM_I915_HWS_ADDR ioctl, should be master only.Owain Ainsworth
Pointed out by Olaf Kirch, this has been in snaps for two weeks, no problems. ok millert@, deraadt@
2008-10-15Fix list_for_each_safe compat marco. It currently skips the last entry.Owain Ainsworth
From Robert Noland at FreeBSD.
2008-10-11Fix various printf constructs either missing arguments or format specifiers.Miod Vallat
2008-10-07Kill a bunch of #ifdef freebsd/netbsd code in *_drv.c. No binary change.Owain Ainsworth
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.
2008-10-07Move dev->driver over to being a pointer to a const struct, instead of stupidlyOwain Ainsworth
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.
2008-09-29Put back the ``address'' field to struct drm_buf, this allows machdrm toOwain Ainsworth
actually compile again (no one's tested it yet, still and I don't have one).
2008-09-29Fix mmap to always return the right value in the error path. While i'mOwain Ainsworth
here rework it a little bit to remove a shadowed variable.
2008-09-18Rework the drm locking to be at least halfway sane. The freebsd codeOwain Ainsworth
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.
2008-09-1040-bit GART support for PCIE devices. From drm git a while ago.Owain Ainsworth
Tested by a few, no regressions for normal use.
2008-09-10Kill the max_context member of the softc, it does nothing useful.Owain Ainsworth
2008-09-09Kill some stupid agp api wrapper functions, just use the agp apiOwain Ainsworth
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.
2008-09-07Kill some unneeded defines and struct members.Owain Ainsworth
2008-09-06Something else that nothing calls.Owain Ainsworth
2008-09-06Kill some more unused struct fields and the cases for them.Owain Ainsworth
2008-09-06Kill the stats data structures and noop some other parts. Nothing inOwain Ainsworth
userland asks for these stats, and we stopped recording anything interesting a while back.
2008-09-05The code for cleaning up errored buffers and for cleaning up at the endOwain Ainsworth
is the same. Factor them into one function. Saves another 450 bytes on amd64.
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!