Dave Airlie [Tue, 19 Dec 2006 23:28:55 +0000 (10:28 +1100)]
add nouveau symlinks via git
Ben Skeggs [Mon, 11 Dec 2006 13:11:42 +0000 (00:11 +1100)]
Port remaining NV4 RAMIN access from the ddx into the drm.
Should fix lockups seen on NV4 cards.
Stephane Marchesin [Sun, 3 Dec 2006 09:02:54 +0000 (10:02 +0100)]
Merge the pciid work.
Add getparams for AGP and FB physical adresses.
Fix the MEM_ALLOC issue properly.
Fix context switches for nv44.
Change the DRM version to 0.0.1.
Ben Skeggs [Wed, 29 Nov 2006 23:31:42 +0000 (10:31 +1100)]
Use nouveau_mem.c to allocate RAMIN.
Ben Skeggs [Wed, 29 Nov 2006 21:35:42 +0000 (08:35 +1100)]
Wrap access to objects in RAMIN.
This will make it easier to support extra RAMIN in vram at a later point.
Matthieu Castet [Tue, 28 Nov 2006 20:32:03 +0000 (21:32 +0100)]
For nv10, bit 16 of RAMFC need to be set for 64 bytes fifo context.
When cleaning a fifo, we shouldn't assume everybody use nv40 ;)
Fill DMA_SUBROUTINE fill correct value.
Stephane Marchesin [Tue, 21 Nov 2006 22:32:58 +0000 (23:32 +0100)]
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
Ben Skeggs [Tue, 21 Nov 2006 00:41:46 +0000 (11:41 +1100)]
Don't spam dmesg if PMC_INTSTAT is 0
Ben Skeggs [Fri, 17 Nov 2006 23:09:29 +0000 (10:09 +1100)]
Only return FIFO number if the FIFO is marked as in use..
Ben Skeggs [Fri, 17 Nov 2006 23:03:45 +0000 (10:03 +1100)]
Check some return vals, fixes a couple of oopses.
Ben Skeggs [Thu, 16 Nov 2006 21:05:23 +0000 (08:05 +1100)]
Dump some useful info when a PGRAPH error occurs.
The "channel" detect doesn't work on my nv40, but the rest
seems to produce sane info.
Stephane Marchesin [Thu, 16 Nov 2006 13:47:52 +0000 (14:47 +0100)]
Merge branch 'nouveau-1' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
Ben Skeggs [Mon, 13 Nov 2006 22:00:31 +0000 (09:00 +1100)]
Completely untested NV10/20/30 FIFO context switching changes.
Ben Skeggs [Mon, 13 Nov 2006 21:11:49 +0000 (08:11 +1100)]
Restructure initialisation a bit.
- Do important card init in firstopen
- Give each channel it's own cmdbuf dma object
- Move RAMHT config state to the same place as RAMRO/RAMFC
- Make sure instance mem for objects is *after* RAM{FC,HT,RO}
Ben Skeggs [Mon, 13 Nov 2006 17:52:08 +0000 (04:52 +1100)]
Merge branch 'nouveau-1' of git+ssh://git.freedesktop.org/git/mesa/drm into nouveau-1
Ben Skeggs [Mon, 13 Nov 2006 17:51:13 +0000 (04:51 +1100)]
Hack around yet another "X restart borkage without nouveau.ko reload" problem.
On X init, PFIFO and PGRAPH are reset to defaults. This causes the GPU to
loose the configuration done by the drm. Perhaps a CARD_INIT ioctl a proper
solution to having this problem again in the future..
Stephane Marchesin [Sat, 11 Nov 2006 00:57:05 +0000 (01:57 +0100)]
Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drm into nouveau-1
Stephane Marchesin [Fri, 10 Nov 2006 01:18:38 +0000 (02:18 +0100)]
Fix memory detection on TNT2 M64/TNT2 vanta.
Dave Airlie [Wed, 8 Nov 2006 21:55:58 +0000 (08:55 +1100)]
libdrm: add drmOpenOnce + drmCloseOnce to libdrm
Dave Airlie [Wed, 8 Nov 2006 04:08:09 +0000 (15:08 +1100)]
libdrm: add support for server side functionality in libdrm
This adds APIs to allow the X server to use libdrm from the system
rather than its own in-built copy.
Eric Anholt [Tue, 7 Nov 2006 17:36:40 +0000 (09:36 -0800)]
Add drm_u64_t typedef on non-linux to fix libdrm build.
Dave Airlie [Mon, 6 Nov 2006 00:44:36 +0000 (11:44 +1100)]
drm: fixup page alignment on SAREA map on ppc64
Dave Airlie [Mon, 6 Nov 2006 00:42:15 +0000 (11:42 +1100)]
fixup fifo size so it is page aligned
Dave Airlie [Mon, 6 Nov 2006 00:41:51 +0000 (11:41 +1100)]
use a uint64_t for this not a pointer
Dave Airlie [Sun, 5 Nov 2006 21:03:18 +0000 (08:03 +1100)]
Merge branch 'master' into nouveau-1
Conflicts:
linux-core/Makefile.kernel
Ben Skeggs [Sun, 5 Nov 2006 18:46:03 +0000 (05:46 +1100)]
Leave the bottom 64kb of RAMIN untouched.
The binary driver will screw up either it's init or shutdown, leaving the
screen(s) in an unusable state without this. Something important in there?
Dave Airlie [Sun, 5 Nov 2006 09:38:44 +0000 (20:38 +1100)]
nouveau: add compat ioc32 support
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.
Alan Hourihane [Tue, 31 Oct 2006 10:01:53 +0000 (10:01 +0000)]
Fix bug #8839 - a comment
Thomas Hellstrom [Mon, 30 Oct 2006 10:18:44 +0000 (11:18 +0100)]
Bugzilla Bug #8819
Build fixes for powerpc.
Reported by Katerina Barone-Adesi
Thomas Hellstrom [Sun, 29 Oct 2006 14:39:11 +0000 (15:39 +0100)]
Minor bugfix, indentation and removal of unnused variables.
Thomas Hellstrom [Fri, 27 Oct 2006 11:08:31 +0000 (13:08 +0200)]
Reserve the new IOCTLs also for *bsd.
Bump libdrm version number to 2.2.0
Thomas Hellstrom [Fri, 27 Oct 2006 09:28:37 +0000 (11:28 +0200)]
Last minute changes to support multi-page size buffer offset alignments.
This will come in very handy for tiled buffers on intel hardware.
Also add some padding to interface structures to allow future binary backwards
compatible changes.
Thomas Hellstrom [Thu, 26 Oct 2006 19:20:34 +0000 (21:20 +0200)]
New mm function names. Update header.
Thomas Hellstrom [Thu, 26 Oct 2006 19:17:43 +0000 (21:17 +0200)]
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.
Also add some functions to grow and shrink the managed area.
This will be used in the future to manage the buffer object swap cache.
Thomas Hellstrom [Thu, 26 Oct 2006 19:14:23 +0000 (21:14 +0200)]
Add a one-page hole in the file offset space between buffers.
Thomas Hellstrom [Sat, 21 Oct 2006 12:20:28 +0000 (14:20 +0200)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm
Thomas Hellstrom [Sat, 21 Oct 2006 12:17:51 +0000 (14:17 +0200)]
The CPU cache must be flushed _before_ we start modifying the kernel map ptes,
otherwise data will be missing, which becomes apparent when the kernel evicts
batch buffers which are likely to be written into in the evicted state,
and then rebound to the AGP aperture.
This means we cannot rely on the AGP module to flush the
cache for us.
Tilman Sauerbeck [Fri, 20 Oct 2006 15:05:07 +0000 (17:05 +0200)]
Bug #1746: Set dev_priv_size for the MGA driver.
Thomas Hellstrom [Fri, 20 Oct 2006 13:07:21 +0000 (15:07 +0200)]
We apparently need this global cache flush anyway.
Thomas Hellstrom [Fri, 20 Oct 2006 13:06:31 +0000 (15:06 +0200)]
Bug #8707, 2.6.19-rc compatibility for memory manager code.
Thomas Hellstrom [Thu, 19 Oct 2006 15:07:26 +0000 (17:07 +0200)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm
Thomas Hellstrom [Thu, 19 Oct 2006 15:00:03 +0000 (17:00 +0200)]
Importing fixes from drm-ttm-0-2-branch
Thomas Hellstrom [Thu, 19 Oct 2006 14:58:00 +0000 (16:58 +0200)]
Make sure delayed delete list is empty on lastclose.
Fix some refcounting errors.
Fix some error messages.
Thomas Hellstrom [Wed, 18 Oct 2006 15:33:19 +0000 (17:33 +0200)]
Merging drm-ttm-0-2-branch
Conflicts:
linux-core/drmP.h
linux-core/drm_drv.c
linux-core/drm_irq.c
linux-core/drm_stub.c
shared-core/drm.h
shared-core/i915_drv.h
shared-core/i915_irq.c
Thomas Hellstrom [Wed, 18 Oct 2006 15:18:23 +0000 (17:18 +0200)]
Remove stray softlink.
Thomas Hellstrom [Wed, 18 Oct 2006 14:54:17 +0000 (16:54 +0200)]
Avoid driver-specific AGP user-populated types, since we don't know what AGP
driver we're on.
Avoid global cache flushes before inserting pages.
In general, they are never mapped, and not accessed through the kernel map, so
a cache flush should not be necessary. The exception is pages that are bound
cached. We might need a cache flush for those.
Thomas Hellstrom [Tue, 17 Oct 2006 18:04:41 +0000 (20:04 +0200)]
Remove some debugging messages.
Thomas Hellstrom [Tue, 17 Oct 2006 18:03:26 +0000 (20:03 +0200)]
Remove max number of locked pages check and call, since
that is now handled by the memory accounting.
Thomas Hellstrom [Tue, 17 Oct 2006 17:57:06 +0000 (19:57 +0200)]
Lindent.
Thomas Hellstrom [Tue, 17 Oct 2006 17:52:34 +0000 (19:52 +0200)]
Add vma list memory usage to memory accounting.
Use byte unit for /proc printout of memory usage for small sizes to be
able to detect memory allocation bugs more easily.
Thomas Hellstrom [Tue, 17 Oct 2006 17:40:57 +0000 (19:40 +0200)]
Add memory usage accounting to avoid DOS problems.
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..
Thomas Hellstrom [Tue, 17 Oct 2006 14:00:25 +0000 (16:00 +0200)]
Implement mm_lock and mm_unlock functions.
The mm_lock function is used when leaving vt. It evicts _all_ buffers.
Buffers with the DRM_BO_NO_MOVE attribute set will be guaranteed to
get the same offset when / if they are rebound.
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
Thomas Hellstrom [Tue, 17 Oct 2006 09:28:48 +0000 (11:28 +0200)]
Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Thomas Hellstrom [Tue, 17 Oct 2006 09:05:37 +0000 (11:05 +0200)]
Extend generality for more memory types.
Fix up init and destruction code.
Michael Karcher [Tue, 17 Oct 2006 02:06:58 +0000 (22:06 -0400)]
dev->agp_buffer_map is not initialized for AGP DMA on savages
bug 8662
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
Thomas Hellstrom [Mon, 16 Oct 2006 12:22:27 +0000 (14:22 +0200)]
Change Intel AGP memory type numbers.
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.
Dave Airlie [Sat, 14 Oct 2006 13:38:20 +0000 (23:38 +1000)]
remove config.h from build no longer exists kbuild does it
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.
Thomas Hellstrom [Thu, 12 Oct 2006 14:10:47 +0000 (16:10 +0200)]
Bugfixes.
Thomas Hellstrom [Thu, 12 Oct 2006 10:09:16 +0000 (12:09 +0200)]
Simplify the AGP backend interface somewhat.
Fix buffer bound caching policy changing, Allow
on-the-fly changing of caching policy on bound buffers if the hardware
supports it.
Allow drivers to use driver-specific AGP memory types for TTM AGP pages.
Will make AGP drivers much easier to migrate.
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.
Thomas Hellstrom [Wed, 11 Oct 2006 20:21:01 +0000 (22:21 +0200)]
Compatibility code for 2.6.15-2.6.18. It is ugly but a little comfort is that
it will go away in the mainstream kernel.
Some bugfixes, mainly in error paths.
Thomas Hellstrom [Wed, 11 Oct 2006 11:40:35 +0000 (13:40 +0200)]
Big update:
Adapt for new functions in the 2.6.19 kernel.
Remove the ability to have multiple regions in one TTM.
This simplifies a lot of code.
Remove the ability to access TTMs from user space.
We don't need it anymore without ttm regions.
Don't change caching policy for evicted buffers. Instead change it only
when the buffer is accessed by the CPU (on the first page fault).
This tremendously speeds up eviction rates.
Current code is safe for kernels <= 2.6.14.
Should also be OK with 2.6.19 and above.
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.
Thomas Hellstrom [Tue, 10 Oct 2006 08:37:26 +0000 (10:37 +0200)]
Use a nopage-based approach to fault in pfns.
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.
Thomas Hellstrom [Tue, 3 Oct 2006 10:08:07 +0000 (12:08 +0200)]
Get rid of all ugly PTE hacks.
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().
(cherry picked from
f6238cf6244b32bd84e3d2819963d7f5473867c8 commit)
Michel Dänzer [Mon, 2 Oct 2006 13:33:19 +0000 (15:33 +0200)]
Fix type of second argument to spin_lock_irqsave().
Thomas Hellstrom [Mon, 2 Oct 2006 13:06:35 +0000 (15:06 +0200)]
Make the user_token 44-bit for TTMs, and have them occupy a unique file space
starting at 0x00100000000. This will hopefully allow us to use
unmap_mapping_range(). Note that user-space will need
64-bit file offset support.
Thomas Hellstrom [Mon, 2 Oct 2006 12:03:15 +0000 (14:03 +0200)]
Add a buffer object manager for TTM maps.
Thomas Hellstrom [Mon, 2 Oct 2006 11:49:43 +0000 (13:49 +0200)]
Allow for 44 bit user-tokens (or drm_file offsets)
Thomas Hellstrom [Mon, 2 Oct 2006 11:37:54 +0000 (13:37 +0200)]
Add a comment to previos commit.
Thomas Hellstrom [Mon, 2 Oct 2006 11:34:30 +0000 (13:34 +0200)]
Trap and be verbose about a deadlock that occurs with AIGLX and drivers that
use drm_reclaim_buffers_locked().
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.
(cherry picked from
d58389968124191a546a14b42ef84edc224be23d commit)
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.