Commit Graph

95 Commits (c9cd2c768bd37adadb87476f55f95e7b2336bc6b)

Author SHA1 Message Date
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
Dave Airlie 2dcbf6a599 make build against 2.6.20 hopefully 2007-01-01 11:30:38 +11:00
Thomas Hellstrom f6d5fecdd2 Last minute changes to support multi-page size buffer offset alignments.
This will come in very handy for tiled buffers on intel hardware.
Also add some padding to interface structures to allow future binary backwards
compatible changes.
2006-10-27 11:28:37 +02:00
Thomas Hellstrom e8ba62db72 Make sure delayed delete list is empty on lastclose.
Fix some refcounting errors.
Fix some error messages.
2006-10-19 16:58:00 +02:00
Thomas Hellstrom c34faf224b Remove max number of locked pages check and call, since
that is now handled by the memory accounting.
2006-10-17 20:03:26 +02:00
Thomas Hellstrom 89b9441798 Lindent. 2006-10-17 19:57:06 +02:00
Thomas Hellstrom d515936ea7 Add memory usage accounting to avoid DOS problems. 2006-10-17 19:40:57 +02:00
Thomas Hellstrom 5443dbe35f Implement mm_lock and mm_unlock functions.
The mm_lock function is used when leaving vt. It evicts _all_ buffers.
Buffers with the DRM_BO_NO_MOVE attribute set will be guaranteed to
get the same offset when / if they are rebound.
2006-10-17 16:00:25 +02:00
Thomas Hellstrom db5c671e86 Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
2006-10-17 11:28:48 +02:00
Thomas Hellstrom 5881ce1b91 Extend generality for more memory types.
Fix up init and destruction code.
2006-10-17 11:05:37 +02:00
Thomas Hellstrom 540c64c378 Bugfixes. 2006-10-12 16:10:47 +02:00