Commit graph

4358 commits

Author SHA1 Message Date
Thomas Hellstrom
f785d1a15e Update to latest libdrm. 2009-02-20 10:06:53 +01:00
Thomas Hellstrom
875a6ae217 ttm: Adjust swapping target so that current allocation will succeed. 2009-02-17 09:07:49 +01:00
Thomas Hellstrom
e8eb30ad8b ttm: Fix a spinlock bug. 2009-02-17 09:03:05 +01:00
Thomas Hellstrom
99825d5eac Fix refcounting bugs in swap code. 2009-02-13 22:07:48 +01:00
Thomas Hellstrom
8be10a790e More bool conversion. 2009-02-13 21:58:33 +01:00
Thomas Hellstrom
a520b3ed01 Another checkpoint: Use bool for boolean. 2009-02-13 21:18:47 +01:00
Thomas Hellstrom
41c3f1ac56 Checkpoint: Use bool for boolean. 2009-02-13 09:00:35 +01:00
Jerome Glisse
5c7574555d ttm: indentation fixes 2009-02-11 17:04:19 +01:00
Thomas Hellstrom
815856d5de Fix openchrome backwards compat. 2009-02-10 20:11:26 +01:00
Thomas Hellstrom
97302ed5c7 Fix TTM backwards compat to 2.6.25 2009-02-10 20:08:48 +01:00
Thomas Hellstrom
8a2a4eb445 openchrome: Use ttm_lock_set_kill functionality to kill processes attempting to use the TTM functionality when it is gone. 2009-02-05 15:44:02 +01:00
Thomas Hellstrom
a0f198572a openchrome: Use the BKL for old drm ioctls as some of them don't appear thread-safe, but keep unlocked_ioctl for opencrhome- and TTM code. 2009-02-05 15:38:31 +01:00
Thomas Hellstrom
72ee1c68ba drm_core: Avoid dri client deadlocks when master disappears by 1) Notify lock waiters when we close the master file descriptor. Not when the master structure is removed. 2) Send a SIGTERM to all clients waiting for the lock. 2009-02-05 15:33:51 +01:00
Thomas Hellstrom
b909e98de7 Work around some X86 PAT oddities by using VM_MIXEDMAP instead
of VM_PFNMAP.
2009-02-05 14:12:41 +01:00
Thomas Hellstrom
869f60aa62 drm core: Wake up _all_ lock waiters when the master is gone. 2009-02-05 13:59:48 +01:00
Thomas Hellstrom
ddadcb67da Don't return -ERESTARTSYS to user-space. 2009-02-04 15:53:07 +01:00
Thomas Hellstrom
dc150a1ef2 ttm: Add a kill capability to the ttm lock. 2009-02-04 09:17:36 +01:00
Thomas Hellstrom
2a0c9d9652 Silence a couple of compilation warnings. 2009-02-03 22:22:43 +01:00
Thomas Hellstrom
6a16de23d9 openchrome: s/1/true/ 2009-02-03 22:22:43 +01:00
Dave Airlie
aa5612d308 radeon: add space accounting to cs code 2009-02-03 22:22:43 +01:00
Thomas Hellstrom
2e3f86c2a0 Fix for 2.6.29 2009-02-03 21:56:52 +01:00
Thomas Hellstrom
3eb288903c Fix a segfault due to the ttm file object disappearing at release while we still hold a reference to identify object creator. 2009-02-03 21:56:46 +01:00
Thomas Hellstrom
17ca5f8ee1 openchrome: Fix for 2.6.29 2009-02-03 21:51:57 +01:00
Thomas Hellstrom
465d690edc Check for null pointer when determining VRAM start.
(Reported by Erik-Jan on openchrome-devel)
2009-01-26 23:14:02 +01:00
Thomas Hellstrom
43d880df02 Silence error message. 2009-01-26 22:50:26 +01:00
Eric Anholt
0ef03e8203 bump version to 2.4.4 2009-01-26 10:22:24 +01:00
Eric Anholt
2206db89ed intel: Retry pin ioctl on -EINTR. 2009-01-26 10:22:09 +01:00
Jesse Barnes
e3822ea4ca libdrm: add autoconf check for clock_gettime
Should be more portable this way.
2009-01-26 10:19:33 +01:00
Jesse Barnes
6d50100834 libdrm: only check for vblank timeout if we caught EINTR
Michel caught a case where we might overwrite a success or other return
value with EBUSY, so check the return value before checking for the
timeout condition.
2009-01-26 10:19:22 +01:00
Jesse Barnes
9368bbbb61 libdrm: add timeout handling to drmWaitVBlank
In some cases, vblank interrupts may be disabled or otherwise broken.
The kernel has a 3s timeout builtin to handle these cases, but the X
server's SIGALM for cursor handling may interrupt vblank wait ioctls,
causing libdrm to restart the ioctl, making the kernel's timeout
useless.

