Commit Graph

155 Commits (18020e5e9647e218caf8f1566cdc053aac126f23)

Author SHA1 Message Date
Dave Airlie d2d7f3069d drm: userspace rip out TTM API 2008-07-31 13:31:30 +10: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
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 c4857429c7 Fix and hook up bufmgr code to the build. 2008-06-03 14:44:53 -07:00
Thomas Hellstrom 7f269bec7e Merge branch 'master' into modesetting-101
Conflicts:

	linux-core/Makefile.kernel
	linux-core/drm_compat.c
	linux-core/drm_fops.c
	linux-core/drm_lock.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
2008-04-28 12:10:44 +02: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 607964ed9e drm: add master set/drop protocol
this may not survive long - just need something for testing
2008-03-17 16:38:20 +10: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
Dave Airlie 43891ff2d0 Merge remote branch 'origin/master' into modesetting-101
Conflicts:

	linux-core/drm_compat.c
2008-03-05 10:37:02 +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
Dave Airlie cdad850ebc add ioctl to get back memory managed area sized - used for kernel inited areas 2008-02-22 13:49:51 +10:00
Dave Airlie db85ed25af Revert "After the previous revert fix libdrm to start at minor 1"
This reverts commit f51dc37d75.

Conflicts:

	tests/modedemo/demo.c
2008-02-13 12:20:02 +10:00
Alan Hourihane f51dc37d75 After the previous revert fix libdrm to start at minor 1
and fixup the demos
2008-02-07 22:21:50 +00:00
Dave Airlie e7a41d7f5b Merge remote branch 'origin/master' into modesetting-101
Conflicts:

	linux-core/drm_bo.c
	linux-core/drm_drv.c
	shared-core/drm.h
	shared-core/i915_dma.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/radeon_irq.c
2008-01-25 15:27:53 +10:00
Dave Airlie 87a32efcdd add control node open 2008-01-09 18:11:04 +11:00
Dave Airlie 73bf5e8670 add internals for opening a control node 2008-01-09 16:44:31 +11: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 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
Dave Airlie 2c9e05cf4c Merge branch 'master' into cleanup
Conflicts:

	libdrm/xf86drm.c
	linux-core/drm_bo.c
	linux-core/drm_fence.c
2007-07-11 11:23:41 +10:00
Thomas Hellstrom 2407ce57de Fix drmMMUnlock / drmMMLock return values. 2007-06-13 15:59:28 +02:00
Thomas Hellstrom b6b5df24b9 Try to make buffer object / fence object ioctl args 64-bit safe.
Introduce tile members for future tiled buffer support.
Allow user-space to explicitly define a fence-class.
Remove the implicit fence-class mechanism.
64-bit wide buffer object flag member.
2007-06-12 12:21:38 +02:00
Brian ccd7b6e8dd Clean-ups and reformatting.
Use 4-space indentation consistently.
Replace occurances of:
	if (cond) code;
with:
	if (cond)
		code;
to facilitate putting breakpoints on code.
2007-05-29 14:54:00 -06:00
Dave Airlie 58b2ed7832 Revert "drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls."
This reverts commit 3fdef0dc20.

ditto not on master yet
2007-05-26 03:48:08 +10:00
Dave Airlie 375f3f2884 Revert "drm/ttm: cleanup most of fence ioctl split out"
This reverts commit 3dfc1400e9.

this shouldn't have gone on master yet
2007-05-26 03:47:48 +10:00
Dave Airlie 3dfc1400e9 drm/ttm: cleanup most of fence ioctl split out 2007-05-26 03:32:34 +10:00
Dave Airlie 3fdef0dc20 drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls.
This is the first bunch of ioctls
2007-05-26 03:32:34 +10:00
Dave Airlie 25c51f539f drm/ttm: ioctl cleanup for buffer object - user side only
This just cleans up the xf86drm.c to what I want and drm.h,
I need to fix up the kernel internals to suit these changes now.

I've moved to using struct instead of typedefs for the bo and it doesn't look
that bad so I'll do the same thing for mm and fence..
2007-05-08 17:53:58 +10:00
Dave Airlie 963ed9910a libdrm: fix typo on ttm fence interface 2007-05-08 17:51:21 +10:00
Dave Airlie 6a62941eca drm/ttm: cleanup most of fence ioctl split out 2007-05-06 11:35:11 +10:00