Commit Graph

376 Commits (18f2fcf5aa299fe3b7b56af37e7eefe78c921f61)

Author SHA1 Message Date
Ben Skeggs 18f2fcf5aa libdrm/nouveau: fix dma debugging 2009-02-20 14:11:18 +10:00
Eric Anholt 709b82e1a5 intel: Clear ioctl parameter outvalues and pads that confuse valgrind.
The minor CPU cost here is probably outweighed by bothering us with noise in
the tool.
2009-02-15 18:35:03 -08:00
Ben Skeggs 7e5c512104 libdrm: make libdrm_nouveau conditional, disabled by default
libdrm isn't supposed to ship APIs not present in a released kernel.
2009-02-15 21:51:46 +10:00
Jakob Bornecrantz eb78c53aa1 mode: Make xfdrmMode.[c|h] not depend on drm_mode.h 2009-02-11 17:11:00 +01:00
Pekka Paalanen 2d2f105f79 nouveau: fix type warnings: void* arith, un/signed
nouveau_notifier.c had two places where void* was used in arithmetic,
fixed by using char*.

nouveau_dma_wait(), nouveau_notifier_wait_status() and
nouveau_resource_alloc() had signed/unsigned comparison warnings, fixed
by changing the function parameter into an unsigned type.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2009-02-11 23:48:49 +02:00
Ben Skeggs 97fdadee6a nouveau: fix some issues where buffer objects never get freed 2009-02-05 23:17:05 +10:00
Ben Skeggs 225e7e274f nouveau: install libdrm_nouveau with libdrm 2009-02-04 14:32:31 +10:00
Eric Anholt cbdd6272c0 intel: don't count fences on 965 and later, as they don't use them. 2009-01-27 17:24:49 -08:00
Eric Anholt 9209c9a653 intel: Fix under-counting of fences registers required in check_aperture. 2009-01-27 17:24:41 -08:00
Jesse Barnes 2fa5f28eee 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>
2009-01-27 17:23:42 -08:00
Eric Anholt 02445eab64 intel: Retry pin ioctl on -EINTR. 2009-01-14 16:12:08 -08:00
Owain G. Ainsworth 65b90fb377 Don't use DRM_BO_FLAG_NO_MOVE in bufmgr fake. It's a ttm flag.
It's also unused, so worthless.
2009-01-13 17:18:43 -08:00
Owain G. Ainsworth 13ff0e58c3 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-01-12 13:14:25 +01:00
Jesse Barnes badc63464c libdrm: add autoconf check for clock_gettime
Should be more portable this way.
2009-01-07 11:47:52 -08:00
Jesse Barnes ca37077fb7 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-07 10:48:26 -08:00
Jesse Barnes f4f76a6894 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-07 10:18:08 -08:00
Keith Packard 18f091d136 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>
2008-12-17 10:29:15 -08:00
Keith Packard 40334c6410 intel: Debug output %u vs uint64_t warning fix
Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-17 10:28:25 -08:00
Keith Packard bd14b2cf75 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>
2008-12-17 10:28:25 -08:00
Keith Packard b13f4e1a32 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>
2008-12-17 10:28:25 -08:00
Jesse Barnes 731cd5526e 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.
2008-12-17 10:11:37 -08:00
Eric Anholt c86d431fe6 intel: don't skip set_domain on mapping of shared buffers. 2008-12-14 16:50:02 -08:00
Eric Anholt cebbd2edb5 intel: don't let named buffers into the BO cache.
We wouldn't want some remaining 3D rendering to scribble on our batchbuffer.
2008-12-14 16:50:02 -08:00
Eric Anholt 782316801b intel: Remove the mapped flag, which is adequately covered by bo_gem->virtual. 2008-12-14 16:50:02 -08:00
Jesse Barnes 9583c099b4 Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db1055.

We really just want the libdrm and ioctl bits, not all the driver
stuff.
2008-12-10 15:50:22 -08:00
Jesse Barnes 6656db1055 Merge branch 'modesetting-gem' 2008-12-09 10:23:43 -08:00
Dave Airlie c99566fb81 libdrm: bump to 2.4 for lib version
we already have a 2.3.x version out there
2008-12-08 14:05:32 +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
Jakob Bornecrantz 9a4cb7eab4 mode: Minor reodering and renaming 2008-11-12 19:17:18 +01:00
Jakob Bornecrantz ea849d7ca6 mode: Unify userspace API to uint_t 2008-11-12 18:50:05 +01:00
Jakob Bornecrantz 1ead45c8f0 mode: Remove hotplug support from ioctl interface 2008-11-12 18:40:04 +01:00
Jerome Glisse a7457915f5 radeon+libdrm-radeon: change relocation informations
Relocation now consist of the following informations (in this order) :
handle          buffer object handle identifier
start_offset    start offset of first data of the buffer object used by the cs
end_offset      end offset of last data of the buffer object used by the cs
read_domain     read domain (either VRAM, or GTT as GPU is invalid for CS)
write_domain    write domain (either VRAM, or GTT as GPU is invalid for CS)
flags           flags used for further optimization (like discard previous
                buffer content or forget buffer content after cs which can
                help in avoiding moving content in or out)
2008-11-12 16:57:09 +01:00
Jerome Glisse 72997fb372 libdrm-radeon: be verbose on bo failure and cleanup cs a bit 2008-11-10 22:18:22 +01:00
Jerome Glisse 751d024dd5 libdrm-radeon: update libdrm-radeon to match current CS relocation structures 2008-11-09 18:45:43 +01:00
Eric Anholt 930c0e7cf4 intel: Restart on interrupt of bo_wait_rendering instead of complaining. 2008-11-07 12:59:43 -08:00
Jerome Glisse 273cc1a698 radeon: lib radeon add bo & cs gem backend 2008-11-06 00:40:06 +01:00
Jerome Glisse 2d822542c7 radeon: libdrm_radeon add handle to debug string 2008-11-05 16:00:04 +01:00
Jerome Glisse 7651b4c424 radeon: debug bo 2008-11-02 16:00:06 +01:00
Eric Anholt 4b9826408f intel: Rename dri_ and intel_ symbols to drm_intel_.
I wanted to avoid doing this, as it's a bunch of churn, but there was a
conflict between the dri_ symbols in libdrm and the symbols that were in
Mesa in 7.2, which broke Mesa 7.2 AIGLX when the 2D driver had loaded new
libdrm symbols.  The new naming was recommended by cworth for giving the
code a unique prefix identifying where the code lives.

Additionally, take the opportunity to fix up two API mistakes: emit_reloc's
arguments were in a nonsensical order, and set_tiling lacked the stride
argument that the kernel will want to use soon.  API compatibility with
released code is maintained using #defines.
2008-10-30 11:29:40 -07:00
Jerome Glisse 5d861951b3 radeon: libdrm_radeon updates bo & cs interfaces 2008-10-29 23:40:20 +01:00