Commit graph

1449 commits

Author SHA1 Message Date
Keith Packard
2b9ef32669 Merge commit 'anholt/drm-gem' into drm-gem 2008-05-06 14:43:56 -07:00
Keith Packard
631e86c5c4 Start coding up memory domains 2008-05-06 14:43:49 -07:00
Eric Anholt
d2373b2a34 GEM: Use irq-based fencing rather than syncing and evicting every exec. 2008-05-06 13:28:26 -07:00
Keith Packard
91cba3ae17 Dump last batch buffer when hardware lockup is detected. 2008-05-05 22:10:02 -07:00
Keith Packard
ed6657fa8e 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.
2008-05-05 22:09:34 -07:00
Keith Packard
d59a9300ec Remove some debug messages. 2008-05-05 14:32:01 -07:00
Keith Packard
4511e6cd80 Correct execbuffer offset. Add memory barrier and chipset flush. 2008-05-05 11:27:06 -07:00
Keith Packard
b6f173c430 Add i915_dispatch_gem_execbuffer (broken).
This function submits a gem-based execbuffer to the ring.
It doesn't work yet.
2008-05-05 10:51:49 -07:00
Dave Airlie
d015219bd0 r500: add allowed range for us config/pixsize 2008-05-05 17:03:27 +10:00
Keith Packard
39e20bcd5f 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).
2008-05-02 12:29:17 -07:00
Keith Packard
49e8e3372a 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.
2008-05-02 10:36:00 -07:00
Keith Packard
5b5b68ffd2 Fix nouveau warning when returning pointers in uint64_t objects. 2008-05-02 10:34:46 -07:00
Keith Packard
0d547c9ed9 Add alignment to all aperture allocation requests.
When pinning buffers, or using execbuffer, allow the application to specify
the necessary aperture allocation alignment constraints.
2008-05-01 20:41:55 -07:00
Keith Packard
30efad5113 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.
2008-05-01 20:31:16 -07:00
Eric Anholt
7d5f783eca Make GEM object handles be nonzero. 2008-05-01 16:38:37 -07:00
Eric Anholt
d2529d1396 Remove _args from gem ioctl argument structure tags. 2008-05-01 16:27:03 -07:00
Eric Anholt
793549116e Add pin/unpin object ioctls for gem. 2008-05-01 15:40:02 -07:00
Eric Anholt
ccd1bae0f6 checkpoint: relocations support. 2008-05-01 15:22:21 -07:00
Eric Anholt
5af87acbc2 checkpoint: gtt binding written. 2008-05-01 14:20:44 -07:00
Eric Anholt
2140e102f9 checkpoint: rename to GEM and a few more i915 bits. 2008-05-01 11:39:20 -07:00
Ben Skeggs
3ac74f3208 nv50: enable 0x400500 bit 0 after PGRAPH exception also
No solid idea about what these 2 bits do, but nv50 can now survive a few
PGRAPH exceptions just as nv40 does :)
2008-05-02 01:36:30 +10:00
Ben Skeggs
6d8062ac1e nouveau: guard against channels potentially not having a context, fix nv50 2008-05-02 01:36:08 +10:00
Ben Skeggs
77d20928b3 nouveau: disable all card interrupts when unknown PFIFO IRQ occurs.
This is possibly temporary.  I can trigger an unending IRQ storm on G8x
in some circumstances, and have no idea how to handle that particular PFIFO
exception correctly yet.
2008-05-02 00:53:42 +10:00
Ben Skeggs
5c4c778c0d nouveau: restore original NV_PFIFO_CACHES_REASSIGN value in fifo handler
Doesn't fix any issue I've seen, but is a potential issue if a FIFO IRQ
occurs during channel creation/takedown.
2008-05-02 00:52:21 +10:00
Ben Skeggs
bfbe4ade32 nouveau: gather nsource in trap_info()
The IRQ handling stuff really is a mess.. On the TODO :)
2008-05-02 00:51:00 +10:00
Ben Skeggs
e317dfdabf nv50: PGRAPH exception handling completely different from earlier chips 2008-05-02 00:06:22 +10:00
Ben Skeggs
b92efd5956 nv50: I cave... Add nv84 initial context values.
I swore I'd actually do this properly and not go the horrible route
we did with nv4x, but I won't get around to it just yet with so many
*actually* interesting things to do first.. One day.

