Commit graph

388 commits

Author SHA1 Message Date
Dave Airlie
1edb70f1b9 radeon: fix wait return code check 2009-04-16 17:10:19 +10:00
Dave Airlie
529848ce0c radeon: add quick bo test 2009-04-14 14:30:22 +10:00
Dave Airlie
2f0720455d radeon: fixup mmap interface 2009-04-06 13:02:21 +10:00
Dave Airlie
96982ffc09 radeon: fixup for kms api 2009-04-06 09:57:06 +10:00
Dave Airlie
7677fd4765 radeon: fixup space accounting + add assert for now 2009-04-06 09:46:47 +10:00
Dave Airlie
41e736c795 radeon: add name function for speeding up dri2 2009-03-23 18:32:36 +10:00
Jakob Bornecrantz
06d9eff137 mode: Make xfdrmMode.[c|h] not depend on drm_mode.h
(cherry picked from commit eb78c53aa1)
2009-03-13 18:44:08 +10:00
Dave Airlie
cc2b7ffc85 radeon: do not use this flushing mechanism yet.
This flush seems to cause instability at the moment,
I can run glxgears on a cube now a lot better without this
2009-02-23 14:36:40 +10:00
Ben Skeggs
61ff524373 libdrm/nouveau: free drmVersion after we're done with it 2009-02-20 09:25:35 +10:00
Ben Skeggs
7e744d523d libdrm/nouveau: fix dma debugging 2009-02-19 19:40:19 +10:00
Dave Airlie
d9689e2161 libdrm/radeon: remove unused debug 2009-02-17 10:55:26 +10:00
Dave Airlie
333f3395a0 libdrm/radeon: reset the usage counters post-submit 2009-02-17 10:55:26 +10:00
Eric Anholt
011a04c7a2 intel: don't count fences on 965 and later, as they don't use them.
(cherry picked from commit cbdd6272c0)
2009-02-15 17:03:18 +10:00
Eric Anholt
544847b774 intel: Fix under-counting of fences registers required in check_aperture.
(cherry picked from commit 9209c9a653)
2009-02-15 17:03:17 +10:00
Jesse Barnes
727feefcac intel: libdrm support for fence management in execbuf
This patch tries to use the available fence count to figure out whether a
given batch can succeed or not (just like the aperture check).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 2fa5f28eee)
2009-02-15 17:03:17 +10:00
Eric Anholt
dd027724ba intel: Retry pin ioctl on -EINTR.
(cherry picked from commit 02445eab64)
2009-02-15 17:03:17 +10:00
Owain G. Ainsworth
f78fda0c31 Remove drmModeReplaceFb after it was removed from the kernel.
It is impossible to replace the original semantics of this call purely
in userland, since the fb_id would change.

after discussion with Dr_Jakob

Signed-Off-By: Owain Ainsworth <oga@openbsd.org>
Acked-By: Jakob Bornecrantz <jakob@vmware.com>
2009-02-15 17:03:17 +10:00
Jesse Barnes
7df60d46fd libdrm: add autoconf check for clock_gettime
Should be more portable this way.
(cherry picked from commit badc63464c)
2009-02-15 17:03:16 +10:00
Jesse Barnes
3e4b9e9727 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.
(cherry picked from commit ca37077fb7)
2009-02-15 17:03:16 +10:00
Jesse Barnes
ace8c5ec92 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-02-15 17:03:16 +10:00
Keith Packard
f869053223 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>
(cherry picked from commit 18f091d136)
2009-02-15 17:03:16 +10:00
Keith Packard
9888b8b0ec intel: Debug output %u vs uint64_t warning fix
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 40334c6410)
2009-02-15 17:03:15 +10:00
Keith Packard
11cfc15299 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>
(cherry picked from commit bd14b2cf75)
2009-02-15 17:03:15 +10:00
Keith Packard
7a5df78cb5 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>
(cherry picked from commit b13f4e1a32)
2009-02-15 17:03:15 +10:00
Eric Anholt
5764d9756e intel: don't skip set_domain on mapping of shared buffers.
(cherry picked from commit c86d431fe6)
2009-02-15 17:03:15 +10:00
Eric Anholt
ee310fe05f intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
(cherry picked from commit cebbd2edb5)
2009-02-15 17:03:14 +10:00
Eric Anholt
3fdda2f9ea intel: Remove the mapped flag, which is adequately covered by bo_gem->virtual.
(cherry picked from commit 782316801b)
2009-02-15 17:03:14 +10:00
Dave Airlie
6117fa1214 radeon: add libdrm_radeon.pc so we can make Mesa detect it 2009-02-15 17:03:14 +10:00
Michel Daenzer
9a1cfb960f radeon: add qword write function 2009-02-15 17:02:46 +10:00
Ben Skeggs
1952a896d0 nouveau: fix some issues where buffer objects never get freed 2009-02-05 23:03:29 +10:00
Ben Skeggs
68891ae2ef nouveau: install libdrm_nouveau with libdrm 2009-02-04 15:03:34 +10:00
Dave Airlie
bbd5e64216 radeon: make dword writes be inlined
This moves the size checks to the begin section and makes dword
writes inline for all CS people.

Gets me back some of my CPU
2009-02-04 11:11:55 +10:00
Dave Airlie
98738555d1 radeon: add space accounting to cs code 2009-01-31 01:50:23 +10:00
Dave Airlie
e9298a02ac radeon: add bo_wait functionality 2009-01-13 16:48:04 +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
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
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
Jerome Glisse
c0ba14fd90 libdrm-radeon: add print callback to cs & small fixes 2008-11-16 18:04:43 +01:00
Jerome Glisse
5ae79e7edd libdrm-radeon: unref return current BO ptr to reflect BO destruction 2008-11-15 10:39:37 +01:00
Jerome Glisse
080a45624b libdrm-radeon: unreference buffer once cs stream is submited or on cs clean
BO are referenced once by reloc to make sure that they not destroyed
before we get a chance to flush the cmd stream, so we need to unreference
them once in cs submit or cs erase if cs i never submitted so bo can
be destructed.
2008-11-14 12:16:10 +01:00
Jerome Glisse
bfbecc5c42 libdrm-radeon: new tracker tools
To keep record of bo activities and print them when necessary,
should help in tracking unbalanced ref/unref calls.
2008-11-14 12:16:10 +01:00
Jesse Barnes
965b4d662a Merge branch 'master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/intel/intel_bufmgr.h
	libdrm/intel/intel_bufmgr_fake.c
	libdrm/intel/intel_bufmgr_gem.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_irq.c
	shared-core/radeon_cp.c
	shared-core/radeon_drv.h
2008-11-13 15:30:06 -08:00
Jesse Barnes
7e27b3ba88 libdrm_intel: fix warnings on 64 bit
Cast a couple of %llx args to unsigned long long.
2008-11-13 13:58:32 -08:00
Jesse Barnes
276c07d885 libdrm: add support for i915 GTT mapping ioctl
Add a drm_intel_gem_bo_map_gtt() function for mapping a buffer object
through the aperture rather than directly to its CPU cacheable memory.
2008-11-13 13:52:04 -08:00