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
Thomas Hellstrom
10150df02b
Simplify the AGP backend interface somewhat.
...
Fix buffer bound caching policy changing, Allow
on-the-fly changing of caching policy on bound buffers if the hardware
supports it.
Allow drivers to use driver-specific AGP memory types for TTM AGP pages.
Will make AGP drivers much easier to migrate.
2006-10-12 12:09:16 +02:00
Thomas Hellstrom
3070389367
Compatibility code for 2.6.15-2.6.18. It is ugly but a little comfort is that
...
it will go away in the mainstream kernel.
Some bugfixes, mainly in error paths.
2006-10-11 22:21:01 +02:00
Thomas Hellstrom
f2db76e2f2
Big update:
...
Adapt for new functions in the 2.6.19 kernel.
Remove the ability to have multiple regions in one TTM.
This simplifies a lot of code.
Remove the ability to access TTMs from user space.
We don't need it anymore without ttm regions.
Don't change caching policy for evicted buffers. Instead change it only
when the buffer is accessed by the CPU (on the first page fault).
This tremendously speeds up eviction rates.
Current code is safe for kernels <= 2.6.14.
Should also be OK with 2.6.19 and above.
2006-10-11 13:40:35 +02:00
Thomas Hellstrom
3802f9adbf
Fix buffer manager takedown error.
...
Prepare for the possibility to evict all buffers from vram / agp.
This will be used by the X server when, for example, switching vts.
2006-09-29 11:15:59 +02:00
Thomas Hellstrom
f2c03ecae6
Fix racy buffer object destruction.
2006-09-27 19:07:55 +02:00
Thomas Hellstrom
c97149b45b
Fix tt fixed size that slipped through in previous commit.
2006-09-27 09:31:39 +02:00
Thomas Hellstrom
235f6fc650
Adapt to architecture-specific hooks for gatt pages.
2006-09-27 09:27:31 +02:00
Thomas Hellstrom
273eb7833d
Add /proc filesystem buffer / fence object accounting.
...
Check for NULL pointer in the i915 flush handler.
Remove i915_sync_flush declaration.
2006-09-25 11:51:08 +02:00
Thomas Hellstrom
ca1b15d645
Alternative implementation of page table zeroing using zap page_range.
...
(Disabled for now)
Fix bo_wait_idle bug.
Remove stray debug message.
2006-09-18 20:43:31 +02:00
Thomas Hellstrom
f613022cee
Allow a "native type" to be associated with a fence sequence.
...
In the intel case, we can associate a flush with a sequence.
2006-09-15 16:47:09 +02:00
Thomas Hellstrom
49fbeb339c
Some bugfixes.
...
Change the fence object interface somewhat to allow some more flexibility.
Make list IOCTLS really restartable.
Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
2006-09-15 11:18:35 +02:00
Thomas Hellstrom
9adc9584a7
Fix some debug messages.
2006-09-12 17:39:44 +02:00
Thomas Hellstrom
861b26578c
Use lazy fence wait when possible even for RW fences. Saves some CPU.
...
Lindent.
2006-09-12 16:28:34 +02:00
Thomas Hellstrom
191e284709
More bugfixes.
...
Disable the i915 IRQ turnoff for now since it seems to be causing problems.
2006-09-12 12:01:00 +02:00
Thomas Hellstrom
99acb79366
Various bugfixes.
2006-09-08 17:24:38 +02:00
Thomas Hellstrom
6042153968
Fence all unfenced buffers function.
2006-09-05 18:00:25 +02:00
Thomas Hellstrom
550f51b4bf
Buffer object wait IOCTL operation.
...
Remove option to wait for fence / buffers and block signals.
2006-09-04 21:50:12 +02:00
Thomas Hellstrom
a6b8e3eaf4
Make memory caches global so that they can be used with
...
multiple heads.
2006-09-04 16:57:20 +02:00
Thomas Hellstrom
a96b61fdc4
Lindent drm_bo.c
2006-09-01 18:11:34 +02:00
Thomas Hellstrom
405b5d9ca8
Flag bit pattern bugfixes. Remove some error messages.
2006-09-01 18:11:05 +02:00
Thomas Hellstrom
ef8e618cf3
Export buffer info on map and validate ioctls.
...
Add an info ioctl operation.
2006-09-01 16:38:06 +02:00
Thomas Hellstrom
11f51a9a87
Bugfixes,
...
Memory allocation optimizations.
Buffer manager takedown.
2006-09-01 15:41:55 +02:00