Eric Anholt [Wed, 7 May 2008 23:00:58 +0000 (16:00 -0700)]
GEM: fix testcases for new ioctl args.
Arjan van de Ven [Wed, 7 May 2008 22:54:32 +0000 (15:54 -0700)]
Apply a few stylistic cleanups to match kernel code.
Eric Anholt [Wed, 7 May 2008 21:10:04 +0000 (14:10 -0700)]
GEM: Wait for existing rendering to complete before writing relocation data.
This should already have been generally safe since we don't change contents
and put in new relocations between execbufs, so if we were writing in a new
relocation then we'd already waited rendering to complete when we moved
the target of the relocation. However, doing the right thing will be required
if we do buffer reuse.
Eric Anholt [Wed, 7 May 2008 19:46:06 +0000 (12:46 -0700)]
GEM: Extend cache domain stuff for 965.
One of our MI_FLUSH bits is reserved on 965, being always implied, and there's
a vertex cache that was forgotten.
Keith Packard [Wed, 7 May 2008 04:59:06 +0000 (21:59 -0700)]
[intel-GEM] ref count objects in gtt-lru.
If objects on the lru aren't ref counted, they'll get pulled from the gtt as
soon as they are freed. This change does cause objects to get stuck in the
gtt until they're forced out by new requests. The lru should get cleaned
when the irq occurs.
Keith Packard [Wed, 7 May 2008 03:00:23 +0000 (20:00 -0700)]
[intel-GEM] Add memory domain support.
Memory domains allow the kernel to track which caches to flush and how to
move objects before buffer execution.
Keith Packard [Tue, 6 May 2008 21:43:56 +0000 (14:43 -0700)]
Merge commit 'anholt/drm-gem' into drm-gem
Keith Packard [Tue, 6 May 2008 21:43:49 +0000 (14:43 -0700)]
Start coding up memory domains
Eric Anholt [Tue, 6 May 2008 20:28:26 +0000 (13:28 -0700)]
GEM: Use irq-based fencing rather than syncing and evicting every exec.
Eric Anholt [Tue, 6 May 2008 18:25:53 +0000 (11:25 -0700)]
GEM: Skip relocation if presumed offset matches.
Eric Anholt [Tue, 6 May 2008 18:18:47 +0000 (11:18 -0700)]
GEM: Save the last ioremapped page for relocations in case we need it again.
Keith Packard [Tue, 6 May 2008 05:10:02 +0000 (22:10 -0700)]
Dump last batch buffer when hardware lockup is detected.
Keith Packard [Tue, 6 May 2008 05:09:34 +0000 (22:09 -0700)]
Monitor ACTHD register while polling for idle ring.
When batch buffers are executing, the ring may be stuck for a long time.
Monitor the ACTHD pointer which will show if the execution engine is
actually hung.
Keith Packard [Tue, 6 May 2008 00:17:19 +0000 (17:17 -0700)]
Unlock pages right after getting them.
pages come back from find_or_create_page locked, but must not stay locked
for long. Unlock them immediately instead of waiting until we're done with
them to avoid deadlock when applications try to touch them.
Keith Packard [Mon, 5 May 2008 21:40:20 +0000 (14:40 -0700)]
Merge commit 'anholt/drm-gem' into drm-gem
Conflicts:
linux-core/i915_gem.c
Eric Anholt [Mon, 5 May 2008 21:38:04 +0000 (14:38 -0700)]
GEM: Replace drm_memrange_for_each with just evicting what we brought in.
I was wrong about how the data structure worked, and didn't care to fix it
to support debugging code.
Keith Packard [Mon, 5 May 2008 21:32:01 +0000 (14:32 -0700)]
Remove some debug messages.
Keith Packard [Mon, 5 May 2008 21:22:42 +0000 (14:22 -0700)]
Add object base to relocation store address.
The relocated value was being written to the wrong location, missing
the object base address.
Keith Packard [Mon, 5 May 2008 20:32:28 +0000 (13:32 -0700)]
Emit clflush and chipset flush when mapping objects to gtt
Keith Packard [Mon, 5 May 2008 18:27:06 +0000 (11:27 -0700)]
Correct execbuffer offset. Add memory barrier and chipset flush.
Keith Packard [Mon, 5 May 2008 17:51:49 +0000 (10:51 -0700)]
Add i915_dispatch_gem_execbuffer (broken).
This function submits a gem-based execbuffer to the ring.
It doesn't work yet.
Eric Anholt [Sat, 3 May 2008 00:50:46 +0000 (17:50 -0700)]
Don't forget to set the memrange private, and reset ring on kernel entry.
Eric Anholt [Sat, 3 May 2008 00:49:52 +0000 (17:49 -0700)]
Don't include the tail guard memrange in foreach callbacking.
Keith Packard [Sat, 3 May 2008 00:13:11 +0000 (17:13 -0700)]
Check for do_mmap errors
Keith Packard [Fri, 2 May 2008 23:34:16 +0000 (16:34 -0700)]
Add a bit of /proc/dri/*/gem support. Clean up some refcount/pagelock issues.
Track named objects in /proc/dri/0/gem_names.
Track total object count in /proc/dri/0/gem_objects.
Initialize device gem data.
return -ENODEV for gem ioctls if the driver doesn't support gem.
Call unlock_page when unbinding from gtt.
Add numerous misssing calls to drm_gem_object_unreference.
Keith Packard [Fri, 2 May 2008 19:28:49 +0000 (12:28 -0700)]
Add name/open ioctls, separate handle and pointer ref counts.
Names are just another unique integer set (from another idr object).
Names are removed when the user refernces (handles) are all destroyed --
this required that handles for objects be counted separately from
internal kernel references (so that we can tell when the handles are all
gone).
Keith Packard [Fri, 2 May 2008 17:36:00 +0000 (10:36 -0700)]
Remove drm_driver argument to functions taking drm_gem_object.
Now that drm_gem_object has a drm_driver * in it, functions don't need both
parameters.
Keith Packard [Fri, 2 May 2008 17:34:46 +0000 (10:34 -0700)]
Fix nouveau warning when returning pointers in uint64_t objects.
Keith Packard [Fri, 2 May 2008 03:41:55 +0000 (20:41 -0700)]
Add alignment to all aperture allocation requests.
When pinning buffers, or using execbuffer, allow the application to specify
the necessary aperture allocation alignment constraints.
Keith Packard [Fri, 2 May 2008 03:31:16 +0000 (20:31 -0700)]
Fix gem ioctls to be 32/64-bit clean.
mixed 32/64 bit systems need 'special' help for ioctl where the user-space
and kernel-space datatypes differ. Fixing the datatypes to be the same size,
and align the same way for both 32 and 64-bit ppc and x86 environments will
elimiante the need to have magic 32/64-bit ioctl translation code.
Keith Packard [Fri, 2 May 2008 03:12:39 +0000 (20:12 -0700)]
Use krefs for refcounting.
krefs are way easier than a custom-coded spinlock+int combo.
Eric Anholt [Fri, 2 May 2008 00:31:57 +0000 (17:31 -0700)]
Unbind objects when freeing, fix some error paths, and warn in others.
Eric Anholt [Fri, 2 May 2008 00:31:29 +0000 (17:31 -0700)]
Fix offset passed to AGP to be pages instead of bytes.
Fix some utterly bonged loop while we were staring at it.
Eric Anholt [Thu, 1 May 2008 23:48:25 +0000 (16:48 -0700)]
Fix missing member settings in obj/obj_priv, and some error paths.
Eric Anholt [Thu, 1 May 2008 23:38:37 +0000 (16:38 -0700)]
Make GEM object handles be nonzero.
Eric Anholt [Thu, 1 May 2008 23:35:12 +0000 (16:35 -0700)]
Update mm tests for GEM rename.
Eric Anholt [Thu, 1 May 2008 23:27:03 +0000 (16:27 -0700)]
Remove _args from gem ioctl argument structure tags.
Eric Anholt [Thu, 1 May 2008 22:40:02 +0000 (15:40 -0700)]
Add pin/unpin object ioctls for gem.
Eric Anholt [Thu, 1 May 2008 22:22:21 +0000 (15:22 -0700)]
checkpoint: relocations support.
Eric Anholt [Thu, 1 May 2008 21:20:44 +0000 (14:20 -0700)]
checkpoint: gtt binding written.
Eric Anholt [Thu, 1 May 2008 18:39:06 +0000 (11:39 -0700)]
checkpoint: rename to GEM and a few more i915 bits.
Eric Anholt [Wed, 30 Apr 2008 23:03:15 +0000 (16:03 -0700)]
Hacking towards hooking up execbuffer.
Eric Anholt [Tue, 29 Apr 2008 20:47:12 +0000 (13:47 -0700)]
Remove the remainder of the mmfs device.
Eric Anholt [Tue, 29 Apr 2008 20:45:43 +0000 (13:45 -0700)]
Move mmfs tests over to be drm tests.
Eric Anholt [Tue, 29 Apr 2008 20:30:44 +0000 (13:30 -0700)]
Move mmfs ioctls into the DRM. Untested.
Eric Anholt [Mon, 28 Apr 2008 23:54:53 +0000 (16:54 -0700)]
Rename drm_mm.c and its fuctions to drm_memrange.
It's not really a graphics memory allocator, just something to track ranges
of address space. It doesn't involve actual allocation, and was consuming
some desired namespace.
Eric Anholt [Wed, 23 Apr 2008 21:52:30 +0000 (14:52 -0700)]
Add mmap ioctl to mmfs.
Eric Anholt [Wed, 23 Apr 2008 20:06:58 +0000 (13:06 -0700)]
Add pread/pwrite ioctls to mmfs.
Eric Anholt [Wed, 23 Apr 2008 18:32:31 +0000 (11:32 -0700)]
Extend the mmfs basic test to do a couple of ioctls.
Eric Anholt [Wed, 23 Apr 2008 18:22:59 +0000 (11:22 -0700)]
Move mmfs.h userland interface to shared-core.
Eric Anholt [Tue, 22 Apr 2008 23:08:23 +0000 (16:08 -0700)]
Initial add of mmfs module.
Eric Anholt [Tue, 4 Mar 2008 23:08:24 +0000 (15:08 -0800)]
Clarify that drm_agp_ttm_backend is associated with a drm_ttm.
On first looking at it I assumed it was an aspect of the ttm backend as a
whole rather than specific allocations from a backend.
Pekka Paalanen [Sun, 20 Apr 2008 17:47:38 +0000 (20:47 +0300)]
linux-core Makefile: add GIT_REVISION
This tries to automatically fetch a git revision string and if succeeds,
it #defines GIT_REVISION string macro. Packagers can override it by
'make GIT_REVISION=foo'.
Update Nouveau to use GIT_REVISION, if defined, instead of DRIVER_DATE
in struct drm_driver.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Dave Airlie [Tue, 22 Apr 2008 06:08:17 +0000 (16:08 +1000)]
i915: gfx hw and i945gme fixes from upstream
From Jesse and Zhenyu originally.
Keith Packard [Sun, 20 Apr 2008 23:10:05 +0000 (16:10 -0700)]
[I915] Handle tiled buffers in vblank tasklet
The vblank tasklet update code must build 2D blt commands with the
appropriate tiled flags.
Keith Packard [Sun, 20 Apr 2008 08:55:57 +0000 (01:55 -0700)]
On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank
The batchbuffer submission paths were fixed to use the 965-specific command,
but the vblank tasklet was not. When the older version is sent, the 965 will
lock up.
Thomas Hellstrom [Mon, 14 Apr 2008 11:52:33 +0000 (13:52 +0200)]
Fix buffer object map wait error.
Add some branch prediction hints.
Thomas Hellstrom [Mon, 14 Apr 2008 10:10:50 +0000 (12:10 +0200)]
Fix buffer object creation validation.
BO lock fixes.
Thomas Hellstrom [Sun, 13 Apr 2008 12:49:14 +0000 (14:49 +0200)]
Unlock the BO mutex while waiting for idle, unmapped, unfenced.
Move unfenced checking into idle checking.
Never time out while waiting for software events like unmapped or unfenced.
Thomas Hellstrom [Fri, 11 Apr 2008 07:36:12 +0000 (09:36 +0200)]
Fix up buffer manager locking.
Keith Packard [Thu, 27 Mar 2008 18:40:04 +0000 (11:40 -0700)]
Save and restore dsparb and d_state regs
Patrice Mandin [Mon, 7 Apr 2008 20:24:24 +0000 (22:24 +0200)]
Missing KERNEL_VERSION macro
Hasso Tepper [Mon, 7 Apr 2008 12:27:43 +0000 (15:27 +0300)]
Add DragonFly BSD support for device creation
DragonFly behaves just like FreeBSD in this regard.
Ben Skeggs [Mon, 7 Apr 2008 03:29:11 +0000 (13:29 +1000)]
nouveau: enable accelerated move to sysmem
Ben Skeggs [Mon, 7 Apr 2008 03:05:51 +0000 (13:05 +1000)]
nouveau: enable m2mf for tt<->vram moves, fix fence_poll
Thomas Hellstrom [Sun, 6 Apr 2008 09:21:22 +0000 (11:21 +0200)]
Place highmem pages last in the ttm page array.
Thomas Hellstrom [Sun, 6 Apr 2008 08:32:02 +0000 (10:32 +0200)]
Use clflush() when available for cache flushing.
Thomas Hellstrom [Sun, 6 Apr 2008 07:46:29 +0000 (09:46 +0200)]
[I915] Fix VRAM eviction.
Thomas Hellstrom [Sun, 6 Apr 2008 07:33:50 +0000 (09:33 +0200)]
Fix emergency allocation accounting.
Maarten Maathuis [Sat, 5 Apr 2008 19:02:00 +0000 (21:02 +0200)]
nv50: primitive i2c interrupt handler
Maarten Maathuis [Wed, 2 Apr 2008 23:13:31 +0000 (01:13 +0200)]
nv50: primitive display interrupt handler.
Dave Airlie [Mon, 31 Mar 2008 01:34:48 +0000 (11:34 +1000)]
nouveau: fix return from function..
dude kernel moduless use kernel errors :)
this fixes an oops on init when this codepath hits.
Thomas Hellstrom [Sun, 30 Mar 2008 19:30:43 +0000 (21:30 +0200)]
Initialize the fence::error member.
Thomas Hellstrom [Sun, 30 Mar 2008 13:14:45 +0000 (15:14 +0200)]
[i915] Report buffer state _after_ fence submission to user-space.
This fixes a problem where the wrong bo->fence_type was reported, and
also saves some memory space.
[bo core] export the drm_bo_fill_rep_arg function.
Thomas Hellström [Thu, 6 Mar 2008 16:35:56 +0000 (17:35 +0100)]
Don't call fence::poll during irq if there are no waiters.
Maarten Maathuis [Sun, 30 Mar 2008 12:50:41 +0000 (14:50 +0200)]
nouveau: forgot to add a break
Maarten Maathuis [Sun, 30 Mar 2008 12:46:45 +0000 (14:46 +0200)]
nouveau: Add ctx values for nv86.
- Note that this may not work for all nv86.
Dave Airlie [Sat, 29 Mar 2008 21:33:39 +0000 (07:33 +1000)]
drm/r300: fix wait interface mixup
This interface was defined completely wrong, however userspace has only
ever used 4 values from it (0x1, 0x2, 0x3 and 0x6), so fix the interface to do what userspace actually expected but define new defines for new users to use
it properly.
Oliver McFadden [Sat, 29 Mar 2008 17:25:44 +0000 (17:25 +0000)]
r300: Correctly translate the value for the R300_CMD_WAIT command.
Previously, the R300_CMD_WAIT command would write the passed directly to the
hardware. However this is incorrect because the R300_WAIT_* values used are
internal interface values that do not map directly to the hardware.
The new function I have added translates the R300_WAIT_* values into appropriate
values for the hardware before writing the register.
Thanks to John Bridgman for pointing this out. :-)
Stuart Bennett [Tue, 25 Mar 2008 18:30:05 +0000 (18:30 +0000)]
nouveau: nv20 bios does not initialise PTIMER
The wait functions depend on PTIMER, so write the old (incorrect, but working) values for uninitialised hw
Dave Airlie [Mon, 24 Mar 2008 08:52:26 +0000 (18:52 +1000)]
i915: fix oops on agp=off
Kernel bug 10289.
Dave Airlie [Mon, 24 Mar 2008 08:47:50 +0000 (18:47 +1000)]
Merge branch 'r500-fp'
Ben Skeggs [Sun, 23 Mar 2008 16:22:42 +0000 (03:22 +1100)]
nouveau: silence warning
Ben Skeggs [Sun, 23 Mar 2008 16:20:59 +0000 (03:20 +1100)]
nv40: voodoo - not quite.
Ben Skeggs [Sun, 23 Mar 2008 16:13:05 +0000 (03:13 +1100)]
nv40: allocate massive amount of PRAMIN for grctx on all chipsets.
More or less a workaround for issues on some chipsets where a context
switch results in critical data in PRAMIN being overwritten by the GPU.
The correct fix is known, but may take some time before it's a feasible
option.
Dave Airlie [Fri, 21 Mar 2008 06:59:52 +0000 (16:59 +1000)]
r500: fragment program upload is also used to upload constants.
Limit frag address to 8 bits
Dave Airlie [Thu, 20 Mar 2008 04:20:53 +0000 (14:20 +1000)]
drm: fixup r500fp submission
Stuart Bennett [Tue, 18 Mar 2008 23:12:28 +0000 (23:12 +0000)]
nouveau: do not set on-board timer's numerator/denominator to bad values
Alex Deucher [Wed, 19 Mar 2008 19:37:56 +0000 (15:37 -0400)]
RADEON: switch over to new production microcode
This needs to be tested thoroughly before pushing to the
kernel.
Alex Deucher [Wed, 19 Mar 2008 18:57:42 +0000 (14:57 -0400)]
RADEON: production microcode for all radeons, r1xx-r6xx
This updated microcode is not in use yet.
Dave Airlie [Wed, 19 Mar 2008 06:10:37 +0000 (16:10 +1000)]
move some more r300 regs into not allowed on r500
Dave Airlie [Mon, 17 Mar 2008 23:07:45 +0000 (09:07 +1000)]
drm: add new rs690 pci id
Thomas Hellstrom [Mon, 17 Mar 2008 10:37:10 +0000 (11:37 +0100)]
Evict cached_mapped relocatee before applying reloc.
Fix that got left out after the intel-post-reloc merge.
Dave Airlie [Mon, 17 Mar 2008 01:08:03 +0000 (11:08 +1000)]
initial r500 RS and FP register and upload code
Dave Airlie [Sun, 16 Mar 2008 21:05:46 +0000 (07:05 +1000)]
drm/pcigart: fix the pci gart to use the drm_pci wrapper.
This is the correct fix for the RS690 and hopefully the dma coherent work.
For now we limit everybody to a 32-bit DMA mask but it is possible for
RS690 to use a 40-bit DMA mask for the GART table itself,
and the PCIE cards can use 40-bits for the table entries.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Thomas Hellstrom [Sun, 16 Mar 2008 19:07:14 +0000 (20:07 +0100)]
Avoid unnecessary waits for command regulator pause.
Thomas Hellstrom [Sun, 16 Mar 2008 10:44:35 +0000 (11:44 +0100)]
[via] Remove some leftover vars.
Thomas Hellstrom [Sun, 16 Mar 2008 10:39:18 +0000 (11:39 +0100)]
[via] Allow a little larger stride for SG DMA DownloadFromScreen.
Thomas Hellstrom [Sun, 16 Mar 2008 10:37:17 +0000 (11:37 +0100)]
[via] The millionth fixup for the millionth-1 attempt to stabilize the AGP
DMA command submission. It's worth remembering that all new bright ideas on how
to make this command reader work properly and according to docs
will probably fail :( Bring in some old code.
Thomas Hellstrom [Sun, 16 Mar 2008 10:29:57 +0000 (11:29 +0100)]
[via] Fix driver after vblank-rework merge.