Since someone already added nv86, why not!
2008-05-01 23:50:44 +10:00
Eric Anholt
1a84067950 Hacking towards hooking up execbuffer. 2008-04-30 16:03:15 -07:00
Eric Anholt
81ba8ded7e Remove the remainder of the mmfs device. 2008-04-29 13:48:51 -07:00
Eric Anholt
dabd056bf3 Move mmfs ioctls into the DRM. Untested. 2008-04-29 13:32:52 -07:00
Jesse Barnes
cb33133ef3 i915: fix off by one in VGA save/restore of AR & CR regs
Turns out it's important to save/restore AR14 in particular.
2008-04-29 12:39:38 -07:00
Maarten Maathuis
f31e04a960 nouveau: NV9x cards exist as well. 2008-04-29 19:34:22 +02:00
Jesse Barnes
7f8e406085 Use fixed sized types in new ioctls
Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat
issues.
2008-04-27 09:42:17 -07:00
Jesse Barnes
b45fe49bcd Enum-ectomy of vblank modesetting ioctl
Enum can be of pretty much any size since C leaves the choice of size up to the implementation.  So avoid using it in new interfaces like the vblank pre- & post-modeset ioctl.  Thanks to hch for spotting this.
2008-04-26 17:11:18 -07:00
Eric Anholt
8c741ed54e Add pread/pwrite ioctls to mmfs. 2008-04-23 14:25:54 -07:00
Eric Anholt
c1fec43b55 Extend the mmfs basic test to do a couple of ioctls. 2008-04-23 11:36:03 -07:00
Eric Anholt
8665b666c7 Move mmfs.h userland interface to shared-core. 2008-04-23 11:23:40 -07:00
Xiang, Haihao
feff72929e i915: fix for compatibility mode 2008-04-23 17:17:16 +08:00
Dave Airlie
ce8c842518 i915: gfx hw and i945gme fixes from upstream
From Jesse and Zhenyu originally.
2008-04-22 16:08:17 +10:00
Keith Packard
f0e38f5217 [I915] Handle tiled buffers in vblank tasklet
The vblank tasklet update code must build 2D blt commands with the
appropriate tiled flags.
2008-04-20 16:10:05 -07:00
Keith Packard
21dbba5a22 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.
2008-04-20 01:56:02 -07:00
Keith Packard
b986d7d2c9 Save and restore dsparb and d_state regs 2008-04-11 20:31:07 -07:00
Maarten Maathuis
1692d30cea nv50: primitive i2c interrupt handler 2008-04-05 21:02:00 +02:00
Maarten Maathuis
3fc444a5e8 nv50: primitive display interrupt handler. 2008-04-03 01:13:31 +02:00
Dave Airlie
562f95ea96 nouveau: fix return from function..
dude kernel moduless use kernel errors :)

this fixes an oops on init when this codepath hits.
2008-03-31 11:34:48 +10:00
Maarten Maathuis
cf3c0123a0 nouveau: forgot to add a break 2008-03-30 14:50:41 +02:00
Maarten Maathuis
68b83a8813 nouveau: Add ctx values for nv86.
- Note that this may not work for all nv86.
2008-03-30 14:48:55 +02:00
Dave Airlie
753a4bdf1b 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.
2008-03-30 07:33:39 +10:00
Oliver McFadden
1674d28179 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. :-)
2008-03-29 17:31:39 +00:00
Stuart Bennett
a81d07f64d nouveau: nv20 bios does not initialise PTIMER
The wait functions depend on PTIMER, so write the old (incorrect, but working) values for uninitialised hw
2008-03-25 18:32:26 +00:00