Commit Graph

324 Commits (bfbecc5c42d9669fceaab683d1464dd353be9492)

Author SHA1 Message Date
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
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
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
Jerome Glisse 5d861951b3 radeon: libdrm_radeon updates bo & cs interfaces 2008-10-29 23:40:20 +01:00
Jerome Glisse af118cd186 radeon: reloc are backend dependant 2008-10-27 23:26:15 +01:00
Jerome Glisse 3b17b50e9c Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-gem 2008-10-27 19:33:56 +01:00
Jerome Glisse 7617d1fef7 radeon: radeon util library 2008-10-27 19:27:15 +01:00
Jakob Bornecrantz 34a3ebffc3 mode: Try to settle on a standard for struct fields 2008-10-24 18:46:47 +02:00
Dave Airlie 4c8aeb6fc7 link libdrm_intel properly
libdrm_intel needs symbols from libdrm, so link against it.
(cherry picked from commit d9c2f65dd8)

Conflicts:

	libdrm/Makefile.am
2008-10-17 06:40:38 +10:00
Dave Airlie 9dda3a8f63 libdrm: don't depend or link to libdrm_intel 2008-10-17 06:39:58 +10:00
Eric Anholt 6df7b0719f intel: Protect bufmgr objects with a pthread mutex.
We want to be able to use the bufmgr from multiple threads for GL, and thus
we need to protect the internal structures.

The pthread-stubs package is used so that programs not linked against
pthreads get weak symbols to stubs and don't eat most of the cost.
2008-10-17 06:38:57 +10:00
Jesse Barnes af2323b4b3 intel bufmgr: reinstate buffer handle tracking
We need a way of getting at the underlying handle for use with mode
setting.  We can either export it in the dri_bo object or provide a new
callback to get it.
2008-09-30 16:35:53 -07:00
Dave Airlie 972f657265 Merge remote branch 'origin/master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/dri_bufmgr.h
	linux-core/drm_irq.c
	linux-core/drm_sysfs.c
	linux-core/drm_ttm.c
	shared-core/i915_dma.c
	shared-core/i915_irq.c
	shared-core/nouveau_drv.h
	shared-core/radeon_cp.c
2008-09-30 14:13:49 +10:00
Eric Anholt 2db8e0c8ef intel: Allow up to 15 seconds chewing on one buffer before acknowledging -EBUSY.
The gltestperf demo in some cases took over seven seconds to make it through
one batchbuffer on a GM965.

Bug #17004.
2008-09-23 17:10:04 -07:00
Eric Anholt 0dccf017ab intel: Replace wraparound test logic in bufmgr_fake. Again.
I'd swapped the operands, so if we weren't in lockstep with the hardware we
said the sequence was always passed.  Additionally, a race was available that
we might have failed at recovering from.  Instead, I've replaced the logic
with new stuff that should be more robust and not rely on all the parties in
userland following the same IRQ_EMIT() == 1 protocol.  Also, in a radical
departure from past efforts, include a long comment describing the failure
modes and how we're working around them.

