Commit graph

155 commits

Author SHA1 Message Date
Thomas Hellstrom
e1b8eabeee Locking fixes and instrumentation. 2007-06-15 10:26:51 +02:00
Thomas Hellstrom
62082ab3e6 Make sure we read fence->signaled while spinlocked. 2007-06-13 15:38:59 +02:00
Thomas Hellstrom
5156f1c897 Fix fence object deref race. 2007-06-13 15:19:30 +02:00
Thomas Hellstrom
f984b1b8d1 Fix some obvious bugs. 2007-06-12 12:30:33 +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
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
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
b2a875ba89 ttm: complete drm buffer object ioctl split
retain the op operation for validate/fence operations
2007-05-08 18:25:15 +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
ee8954cb53 drm/ttm: cleanup mm_ioctl ioctls to be separate ioctls.
This is the first bunch of ioctls
2007-05-06 11:17:30 +10:00
Jesse Barnes
71d44cda52 drm/ttm: allow drm_buffer_object_create to be used in-kernel 2007-04-26 16:09:24 +10:00
Jesse Barnes
3c384a9ad5 Add new buffer object type for kernel allocations that don't initially have a user mapping.
(cherry picked from commit 2e21779992)
2007-04-26 16:04:09 +10:00
Thomas Hellstrom
5a96d59ce9 Don't always free up memory space when we unpin buffers. 2007-04-17 14:15:37 +02:00
Thomas Hellstrom
5432cc4abf Fix buffer object reference problems.
(Reported by Dave Airlie).
2007-04-17 10:53:19 +02:00
Thomas Hellstrom
e91ceff6c9 Add a code comment. 2007-04-17 08:46:45 +02:00
Thomas Hellstrom
e6e4946c82 Require the hardware lock for buffer creation
(since that implies a validate).
Fix drm_bo_wait_unfenced error messages and codes.
Fix some return codes from libdrm.
2007-04-16 16:23:05 +02:00
Thomas Hellstrom
7743af9449 Evicted no-move buffers can get lost if they end up in another
memory type than local.
2007-04-03 10:29:14 +02:00
Thomas Hellstrom
d85e243259 Fix an oops when trying to clean a not yet initialized memory type. 2007-04-03 10:29:14 +02:00
Dave Airlie
3f70518f0b drm/bo: avoid oops if the memory manager for this type isn't initialised 2007-03-29 09:25:04 +10:00
Dave Airlie
2463b03cb4 whitespace cleanup pending a kernel merge 2007-03-19 08:23:43 +11:00
Thomas Hellstrom
e0f53e59be Simple fence object sample driver for via, based on idling the GPU.
Buffer object driver for via.
Some changes to buffer object driver callbacks.
Improve fence flushing.
2007-02-16 20:22:24 +01:00
Thomas Hellstrom
7766378d97 Initial support for fence object classes.
(Fence objects belonging to different command submission mechanisms).
2007-02-15 12:11:38 +01:00
Thomas Hellstrom
9efdae317c More bugfixes.
Fixed memory, pinned buffers and unmappable memory now seems
fully functional.
2007-02-13 20:05:32 +01:00
Thomas Hellstrom
398913dc0e Lindent. 2007-02-12 20:34:50 +01:00
Thomas Hellstrom
b0c5339ed6 More bugfixes. 2007-02-12 20:32:03 +01:00
Thomas Hellstrom
f02f83ee08 Cleanup and fix support for pinned buffers. 2007-02-12 17:47:57 +01:00
Thomas Hellstrom
85ee2a8d04 Various bugfixes. 2007-02-10 12:06:36 +01:00
Thomas Hellstrom
57df398072 Reinstate some LRU handling. 2007-02-09 12:43:18 +01:00
Thomas Hellstrom
d32b21e016 Remove some code that should have gone in
commit 6a49d9a8ab
2007-02-09 00:11:53 +01:00
Thomas Hellstrom
99acdaee48 Fix copyright statements. 2007-02-09 00:07:29 +01:00
Thomas Hellstrom
6a49d9a8ab Fix evict_mutex locking range.
Implement unmappable buffers. (fault moves them to mappable when needed).
Various bugfixes.
2007-02-09 00:02:02 +01:00
Thomas Hellstrom
b2bcbf874b Add an accelerated buffer copy cleanup helper.
Export helper functions and make some important buffer-object functions non-static.
Add an i915 accelerated blit buffer move for pci memory buffers.
2007-02-08 21:28:33 +01:00
Thomas Hellstrom
a0ed808d05 Don't create a ttm just to copy from. 2007-02-08 19:06:39 +01:00
Thomas Hellstrom
e4b2da4406 A minor function interface change and some memcpy bugfixing.
Hooray!! it sort of works with a fixed AGP area as faked VRAM.
2007-02-08 16:21:38 +01:00
Thomas Hellstrom
1257907fa9 Simplify external ttm page allocation.
Implement a memcpy fallback for copying between buffers.
2007-02-08 13:29:08 +01:00
Thomas Hellstrom
09984ad77b Update memory compatibility tests.
Now only pinned buffers are broken.
2007-02-08 11:55:24 +01:00
Thomas Hellstrom
c1fbd8a566 Checkpoint commit.
Flag handling and memory type selection cleanup.
glxgears won't start.
2007-02-07 17:25:13 +01:00
Thomas Hellstrom
af24465b2e Fix a stray unlock_kernel() in drm_vm.c
Add a file for memory move helpers, drm_bo_move.c
Implement generic memory move.
Cached, no_move and unmapped memory temporarily broken.
2007-02-07 12:52:23 +01:00
Thomas Hellstrom
71b9e876f9 Simplify pci map vs no pci map choice. 2007-02-06 16:59:45 +01:00
Thomas Hellstrom
40ce53dfde Implement a drm_mem_reg_t substructure in the buffer object type. 2007-02-06 15:56:43 +01:00
Thomas Hellstrom
609e3b0375 Implement a policy for selecting memory types. 2007-02-06 14:20:33 +01:00
Thomas Hellstrom
63f2abd721 Make also later kernels work with buffer object vm
and clean up some function names.
2007-02-02 19:49:11 +01:00
Thomas Hellstrom
c269d560e4 Make vm handle buffer objects instead of ttm objects.
Remove ttm objects.
Make vm aware of PCI memory type buffer objects.
(Only works for pre 2.6.16 kernels for now).
2007-02-02 14:47:44 +01:00
Thomas Hellstrom
3024f23c65 memory manager: Make device driver aware of different memory types.
Memory types are either fixed (on-card or pre-bound AGP) or not fixed
(dynamically bound) to an aperture. They also carry information about:

1) Whether they can be mapped cached.
2) Whether they are at all mappable.
3) Whether they need an ioremap to be accessible from kernel space.

In this way VRAM memory and, for example, pre-bound AGP appear
identical to the memory manager.

This also makes support for unmappable VRAM simple to implement.
2007-01-31 14:50:57 +01:00
Thomas Hellstrom
36d50687dd Fix an error-path oops. 2007-01-31 11:03:53 +01:00
Thomas Hellstrom
d399fcf46f Add a buffer object transfer function.
Creates a placeholder for the old buffer contents
when it is transfered to / from static memory like VRAM.
2007-01-30 16:20:23 +01:00
Thomas Hellstrom
9bbdc0fb10 Clean up buffer object destruction somewhat. 2007-01-30 12:35:49 +01:00
Thomas Hellstrom
9a654e71bd Use pre-defined list_splice function. 2007-01-29 13:37:02 +01:00
Thomas Hellstrom
45418bb1b1 s/buf/bo/ for consistency. 2007-01-29 13:37:02 +01:00
Thomas Hellstrom
1e4c7d69f5 Some cleanup. A buffer object should only have one active memory type. 2007-01-29 13:37:02 +01:00