Thomas Hellstrom
c20370e096
Don't overwrite TTM page flags.
2007-11-07 18:07:56 +01:00
Dave Airlie
6ee5412da0
drm/ttm: apply linux kernel coding style to bo_lock/move/object/ttm.c
2007-11-05 19:09:18 +10:00
Thomas Hellstrom
94c22c3349
User buffer support.
2007-11-02 16:05:25 +01:00
Dave Airlie
61cbcb5dbe
drm/ttm: add support for cached un-snooped mappings.
...
This mapping allows cached objects to be mapped in/out of the TT space
with the appropriate flushing calls.
It should put back the old CACHED functionality for snooped mappings
2007-11-01 10:34:53 +11:00
Dave Airlie
50dec29c80
drm/i915: add driver cache flush entry point
...
Use clflush on Intel hardware to flush cached objects.
2007-10-30 17:52:13 +10:00
Thomas Hellstrom
da63f4ba0f
Add fence error member.
...
Modify the TTM backend bind arguments.
Export a number of functions needed for driver-specific super-ioctls.
Add a function to map buffer objects from the kernel, regardless of where they're
currently placed.
A number of error fixes.
2007-09-22 13:57:13 +02:00
Dave Airlie
be85ad0333
drm: detypedef ttm/bo/fence code
2007-07-16 13:37:02 +10:00
Thomas Hellstrom
2df2c70e20
Simplify the ttm backend interface and the agp ttm backend.
2007-04-18 16:33:28 +02:00
Dave Airlie
2463b03cb4
whitespace cleanup pending a kernel merge
2007-03-19 08:23:43 +11:00
Thomas Hellstrom
398913dc0e
Lindent.
2007-02-12 20:34:50 +01:00
Thomas Hellstrom
53aee3122a
I915 accelerated blit copy functional.
...
Fixed - to System memory copies are implemented by
flipping in a cache-coherent TTM,
blitting to it, and then flipping it out.
2007-02-09 16:36:53 +01:00
Thomas Hellstrom
99acdaee48
Fix copyright statements.
2007-02-09 00:07:29 +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
c1fbd8a566
Checkpoint commit.
...
Flag handling and memory type selection cleanup.
glxgears won't start.
2007-02-07 17:25:13 +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
dd733dea38
Fix missing ttm_open_vma call from previous commit.
...
Honour the ttm backend cant-use-aperture flag.
2007-02-01 13:19:05 +01:00
Dave Airlie
f6ba3b2603
ttm: make ttm alloc/free into alloc_pages/free_pages
...
Add a vmalloc flag to the page flags
2007-01-09 15:51:29 +11:00
Thomas Hellstrom
975136d6e5
Proper allocation of AGP pages for ttms.
2006-12-27 15:32:09 +01:00
Thomas Hellstrom
3b8e6ccd25
Security fix. Zero pages before they are handed to user space.
...
TTM pages were not cleared when allocated and handed to user space.
Sensitive information may leak.
2006-12-19 23:45:59 +01:00
Thomas Hellstrom
4b04c0cc45
Bugzilla Bug #8819
...
Build fixes for powerpc.
Reported by Katerina Barone-Adesi
2006-10-30 11:18:44 +01:00
Thomas Hellstrom
b4fba1679b
Add a one-page hole in the file offset space between buffers.
2006-10-26 21:14:23 +02:00
Thomas Hellstrom
9ed4656799
The CPU cache must be flushed _before_ we start modifying the kernel map ptes,
...
otherwise data will be missing, which becomes apparent when the kernel evicts
batch buffers which are likely to be written into in the evicted state,
and then rebound to the AGP aperture.
This means we cannot rely on the AGP module to flush the
cache for us.
2006-10-21 14:17:51 +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
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
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
c58574c605
Use a nopage-based approach to fault in pfns.
2006-10-10 10:37:26 +02:00
Thomas Hellstrom
cee659afb5
Get rid of all ugly PTE hacks.
2006-10-03 12:08:07 +02:00
Thomas Hellstrom
eacedf41a6
Make the user_token 44-bit for TTMs, and have them occupy a unique file space
...
starting at 0x00100000000. This will hopefully allow us to use
unmap_mapping_range(). Note that user-space will need
64-bit file offset support.
2006-10-02 15:06:35 +02:00
Thomas Hellstrom
d85b99435f
Allow for 44 bit user-tokens (or drm_file offsets)
2006-10-02 13:49:43 +02:00
Thomas Hellstrom
235f6fc650
Adapt to architecture-specific hooks for gatt pages.
2006-09-27 09:27:31 +02:00
Thomas Hellstrom
7223b4e264
Simplify ttm alloc and free.
2006-09-14 16:42:00 +02:00
Thomas Hellstrom
682c6ed029
Remove the use of reserved pages, and use locked pages instead.
...
Update compatibility for latest linux versions.
2006-09-14 12:17:38 +02:00
Thomas Hellstrom
9adc9584a7
Fix some debug messages.
2006-09-12 17:39:44 +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
405b5d9ca8
Flag bit pattern bugfixes. Remove some error messages.
2006-09-01 18:11:05 +02:00
Thomas Hellstrom
4edb95d6e0
Various bugfixes.
2006-09-01 11:23:21 +02:00
Thomas Hellstrom
033bda07e9
Buffer object reply fill in.
...
Lindent of drm_bo.c drm_ttm.c
2006-08-30 09:57:35 +02:00
Thomas Hellstrom
23f01c9fe8
Checkpoint commit. Buffer object flags and IOCTL argument list.
2006-08-29 18:40:08 +02:00
Thomas Hellstrom
0dedfc2cd0
Checkpoint ttm addition to buffer objects.
2006-08-29 14:52:02 +02:00
Thomas Hellstrom
279e8d26c6
64-bit IOCTL integer (Michel Dänzer & Brian Paul)
2006-08-29 10:45:34 +02:00
Thomas Hellstrom
0d67356de4
Proper TTM dereferencing
...
Initial buffer object creation.
2006-08-28 16:36:37 +02:00
Thomas Hellstrom
e181f594a4
Add a 64-bit drm unsigned type for 64-bit clean IOCTLS.
...
Conversion functions in drmP.h and xf86drm.c.
2006-08-28 09:49:09 +02:00
Thomas Hellstrom
886d3b3061
Bugfixes.
2006-08-27 22:01:33 +02:00
Thomas Hellstrom
b4b7b99760
Remove the ioctl multiplexing, and instead allow for generic
...
drm ioctls 0x80 - 0xFF.
2006-08-27 21:16:13 +02:00
Thomas Hellstrom
ac26b51503
Have TTM create and reference ioctl call return the actual TTM size.
2006-08-27 19:45:38 +02:00