Thanks to haihao for catching the original issue.
2008-09-23 17:10:04 -07:00
Eric Anholt 1b3abe62b5 intel: Do strerror on errno, not on the -1 return value from ioctl. 2008-09-23 17:10:04 -07:00
Xiang, Haihao 3949f3c9ea intel: Fix driver-supplied argument to exec function (fd.o bug #17653). 2008-09-22 10:16:19 +08:00
Eric Anholt b54d15d8fd Add missing \ to libdrm_la_SOURCES
Reported by jcristau.
2008-09-10 20:05:02 -07:00
Eric Anholt 368b392e6d intel: don't forget to include config.h in bufmgr code.
Thanks to airlied for catching this.
2008-09-10 14:07:19 -07:00
Eric Anholt f9d98beefc intel: move drm calls to exec buffers to libdrm_intel.
This avoids duplicating the effort in 3 places.  Also, added emit/wait fence
callbacks back in bufmgr_fake since we need it for non-drm 2d.  Sigh.
2008-09-10 14:07:18 -07:00
Eric Anholt 869d8bebed intel: Move IRQ emit/wait from callbacks into the bufmgr.
In the process, work around the glaring bugs of the kernel irq wait function.
2008-09-10 14:07:18 -07:00
Eric Anholt 738e36acbc Move intel libdrm stuff to libdrm_intel.so
dri_bufmgr.h is replaced by intel_bufmgr.h, and several functions are renamed,
though the structures and many functions remain dri_bufmgr_* and dri_bo_*
2008-09-10 14:07:18 -07:00
Kristian Høgsberg 0239594fc3 [intel_bufmgr_gem] Remember global name when creating buffer from name. 2008-08-26 14:28:25 -04:00
Dave Airlie 9101a0205c libdrm: add udev support.
This patch allows you to --enable-udev, and will avoid having libdrm
make device nodes. If you are using udev, you should really --enable-udev
your libdrm.
2008-08-24 16:54:47 +10:00
Coleman Kane 41b83a9958 Change prototype of drmIoctl to unsigned long request.
This resolves and issue on amd64 FreeBSD and it looks like the
linux ioctl syscall should be unsigned long as well.

Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-08-18 17:08:21 -04:00
Dave Airlie 2d4420c666 Merge branch 'radeon-gem-cs' into modesetting-gem
Conflicts:

	libdrm/xf86drm.c
	linux-core/Makefile.kernel
	linux-core/drmP.h
	linux-core/drm_compat.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/drm_vm.c
	shared-core/i915_dma.c
	shared-core/r300_cmdbuf.c
	shared-core/radeon_drv.h
2008-08-14 09:36:34 +10:00
Jesse Barnes 2f03ba4aad Merge branch 'master' into modesetting-gem
Conflicts:

	libdrm/Makefile.am
	libdrm/xf86drm.h
	shared-core/i915_dma.c
	shared-core/i915_irq.c
2008-08-13 10:08:02 -07:00
Kristian Høgsberg b0e6882946 [intel_bufmgr_gem] Fix flink buffer name caching (#17085, #17092).
Store the global name in global_name, don't overwrite the gem_handle.
2008-08-12 22:22:55 -04:00
Jesse Barnes e9648e9107 Export a generic dri_bo handle for use by clients
We'll need something like this (either a handle field or a dri_bo_get_handle
function) for kernel mode setting to get at the handles.
2008-08-12 18:22:34 -07:00
Matthieu Herrb 966c783e96 libdrm: Allow build outside of source tree. 2008-08-11 10:48:47 -07:00
Eric Anholt f7a9940715 Drop TTM interfaces from the userland library. 2008-08-08 15:57:47 -07:00
Eric Anholt 9e9d9b1741 Fix compile warning from check_aperture change. 2008-08-08 14:08:43 -07:00
Eric Anholt 46e9274e85 Replace the check_aperture API with one we can make thread-safe.
While the bufmgr isn't thread-safe at the moment, we need it to be for shared
objects between contexts.
2008-08-08 13:58:29 -07:00
Keith Packard 5968e061db Make flink save the kernel-assigned name and return it instead of creating another name 2008-08-07 15:26:30 -07:00
Jesse Barnes c7fb19e9b0 Merge branch 'drm-gem' into modesetting-gem 2008-08-07 14:02:04 -07:00
Keith Packard 8e41ce17b4 Expose pin/unpin/set_tiling/flink APIs 2008-08-04 23:34:16 -07:00
Dave Airlie d2d7f3069d drm: userspace rip out TTM API 2008-07-31 13:31:30 +10:00
Dave Airlie 2556341f8b Merge remote branch 'origin/modesetting-101' into modesetting-gem 2008-07-09 14:53:47 +10:00
Kristian Høgsberg 3e02f7fd31 Merge commit 'origin/drm-gem' into ms-gem
Conflicts:

	linux-core/drmP.h
	linux-core/drm_drv.c
	linux-core/drm_stub.c
	linux-core/i915_drv.c
	linux-core/i915_gem.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-07-07 15:43:43 -04:00
Maarten Maathuis 7cbc5f6145 modesetting-101: Make the interface variable names a little more consistent + modeprint changes.
- All things are now called _id when they are id's.
- modeprint now accepts driver name as first argument.
2008-07-05 12:04:07 +02:00
Dave Airlie 142a309604 modesetting: rip out all of the generation code.
not needed, hotplug will work just as well hopefully.
2008-07-04 09:34:24 +10:00
Maarten Maathuis 11b7a81c8a libdrm: fix typo in comment 2008-07-03 17:25:37 +02:00
Maarten Maathuis 5de978905a [libdrm] count connectors and such has no place in a crtc object 2008-07-03 00:25:42 +02:00