Commit graph

4332 commits

Author SHA1 Message Date
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
Thomas Hellstrom
8bce9b9ee2 Add the new TTM code. Adjust drm_hashtab include and exports. 2009-01-17 12:52:39 +01:00
Thomas Hellstrom
6941b5a9cc Add a DRM tracker for global objects. 2009-01-17 12:44:39 +01:00
Thomas Hellstrom
58410a26aa Split out the mm defines in a separate header and add atomic operations. 2009-01-17 12:41:58 +01:00
Thomas Hellstrom
bbfd0d2025 Remove old TTM. 2009-01-17 12:39:50 +01:00
Dave Airlie
e9298a02ac radeon: add bo_wait functionality 2009-01-13 16:48:04 +10:00
Dave Airlie
2b0c9c01c2 radeon: add new getparam to get pcidevice 2009-01-11 09:49:00 +10:00
Dave Airlie
d587c6f150 radeon: make name consistent with libdrm_intel 2008-12-22 12:26:56 +10:00
Dave Airlie
b3d4e7433d radeon: size the relocs correctly 2008-12-22 11:57:15 +10:00
Dave Airlie
c93f1c88ce radeon: drop more cs2 2008-12-19 16:44:22 +10:00
Dave Airlie
8c40a5c648 radeon: more cs2 removal 2008-12-19 16:43:01 +10:00
Dave Airlie
4b10ddff78 radeon: drop CS2 into CS, remove start/end offset 2008-12-19 16:31:55 +10:00
Jesse Barnes
12e68f8059 Merge branch 'master' into modesetting-gem 2008-12-03 11:54:07 -08:00
Jesse Barnes
d5d5aca7f9 Merge branch 'master' into modesetting-gem 2008-12-03 11:53:36 -08:00
Eric Anholt
b0d93c74d8 Bump version to 2.4.2 to signal new libdrm_intel functions. 2008-12-02 12:19:37 -08:00
Eric Anholt
6fb1ad767d intel: Add a function for setting (GTT,GTT) domain, for use by UXA.
This function can also serve the role that the bo_wait_rendering did, when
write_enable is unset.
2008-12-02 12:19:34 -08:00
Ben Skeggs
7e4e0fbbb8 nv50: support NV94 chipset 2008-11-23 18:49:09 +11:00
Ben Skeggs
52232ad702 nv50: update context-related tables for original 8800GTS
I either messed up when I pulled these from a mmio-trace last time, or
the previous values didn't work on my card.  Hopefully it's the former!

In any case, at least one of the original NV50 chipsets work now.
2008-11-21 13:18:58 +11:00
Jesse Barnes
10c3e1a8b5 Merge branch 'master' into modesetting-gem 2008-11-20 11:01:24 -08:00
Jesse Barnes
2e2fd6c632 DRM: make drm_map_type match upstream kernel
Since the TTM type isn't upstream yet, we need to make sure libdrm uses
what the kernel uses, which is _DRM_GEM = 6.
2008-11-20 11:00:29 -08:00
Jesse Barnes
5923831baf DRM: make drm_map_type match kernel
GEM is upstream, but TTM isn't, so _DRM_GEM needs to be 6, not 7.
2008-11-20 10:57:33 -08:00
Stephane Marchesin
c029ed2510 Unbreak drm build. 2008-11-19 23:17:27 +01:00
Jesse Barnes
c67a83dfe1 Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-gem 2008-11-19 12:42:49 -08:00
Jesse Barnes
60c1e3a09e libdrm_intel: fix merge error
don't take the lock twice
2008-11-19 10:56:48 -08:00
Jesse Barnes
8f5d8ba97e Update modetest 2008-11-19 10:54:11 -08:00
Jerome Glisse
e98eda9159 Revert "gem: protect idr_pre with the spinlock"
This reverts commit f46aba4332.
2008-11-17 13:35:51 +01:00
Jerome Glisse
f46aba4332 gem: protect idr_pre with the spinlock
There seems to be an issue if we don't protect idr_pre with
the spinlock we use for idr operations.
2008-11-16 18:13:16 +01:00