Thomas Hellstrom
f22f89e6b3
Add vma list memory usage to memory accounting.
...
Use byte unit for /proc printout of memory usage for small sizes to be
able to detect memory allocation bugs more easily.
2006-10-17 19:52:34 +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
5b2a60f550
Change Intel AGP memory type numbers.
2006-10-16 14:22:27 +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
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
Michel Dänzer
16be6ba63a
Fix type of second argument to spin_lock_irqsave().
...
(cherry picked from f6238cf624
commit)
2006-10-02 15:42: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
a31046b873
Add a buffer object manager for TTM maps.
2006-10-02 14:03:15 +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
418b81c65c
Add a comment to previos commit.
2006-10-02 13:37:54 +02:00
Thomas Hellstrom
c6be27401f
Trap and be verbose about a deadlock that occurs with AIGLX and drivers that
...
use drm_reclaim_buffers_locked().
2006-10-02 13:34:30 +02:00
Michel Dänzer
cef0f24325
Core vsync: Don't clobber target sequence number when scheduling signal.
...
It looks like this would have caused signals to always get sent on the next
vertical blank, regardless of the sequence number.
(cherry picked from cf6b2c5299
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
ed82172378
Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
...
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.
(cherry picked from 89e323e490
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
00531cecad
Change first valid DRM drawable ID to be 1 instead of 0.
...
This makes it easier for userspace to know when it needs to allocate an ID.
Also free drawable information memory when it's no longer needed.
(cherry picked from df7551ef73
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
ca3a1b5ec4
Drop tasklet locked driver callback when uninstalling IRQ.
...
(cherry picked from b9f3009160
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
67e88e5628
Hook up DRM_IOCTL_UPDATE_DRAW ioctl.
...
(cherry picked from 98a8950458
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
9810ec2737
Add support for tracking drawable information to core
...
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
(cherry picked from 29598e5253
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
a7b8c8d523
Add support for interrupt triggered driver callback with lock held to DRM core.
...
(cherry picked from d817cc1f30
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
596d7e9984
Add support for secondary vertical blank interrupt to i915 driver.
...
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.
(cherry picked from 0c7d7f4361
commit)
2006-09-29 12:55:08 +02:00
Michel Dänzer
2735f9e290
Add support for secondary vertical blank interrupt to DRM core.
...
(cherry picked from ab351505f3
commit)
2006-09-29 12:55:08 +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
c52fafa628
Don't enable fence / buffer objects on non-linux systems.
...
Bump driver minor and date.
2006-09-28 11:33:03 +02:00
Thomas Hellstrom
1c6f0ea43c
Activate error message that was never hit since it was masked
...
by drm_lock_transfer.
Ifdef out drm_lock_transfer. I see no use for it currently. Should be removed.
2006-09-27 19:11:27 +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
26528627a6
Remove the call to drm_lock_transfer, since it is not used anymore.
...
Fix up drm_lock_free to retain the last locking context information.
2006-09-26 14:40:11 +02:00
Thomas Hellstrom
711f077b74
Allow for a driver to overload the ttm backend object methods.
2006-09-26 14:36:53 +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
a02155a0d9
Fix proc formatting broken by last commit.
...
GPU lockup error reporting.
2006-09-22 09:25:36 +02:00
Thomas Hellstrom
fa511a3ff5
Allow for 64-bit map handles of ttms and buffer objects.
2006-09-20 16:31:15 +02:00
Thomas Hellstrom
aac918e7c7
Fence handler fix
2006-09-18 21:50:00 +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
c4fad4c961
More verbose error reporting in some cases.
...
Add a buffer object waitIdle user-space function.
Fix some names and minor glitches.
2006-09-18 16:02:33 +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
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
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