Dave Airlie [Sun, 5 Nov 2006 08:46:53 +0000 (19:46 +1100)]
add powerpc mmio swapper to NV_READ/WRITE macros
Dave Airlie [Sun, 5 Nov 2006 08:46:30 +0000 (19:46 +1100)]
remove config.h
Stephane Marchesin [Sat, 4 Nov 2006 19:39:59 +0000 (20:39 +0100)]
Add some getparams.
Stephane Marchesin [Sat, 4 Nov 2006 15:56:10 +0000 (16:56 +0100)]
Move the context object creation flag handling to the drm.
Ben Skeggs [Tue, 17 Oct 2006 15:37:19 +0000 (02:37 +1100)]
Remove hack which delays activation of a additional channel. The previously active channel's state is saved to RAMFC before PFIFO gets clobbered.
Ben Skeggs [Tue, 17 Oct 2006 14:07:48 +0000 (01:07 +1100)]
Oops, we have more than 4 subchannels..
Ben Skeggs [Tue, 17 Oct 2006 12:44:05 +0000 (23:44 +1100)]
Useful output on a FIFO error interrupt.
Ben Skeggs [Tue, 17 Oct 2006 12:08:03 +0000 (23:08 +1100)]
typo
Ben Skeggs [Tue, 17 Oct 2006 01:33:49 +0000 (12:33 +1100)]
NV40: *Now* fifo ctx switching works for me..
Ok, I lied before.. it was a fluke it worked and required magic to repeat it..
It actually helps to fill in RAMFC entries in the correct place.
The code also clears RAMIN entirely instead of just the hash-table.
Ben Skeggs [Mon, 16 Oct 2006 20:29:31 +0000 (07:29 +1100)]
NV40: FIFO context switching now WorksForMe(tm)
Ben Skeggs [Mon, 16 Oct 2006 19:37:40 +0000 (06:37 +1100)]
Setup NV40 RAMFC (in wrong location.. but anyway), rearrange the RAMFC setup code a bit.
Ben Skeggs [Mon, 16 Oct 2006 19:12:18 +0000 (06:12 +1100)]
Some info on NV40's RAMFC
Stephane Marchesin [Sat, 14 Oct 2006 22:12:13 +0000 (00:12 +0200)]
Merge branch 'master' of git://anongit.freedesktop.org/git/mesa/drm into nouveau-1
Stephane Marchesin [Sat, 14 Oct 2006 14:36:11 +0000 (16:36 +0200)]
Again more work on context switches. They work, sometimes. And when they do they seem to screw up the PGRAPH state.
Stephane Marchesin [Fri, 13 Oct 2006 23:21:31 +0000 (01:21 +0200)]
Add the missing breaks.
Stephane Marchesin [Fri, 13 Oct 2006 20:35:22 +0000 (22:35 +0200)]
Fix the fifo context size on nv10, nv20 and nv30.
Ben Skeggs [Fri, 13 Oct 2006 19:57:49 +0000 (06:57 +1100)]
Fix some randomness in activating a second channel on NV40 (odd GET/PUT vals). Ch 1 GET now advances, but no ctx_switch.
Stephane Marchesin [Thu, 12 Oct 2006 19:18:55 +0000 (21:18 +0200)]
Oops.
Stephane Marchesin [Thu, 12 Oct 2006 15:31:49 +0000 (17:31 +0200)]
Still more work on the context switching code.
Stephane Marchesin [Wed, 11 Oct 2006 23:08:15 +0000 (01:08 +0200)]
More work on the context switch code. Still doesn't work. I'm mostly convinced it's an initialization issue.
Stephane Marchesin [Tue, 10 Oct 2006 22:28:15 +0000 (00:28 +0200)]
Context switching work.
Added preliminary support for context switches (triggers the interrupts, but hangs after the switch ; something's not quite right yet).
Removed the PFIFO_REINIT ioctl. I hope it's that a good idea...
Requires the upcoming commit to the DDX.
Roland Scheidegger [Tue, 10 Oct 2006 00:24:19 +0000 (02:24 +0200)]
only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither.
George Sapountzis [Mon, 2 Oct 2006 03:13:38 +0000 (06:13 +0300)]
Bug 6242: [mach64] Use private DMA buffers, part #4.
mach64_state.c: convert the DRM_MACH64_BLIT ioctl to submit a pointer to
user-space memory rather than a DMA buffer index, similar to DRM_MACH64_VERTEX.
This change allows the DDX to map the DMA buffers read-only and eliminate a
security problem where a client can alter the contents of the DMA buffer after
submission to the DRM.
This change also affects the DRI/DRM interface. Performace-wise, it basically
affects PCI mode where I get a ~12% speedup for some Mesa demos I tested.
This is mainly due to eliminating an ioctl for allocating the DMA buffer.
mach64_dma.c: move the responsibility for allocating memory for the DMA ring
in PCI mode to the DDX.
This change affects the DDX/DRM interface and unifies a couple of PCI/AGP code
paths for ring memory in the DRM.
Bump the mach64 DRM version major and date.
George Sapountzis [Mon, 2 Oct 2006 02:46:42 +0000 (05:46 +0300)]
Bug 6242: [mach64] Use private DMA buffers, part #3.
Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional
flag is needed, since PCI DMA buffers do not have an associated map.
George Sapountzis [Mon, 28 Aug 2006 02:44:37 +0000 (05:44 +0300)]
Bug 6242: [mach64] Use private DMA buffers, part #2.
Factor out from mach64_dma_dispatch_vertex() the code to reclaim an unsed
buffer, in preperation for using it in mach64_dma_dispatch_blit() also.
George Sapountzis [Sat, 15 Jul 2006 23:15:02 +0000 (02:15 +0300)]
Bug 6242: [mach64] Use private DMA buffers, part #1.
Factor out from mach64_freelist_get() the code to reclaim a completed buffer,
this is to improve readability for me.
George Sapountzis [Sat, 15 Jul 2006 22:02:06 +0000 (01:02 +0300)]
Bug 6209: [mach64] AGP DMA buffers not mapped correctly.
Map the DMA buffers from the same linear address as the vertex bufs. If
dev->agp_buffer_token is not set, mach64 drm maps the DMA buffers from
linear address 0x0.
Michel Dänzer [Mon, 2 Oct 2006 13:33:19 +0000 (15:33 +0200)]
Fix type of second argument to spin_lock_irqsave().
Michel Dänzer [Mon, 2 Oct 2006 09:04:42 +0000 (11:04 +0200)]
Make locked tasklet handling more robust.
Initialize the spinlock unconditionally when struct drm_device is filled in,
and return early in drm_locked_tasklet() if the driver doesn't support IRQs.
Felix Kühling [Mon, 2 Oct 2006 08:50:40 +0000 (10:50 +0200)]
drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
Michel Dänzer [Fri, 29 Sep 2006 08:27:29 +0000 (10:27 +0200)]
i915: Only schedule vblank tasklet if there are scheduled swaps pending.
This fixes issues on X server startup with versions of xf86-video-intel that
enable the IRQ before they have a context ID.
Michel Dänzer [Wed, 27 Sep 2006 16:22:10 +0000 (18:22 +0200)]
i915: Avoid mis-counting vblank interrupts when they're only enabled for pipe A.
It looks like 'after a while', I915REG_INT_IDENTITY_R for some reason always has
VSYNC_PIPEB_FLAG set in the interrupt handler, even though pipe B is disabled.
So we only increase dev->vbl_received if the corresponding bit is also set in
dev->vblank_pipe.
Michel Dänzer [Mon, 18 Sep 2006 10:15:38 +0000 (12:15 +0200)]
i915: Bump minor for swap scheduling ioctl and secondary vblank support.
Michel Dänzer [Wed, 13 Sep 2006 06:59:35 +0000 (08:59 +0200)]
i915_vblank_swap: Add support for DRM_VBLANK_NEXTONMISS.
Michel Dänzer [Fri, 1 Sep 2006 09:48:07 +0000 (11:48 +0200)]
Only return EBUSY after we've established we need to schedule a new swap.
Michel Dänzer [Fri, 1 Sep 2006 09:35:31 +0000 (11:35 +0200)]
Core vsync: Don't clobber target sequence number when scheduling signal.
It looks like this would have caused signals to always get sent on the next
vertical blank, regardless of the sequence number.
Michel Dänzer [Fri, 1 Sep 2006 09:27:14 +0000 (11:27 +0200)]
Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.
Michel Dänzer [Fri, 1 Sep 2006 09:24:38 +0000 (11:24 +0200)]
Fix 'sequence has passed' condition in i915_vblank_swap().
Michel Dänzer [Thu, 31 Aug 2006 16:33:04 +0000 (18:33 +0200)]
Add SAREA fileds for determining which pipe to sync window buffer swaps to.
Michel Dänzer [Thu, 31 Aug 2006 16:32:08 +0000 (18:32 +0200)]
Add definition of DRM_VBLANK_SECONDARY.
Michel Dänzer [Thu, 31 Aug 2006 16:30:55 +0000 (18:30 +0200)]
Make handling of dev_priv->vblank_pipe more robust.
Initialize it to default value if it hasn't been set by the X server yet.
In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call
i915_enable_interrupt() if the argument passed from userspace is valid to avoid
corrupting dev_priv->vblank_pipe on invalid arguments.
Michel Dänzer [Wed, 30 Aug 2006 17:33:28 +0000 (19:33 +0200)]
DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead of pipe number.
Handle relative as well as absolute target sequence numbers.
Return error if target sequence has already passed, so userspace can deal with
this situation as it sees fit.
On success, return the sequence number of the vertical blank when the buffer
swap is expected to take place.
Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want
to use ioctl() instead of drmCommandWriteRead().
Michel Dänzer [Wed, 30 Aug 2006 17:24:04 +0000 (19:24 +0200)]
Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.
Also free drawable information memory when it's no longer needed.
Michel Dänzer [Mon, 28 Aug 2006 16:19:58 +0000 (18:19 +0200)]
Add copyright notice.
Michel Dänzer [Fri, 25 Aug 2006 17:01:05 +0000 (19:01 +0200)]
i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.
Michel Dänzer [Fri, 25 Aug 2006 16:55:55 +0000 (18:55 +0200)]
Locking and memory management fixes.
Michel Dänzer [Fri, 25 Aug 2006 16:55:06 +0000 (18:55 +0200)]
Drop tasklet locked driver callback when uninstalling IRQ.
Michel Dänzer [Wed, 23 Aug 2006 17:00:26 +0000 (19:00 +0200)]
Export drm_get_drawable_info symbol from core.
Michel Dänzer [Wed, 23 Aug 2006 14:05:47 +0000 (16:05 +0200)]
Hook up DRM_IOCTL_UPDATE_DRAW ioctl.
Michel Dänzer [Wed, 23 Aug 2006 14:04:41 +0000 (16:04 +0200)]
Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.
Michel Dänzer [Tue, 22 Aug 2006 14:40:07 +0000 (16:40 +0200)]
Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
Michel Dänzer [Wed, 16 Aug 2006 13:47:22 +0000 (15:47 +0200)]
Add support for interrupt triggered driver callback with lock held to DRM core.
Michel Dänzer [Fri, 11 Aug 2006 16:06:46 +0000 (18:06 +0200)]
Add support for secondary vertical blank interrupt to i915 driver.
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.
Michel Dänzer [Fri, 11 Aug 2006 15:57:59 +0000 (17:57 +0200)]
Add support for secondary vertical blank interrupt to DRM core.
Felix Kuhling [Thu, 21 Sep 2006 17:46:54 +0000 (03:46 +1000)]
bug 5942: add stubs for drm_mtrr_add/del for non-MTRR configured linux
Anish Mistry [Thu, 21 Sep 2006 17:43:34 +0000 (03:43 +1000)]
bug 7092 : add pci ids for mach64 in Dell poweredge 4200
Roland Scheidegger [Wed, 20 Sep 2006 17:44:57 +0000 (19:44 +0200)]
do a TCL state flush before accessing VAP_CNTL to prevent lockups on r200 when enabling/disabling vertex programs
Dave Airlie [Mon, 18 Sep 2006 11:22:12 +0000 (21:22 +1000)]
drm: put domain number back to 0, domain support is seriously fubar..
Ben Skeggs [Sun, 17 Sep 2006 03:00:27 +0000 (13:00 +1000)]
Add pciid for GeForce Go 6150 (0x0244).
Michel Dänzer [Fri, 15 Sep 2006 14:37:47 +0000 (16:37 +0200)]
Use register writes instead of BITBLT_MULTI packets for buffer swap blits.
This takes up two more ring buffer entries per rectangle blitted but makes sure
the blit is performed top to bottom, reducing the likelyhood of tearing.
Dave Airlie [Mon, 11 Sep 2006 20:13:14 +0000 (06:13 +1000)]
drm: use radeon specific names for radeon flags
Ben Skeggs [Fri, 8 Sep 2006 21:35:55 +0000 (07:35 +1000)]
Add copyright notices while I still remember..
Ben Skeggs [Thu, 7 Sep 2006 13:59:19 +0000 (23:59 +1000)]
Fix second start of X server without module reload beforehand, and a couple of other fixes.
- Mark the correct RAMIN slots as free (oops)
- Remove a VRAM alloc that shouldn't have been there (oops)
- Move HT init out of firstopen() and into dma_init()
- Setup PFIFO_RAM{HT,FC,RO} in pfifo_init()
Eric Anholt [Thu, 7 Sep 2006 06:26:50 +0000 (23:26 -0700)]
Use the DRM_INIT_WAITQUEUE argument (needed on Linux) to avoid a warning.
Eric Anholt [Thu, 7 Sep 2006 06:25:14 +0000 (23:25 -0700)]
Put the PCI device/vendor id in the drm_device_t.
This helps us unbreak FreeBSD DRM from the 965 changes.
Eric Anholt [Thu, 7 Sep 2006 06:08:29 +0000 (23:08 -0700)]
Add a typedef for u64.
Stephane Marchesin [Wed, 6 Sep 2006 22:35:17 +0000 (00:35 +0200)]
Remove a 64 bit div.
Ben Skeggs [Sat, 2 Sep 2006 20:36:06 +0000 (06:36 +1000)]
Allow cmdbuf location(AGP,VRAM) and size to be configured.
Ben Skeggs [Sat, 2 Sep 2006 12:25:26 +0000 (22:25 +1000)]
Use DMA_IN_MEMORY for DMA objects. This is needed for a DDX change that will
be committed soon after this. Without the change, MEMFORMAT_DMA_OUT appears
to have no effect.
Ben Skeggs [Wed, 30 Aug 2006 06:55:02 +0000 (16:55 +1000)]
Add stub {get,set}param ioctls.
Dave Airlie [Mon, 28 Aug 2006 14:01:19 +0000 (00:01 +1000)]
Merge branch 'master' into nouveau-1
Dave Airlie [Sat, 19 Aug 2006 07:59:18 +0000 (17:59 +1000)]
drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
Dave Airlie [Sat, 19 Aug 2006 06:56:03 +0000 (16:56 +1000)]
add static function, and remove bad attributions
Dave Airlie [Sat, 19 Aug 2006 06:55:30 +0000 (16:55 +1000)]
fix const pointer warnings with file_operations
Dave Airlie [Sat, 19 Aug 2006 06:55:00 +0000 (16:55 +1000)]
remove local copies of pci domain/bus/slot/num
Dave Airlie [Sat, 19 Aug 2006 06:43:16 +0000 (16:43 +1000)]
remove some DRM_ARRAY_SIZE from linux core code
Dave Airlie [Sat, 19 Aug 2006 06:36:26 +0000 (16:36 +1000)]
fixup some of the comments in drm_context.c
Dave Airlie [Sat, 19 Aug 2006 06:31:34 +0000 (16:31 +1000)]
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:
*(u32 *) ((u32) buf_priv->kernel_virtual + used)
I've also fixed a missing PTR_ERR in i830_dma.c
From: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Dave Airlie [Sat, 26 Aug 2006 22:59:50 +0000 (08:59 +1000)]
add pci ids for nouveau
Dave Airlie [Sat, 26 Aug 2006 22:55:02 +0000 (08:55 +1000)]
initial import of nouveau code from nouveau CVS
Michel Dänzer [Sat, 26 Aug 2006 10:21:11 +0000 (12:21 +0200)]
Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
The overflows could cause valid offsets to get rejected under some
circumstances, e.g. when the framebuffer resides at the very end of the card's
address space.
Thomas Hellstrom [Wed, 23 Aug 2006 11:49:13 +0000 (13:49 +0200)]
Fix previous commit: Only fall back to hashed handles
when there is a duplicate handle error. Not for other errors.
Thomas Hellstrom [Wed, 23 Aug 2006 09:31:10 +0000 (11:31 +0200)]
Allow multiple addMaps with the same 32-bit map offset.
(Reported by Dave Airlie)
Thomas Hellstrom [Wed, 23 Aug 2006 09:21:33 +0000 (11:21 +0200)]
Fix hashtab implementation leaking illegal error codes to user space.
(Reported by Dave Airlie)
Dave Airlie [Sat, 19 Aug 2006 07:59:18 +0000 (17:59 +1000)]
drm: lots of small cleanups and whitespace issues fixed up
remove a mach64 warning, align a lot of things from linux kernel
Dave Airlie [Sat, 19 Aug 2006 06:56:03 +0000 (16:56 +1000)]
add static function, and remove bad attributions
Dave Airlie [Sat, 19 Aug 2006 06:55:30 +0000 (16:55 +1000)]
fix const pointer warnings with file_operations
Dave Airlie [Sat, 19 Aug 2006 06:55:00 +0000 (16:55 +1000)]
remove local copies of pci domain/bus/slot/num
Dave Airlie [Sat, 19 Aug 2006 06:43:16 +0000 (16:43 +1000)]
remove some DRM_ARRAY_SIZE from linux core code
Dave Airlie [Sat, 19 Aug 2006 06:36:26 +0000 (16:36 +1000)]
fixup some of the comments in drm_context.c
Dave Airlie [Sat, 19 Aug 2006 06:31:34 +0000 (16:31 +1000)]
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:
*(u32 *) ((u32) buf_priv->kernel_virtual + used)
I've also fixed a missing PTR_ERR in i830_dma.c
From: Denis Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Thomas Hellstrom [Wed, 16 Aug 2006 14:36:56 +0000 (16:36 +0200)]
Remove hash tables on DRM exit.
Thomas Hellstrom [Mon, 14 Aug 2006 15:11:14 +0000 (17:11 +0200)]
Avoid kernel oops in some error paths calling drm_lastclose().
Dave Airlie [Mon, 14 Aug 2006 01:52:34 +0000 (11:52 +1000)]
remove all TRUE instances as well
Dave Airlie [Mon, 14 Aug 2006 01:49:52 +0000 (11:49 +1000)]
remove all TRUE/FALSE no need for this in the drm, use 0 or 1
Dave Airlie [Thu, 10 Aug 2006 04:38:50 +0000 (14:38 +1000)]
i965 code and Linux coding style < 0
smack my whitespace up.
Dave Airlie [Thu, 10 Aug 2006 04:32:18 +0000 (14:32 +1000)]
cleanup some whitespace issue and move compat code to compat header
Dave Airlie [Thu, 10 Aug 2006 04:31:56 +0000 (14:31 +1000)]
clean up script to create an lk drm directory
Dave Airlie [Thu, 10 Aug 2006 04:31:22 +0000 (14:31 +1000)]
drm: ati_pcigart cleanup
use NULL instead of 0, cleanup some whitespace
Alan Hourihane [Tue, 8 Aug 2006 22:05:54 +0000 (15:05 -0700)]
Add support for Intel i965G chipsets.
This is a patch prepared by Guangdeng Liao based off of Tungsten Graphics's
final code drop.