Jerome Glisse
7617d1fef7
radeon: radeon util library
2008-10-27 19:27:15 +01: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
Maarten Maathuis
9f28da80f6
Change some obviously wrong things about property blobs, still broken though.
...
- I do not fully understand these blobs, so i'm leaving it at this for the moment.
2008-06-27 18:45:08 +02:00
Keith Packard
5540457fa5
[intel-gem] Use I915_GEM_DOMAIN_GTT in dri_gem_bo_wait_rendering.
...
I915_GEM_DOMAIN_CPU is very expensive to wait for -- it generally requires
clflushing the frame buffer.
2008-06-24 09:52:27 -07:00
Maarten Maathuis
f9dad8cc22
libdrm: check for allocation failure
2008-06-23 21:15:54 +02:00
Keith Packard
52e5d24fae
[intel-gem] Add DRM_IOCTL_I915_GEM_SW_FINISH to flag CPU writes
...
When a software fallback has completed, usermode must notify the kernel so
that any scanout buffers can be synchronized. This ioctl should be called
whenever a fallback completes to flush CPU and chipset caches.
2008-06-20 00:21:57 -07:00
Jesse Barnes
86accbcb34
Merge commit 'origin/drm-gem' into modesetting-gem
...
Lots of conflicts, seems to load ok, but I'm sure some bugs snuck in.
Conflicts:
linux-core/drmP.h
linux-core/drm_lock.c
linux-core/i915_gem.c
shared-core/drm.h
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-06-18 15:25:54 -07:00
Keith Packard
8b9ab108ec
[libdrm] Restart all ioctls on signal receipt
...
Receiving a signal should be ignored by the library, so just restart any
ioctl which returns EINTR or EAGAIN.
2008-06-13 16:03:22 -07:00
Eric Anholt
e558e1d7da
[gem] Catch -EINTR from blocking ioctls and restart them.
...
Thanks to Thomas Hellstrom for catching the issue, no thanks to the kernel
developer who authoritatively told me that they would get restarted on their
own.
2008-06-13 10:04:14 -07:00
Eric Anholt
57b4c4c32d
Move the renaming of mm.c symbols to #defines in the header.
...
This reduces the diff from Mesa and reduces the illegibility of what I did.
2008-06-11 15:58:33 -07:00
Eric Anholt
2655005762
[gem] Move potentially device-specific ioctls to the intel driver.
...
This is the create (may want location flags), pread/pwrite/mmap
(performance tuning hints), and set_domain (will 32 bits be enough for
everyone?) ioctls. Left in the generic set are just flink/open/close.
The 2D driver must be updated for this change, and API but not ABI is broken
for 3D. The driver version is bumped to mark this.
2008-06-11 14:42:40 -07:00
Jesse Barnes
a1d9600724
Merge commit 'origin/drm-gem' into modesetting-gem
...
Passed the compile test; it's ready to ship.
Conflicts:
libdrm/Makefile.am
linux-core/Makefile.kernel
linux-core/drmP.h
linux-core/drm_memrange.c
linux-core/drm_stub.c
shared-core/drm.h
shared-core/i915_dma.c
shared-core/i915_drv.h
shared-core/i915_irq.c
2008-06-10 17:31:54 -07:00
Eric Anholt
500c81d194
[gem] Don't forget to munmap in the non-bo-reuse object-freeing case.
2008-06-06 17:13:16 -07:00
Keith Packard
329e086225
[libdrm/intel] Eliminate extra dri_gem_bo_bucket_entry structure
...
Place the buffer reuse links right into the dri_bo_gem object.
2008-06-06 13:00:46 -07:00
Keith Packard
5a55b48a41
[libdrm/intel] Remove unused intel_validate_entry structure
2008-06-06 13:00:46 -07:00
Keith Packard
a919ff5d5e
[libdrm/intel] Reuse entire dri_bo_gem structure
...
The code was discarding the dri_bo_gem structure and saving only the kernel
handle. This lost the mmap address, causing pain when the next buffer user
wanted to map the buffer.
2008-06-06 13:00:46 -07:00