This change tracks time across ioctl restarts and returns EBUSY to the
caller if the expected vblank sequence doesn't occur within 1s of the
first call.

Fixes fdo bz #18041, which is caused by a drmWaitVBlank hanging due to
the corresponding pipe getting disabled (thus preventing further events
from coming in).
2009-01-26 10:18:55 +01:00
Jesse Barnes
1ba6651a66 Remove executable from modeprint test dir
Accidentally committed it with the mode setting changes.
2009-01-26 10:17:30 +01:00
Eric Anholt
010a062f47 intel: Rename plane[AB]* back to pipe[AB]*.
The values are really going to continue meaning pipe, not plane, and that's
what they're called in the kernel copy of the header.  Userland hasn't ever
made the switch to pipe!=plane, since userland checks are based on DRM
version, which is still stuck at 1.6.  However, Mesa did start using
plane[AB] names, so provide a compat define.
2009-01-26 10:16:30 +01:00
Eric Anholt
a5b80f30d7 intel: Sync GEM ioctl comments for easier diffing against the kernel. 2009-01-26 10:15:18 +01:00
Thomas Hellstrom
3a0287b79a modetest: Print more stuff. Prettier. 2009-01-26 10:14:32 +01:00
Eric Anholt
0508530386 libdrm: Fix modetest/modeprint to use automake stuff. 2009-01-26 10:13:17 +01:00
Keith Packard
208fcff835 intel: Cache tiling/swizzle state in user mode. Reset tiling on reuse.
Remember tiling mode values provided by appplications, and
record tiling mode when creating a buffer from another application. This
eliminates any need to ask the kernel for tiling values and also makes
reused buffers get the right tiling.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-26 10:11:52 +01:00
Keith Packard
78ded5b8df intel: Debug output %u vs uint64_t warning fix
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-26 10:11:44 +01:00
Keith Packard
66fad18f11 intel: return error status from drm_intel_gem_bo_map
Applications may actually care if the mapping operation failed, so when
it happens, return an error indication. errno is probably trashed by
fprintf though.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-26 10:11:37 +01:00
Keith Packard
9160cecdd6 intel: Dump out memory usage information when the kernel fails to pin
The execbuffer ioctl returns ENOMEM when it fails to pin all of the buffers
in the GTT. This is usually caused by the DRM client attempting to use too
much memory in a single request. Dumping out the requested and available
memory values should help point out failures in the DRM code to catch over
commitments of this form.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-26 10:11:21 +01:00
Jesse Barnes
f3cfadad57 libdrm: add mode setting files
Add mode setting files to libdrm, including xf86drmMode.* and the new
drm_mode.h header.  Also add a couple of tests to sanity check the
kernel interfaces and update code to support them.
2009-01-26 10:10:51 +01:00
Eric Anholt
59d530a4a0 intel: don't skip set_domain on mapping of shared buffers. 2009-01-26 09:59:52 +01:00
Eric Anholt
02952b8899 intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
2009-01-26 09:59:44 +01:00
Eric Anholt
9ca85aad48 intel: Remove the mapped flag, which is adequately covered by bo_gem->virtual. 2009-01-26 09:59:31 +01:00
Jesse Barnes
57fd18d86f Bump version to 2.4.3 to reflect addition of mode setting header 2009-01-26 09:58:54 +01:00
Jesse Barnes
4f2c166188 Update .gitignore with new modetest program 2009-01-26 09:58:27 +01:00
Thomas Hellstrom
73fce7bc76 Take bo off lru list when reserving, as ttm_bo_reserve_locked doesn't do that. 2009-01-21 21:56:38 +01:00
Thomas Hellstrom
72f10b46d4 Don't free object while information in them are used for accounting purposes.
Fix by Alan Hourihane.
2009-01-21 14:11:11 +01:00
Thomas Hellstrom
2eb3922aa6 Build and install openchrome. 2009-01-17 13:02:46 +01:00
Thomas Hellstrom
d93fd75f4d Add reworked via driver as "openchrome". 2009-01-17 12:57:04 +01:00
Thomas Hellstrom
39daf20090 Add TTM user-space includes to libdrm make. 2009-01-17 12:55:11 +01:00