Commit Graph

213 Commits (71f0a3e389efb6c92a84299d05beb2a1bfa53469)

Author SHA1 Message Date
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
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
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
Keith Packard 8e41ce17b4 Expose pin/unpin/set_tiling/flink APIs 2008-08-04 23:34:16 -07: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
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
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
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
Eric Anholt d198e9b091 Add a function to bufmgr_fake to evict all buffers in the GTT.
This will be used by the X Server for VT switch.
2008-06-05 08:45:39 -07:00
Eric Anholt 8a3b510405 Fix libdrm to actually include the new code instead of just building it. 2008-06-03 14:44:53 -07:00
Eric Anholt c4857429c7 Fix and hook up bufmgr code to the build. 2008-06-03 14:44:53 -07:00
Eric Anholt 6a9eb08a87 Import bufmgr code to libdrm. Not yet hooked up to the build. 2008-06-03 14:44:53 -07:00
Hasso Tepper 27c3785d3f Add DragonFly BSD support for device creation
DragonFly behaves just like FreeBSD in this regard.
2008-04-07 15:27:43 +03:00
Dave Airlie 180c9188f4 drm/ttm: add ioctl to get back memory managed area sized
taken from modesetting branch but could be useful outside it.
2008-03-06 05:31:50 +10:00
Eric Anholt eedf3fa2f0 Don't shortcut the info syscall for drmBOBusy on nonshareable objects.
This broke the results when you're trying to check if a buffer you dispatched
some time ago is done being rendered from.
2008-03-04 12:16:51 -08:00
Keith Packard d1187641d6 Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
Flags pending validation were stored in a misleadingly named field, 'mask'.
As 'mask' is already used to indicate pieces of a flags field which are
changing, it seems better to use a name reflecting the actual purpose of
this field. I chose 'proposed_flags' as they may not actually end up in
'flags', and in an case will be modified when they are moved over.

This affects the API, but not ABI of the user-mode interface.
2007-12-21 12:16:29 -08:00
Ben Skeggs 6abbbb2f4f Fill fence sequence after emit ioctl. 2007-11-05 04:44:40 +11:00
Thomas Hellstrom 94c22c3349 User buffer support. 2007-11-02 16:05:25 +01:00
Thomas Hellstrom c06808fb65 Return fence errors.
Time out properly in the presence of signals.
2007-11-02 15:52:00 +01:00
Thomas Hellstrom a4c87d3796 Minor libdrm fixes. 2007-10-26 10:31:14 +02:00
Thomas Hellstrom b9d9c30474 Tighten permissions on some buffer manager ioctls.
Set bo init minor to 0.
Add the version function to header.
2007-10-25 10:29:15 +02:00
Thomas Hellstrom 11f3e5e53f Buffer manager:
Implement a version check IOCTL for drivers that don't use
drmMMInit from user-space.
Remove the minor check from the kernel code. That's really up
to the driver.
Bump major.
2007-10-25 10:12:21 +02:00
Thomas Hellstrom d4ce4be0da Setstatus header. 2007-10-22 13:16:51 +02:00
Thomas Hellstrom 6420d33b02 Get the lock flags right in libdrm. 2007-10-21 12:57:43 +02:00
Thomas Hellstrom 3b19b50cb5 Remove the need for the hardware lock in the buffer manager.
Add interface entry cleaning a memory type without touching NO_EVICT buffers.
2007-10-21 12:20:56 +02:00
Thomas Hellstrom 48b5eaf303 Simple replacement for hardware lock in some cases.
Fix i915 since last commit.
2007-10-20 16:49:43 +02:00
Thomas Hellstrom 733ff56834 No fence_class argument on drmBOSetStatus since it's not
associated with a particular command submission.
2007-10-19 16:28:47 +02:00
Thomas Hellstrom 086c058a41 Remove the op ioctl, and replace it with a setuser ioctl.
Remove need for lock for now.
May create races when we clean memory areas or on takedown.
Needs to be fixed.
Really do a validate on buffer creation in order to avoid problems with
fixed memory buffers.
2007-10-17 10:59:48 +02:00
Thomas Hellstrom 0d1926d36e Revert "Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning."
This reverts cf2d569dac commit.
2007-10-17 10:59:48 +02:00
Dave Airlie 3f1aa15503 drm: drop drm bo list handling code 2007-10-16 22:28:00 +11:00
Dave Airlie efc4fd7c4d drm: rename drmBOUnReference to drmBOUnreference for consistency 2007-10-16 22:08:55 +11:00
Kristian Høgsberg a69c85fec8 Drop destroy ioctls for fences and buffer objects.
We now always create a drm_ref_object for user objects and this is then the only
things that holds a reference to the user object.  This way unreference on will
destroy the user object when the last drm_ref_object goes way.
2007-10-16 22:03:05 +11:00
Kristian Høgsberg dccefba71a Take bo type argument out of the ioctl interface.
The buffer object type is still tracked internally, but it is no longer
part of the user space visible ioctl interface.  If the bo create ioctl
specifies a non-NULL buffer address we assume drm_bo_type_user,
otherwise drm_bo_type_dc.  Kernel side allocations call
drm_buffer_object_create() directly and can still specify drm_bo_type_kernel.
Not 100% this makes sense either, but with this patch, the buffer type
is no longer exported and we can clean up the internals later on.
2007-10-16 22:03:05 +11:00
[utf-8] Kristian Høgsberg 440fc5113e Eliminate support for fake buffers. 2007-10-16 21:59:38 +11:00
Dave Airlie 03c47f1420 drm: use fence_class as name instead of class 2007-09-25 16:17:17 +10:00
Eric Anholt 3c995c2c4d Fix mapCount refcounting on unmap, even though the value is unused. 2007-09-21 15:58:02 -07:00
Eric Anholt cf2d569dac Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning.
This cleans up the create/validate interfaces for this very uncommon path, and
makes pinned object creation much easier to use for the X Server.
2007-07-26 10:15:11 -07:00
Dave Airlie 6ad1df2176 drm: remove drm_u64_t, replace with uint64_t everwhere
This might break something, stdint.h inclusion in drm.h maybe required
but I'm not sure yet what platforms have it what ones don't.
2007-07-18 09:42:06 +10:00