Commit graph

174 commits

Author SHA1 Message Date
Dave Airlie
280083d4a2 use krh's idr mods to remove lists from idr code 2007-06-10 15:40:21 +10:00
root
a4cddc6596 Revert "drm: add new drm_wait_on function to replace macro"
This reverts commit 6e860d08d0.

As I said not a good plan - this macro will have to stay for now,
trying to do the vbl code with the inline was a bit messy - may need specialised
drm wait on functions
2007-06-03 18:12:28 +10:00
Dave Airlie
f64674743a drm: convert drawable handling to use Linux idr
This cleans this code up a lot and uses the generic Linux idr which is
designed for this.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-05-27 07:26:52 +10: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
375f3f2884 Revert "drm/ttm: cleanup most of fence ioctl split out"
This reverts commit 3dfc1400e9.

this shouldn't have gone on master yet
2007-05-26 03:47:48 +10:00
Dave Airlie
ce58e53a01 whitespace fixups from kernel 2007-05-26 03:32:34 +10:00
Dave Airlie
3dfc1400e9 drm/ttm: cleanup most of fence ioctl split out 2007-05-26 03:32:34 +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
7b48f0022a drm: cleanup use of Linux list handling macros
This makes the drms use of the list handling macros a lot cleaner
and more along the lines of how they should be used.
2007-05-26 04:26:24 +10:00
Dave Airlie
6e860d08d0 drm: add new drm_wait_on function to replace macro 2007-04-28 15:07:43 +10:00
Dave Airlie
9f9c19065c remove DRM_GETSAREA and replace with drm_getsarea function 2007-04-28 15:07:43 +10:00
Dave Airlie
209870a882 rename badly named define 2007-03-20 10:13:58 +11:00
Dave Airlie
c991f8e049 cleanup ioctl expansion code 2007-03-19 08:46:39 +11:00
Dave Airlie
bbb6fc9307 make drm fops const from kernel 2007-03-19 08:36:01 +11:00
Thomas Hellstrom
582637641a Remove a scary error printed when we were leaking memory caches.
We don't use memory caches anymore...

Fix memory accounting initialization to only use low or DMA32 memory.
2007-01-25 14:27:29 +01:00
Thomas Hellstrom
38ed67196f Remove the memory caches for fence objects and memory manager nodes,
since the support for memory caches has gone from 2.6.20.
2006-12-15 12:37:24 +01:00
Thomas Hellstrom
3624e43282 Bug #8707, 2.6.19-rc compatibility for memory manager code. 2006-10-20 15:06:31 +02:00
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
5881ce1b91 Extend generality for more memory types.
Fix up init and destruction code.
2006-10-17 11:05:37 +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
a31046b873 Add a buffer object manager for TTM maps. 2006-10-02 14:03:15 +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
67e88e5628 Hook up DRM_IOCTL_UPDATE_DRAW ioctl.
(cherry picked from 98a8950458 commit)
2006-09-29 12:55:08 +02:00
Thomas Hellstrom
8c613a8363 Fix memory cache initialization. 2006-09-05 11:00:52 +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
11f51a9a87 Bugfixes,
Memory allocation optimizations.
Buffer manager takedown.
2006-09-01 15:41:55 +02:00
Thomas Hellstrom
d39055174b Remove the buffer object hint field and use it only
as an argument.
Validate stub.
2006-08-30 17:40:07 +02:00
Thomas Hellstrom
e47a4fda2e Memory manager init and takedown. 2006-08-30 13:04:08 +02:00
Thomas Hellstrom
4ddabd1562 Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into drm-ttm-0-2-branch
Conflicts:

	linux-core/drmP.h
2006-08-28 09:28:10 +02:00
Dave Airlie
60ddaaf2e0 add static function, and remove bad attributions 2006-08-28 11:28:38 +10:00
Dave Airlie
b4feb2c04e remove some DRM_ARRAY_SIZE from linux core code 2006-08-28 11:27:05 +10: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
166da9355d User / Kernel space fence objects (device-independent part). 2006-08-21 21:02:08 +02:00
Thomas Hellstrom
42c2cfcf7d Generic DRM support base-class support for user-space objects, like
fence objects and buffer objects:
Refcounting,
Inter-process sharing,
Synchronization
Destruction.
2006-08-21 20:30:19 +02:00
Thomas Hellstrom
0316f93d51 Remove hash tables on DRM exit. 2006-08-16 16:36:56 +02:00
Thomas Hellstrom
4daa024918 Avoid kernel oops in some error paths calling drm_lastclose(). 2006-08-14 17:11:14 +02:00
Dave Airlie
09c901e4bd remove incorrect exit marking on cleanup pci as this is called from other paths 2006-07-24 11:09:41 +10:00
Dave Airlie
5cfbd5dbab switch drm to use Linux mutexes instead of semaphore.
I hope the fallback compat code works if not shout at me.
2006-07-24 10:51:27 +10:00
Thomas Hellstrom
1a9e5bae10 Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.
2006-06-06 17:46:17 +00:00
Dave Airlie
ac5bd25208 make add context non master... 2006-04-03 08:06:51 +00:00
Dave Airlie
4791dc8856 major realigment of DRM CVS with kernel code, makes integration much easier 2006-02-18 02:53:36 +00:00
Dave Airlie
585f34c3e5 fix card unload 2006-02-18 02:38:07 +00:00
Dave Airlie
92150972e5 use drm_cards_limit instead of cards_limit 2006-01-02 05:54:10 +00:00
Dave Airlie
36356df3cb A bunch of create_proc_dir_entry() calls creating directories had crept in
since the last sweep; converted to proc_mkdir().
From: Al Viro (via kernel)
2005-11-11 08:59:57 +00:00
Ian Romanick
39615ec06e Converts the remaining drm_agp_foo functions to be a drm_agp_foo and
drm_agp_foo_ioctl pair. Modifies the MGA DRM to use the drm_agp_foo
    functions instead of the drm_foo_agp functions. The drm_foo_agp
    functions are no longer exported by drm.ko.
Ensures that dma->seg_count and dma->page_count are properly set in
    drm_addbufs_{agp,sg,fb}. drm_addbufs_pci was already correct.
Ensures that mga_do_agp_dma_bootstrap correctly sets agp_buffer_token.
At this point PCI DMA is still broken.
Xorg bug: #4797 Reviewed by: Dave Airlie, Eric Anholt Signed-off-by: Ian
    Romanick <idr@us.ibm.com>
2005-11-03 00:38:25 +00:00
Dave Airlie
0d346a07a8 convert ioctl flags to use flags instead of separate ints 2005-09-03 03:27:14 +00:00
Eric Anholt
c789ea1521 Rename the driver hooks in the DRM to something a little more
understandable: preinit -> load postinit -> (removed) presetup ->
    firstopen postsetup -> (removed) open_helper -> open prerelease ->
    preclose free_filp_priv -> postclose pretakedown -> lastclose
    postcleanup -> unload release -> reclaim_buffers_locked version ->
    (removed)
postinit and version were replaced with generic code in the Linux DRM
    (drivers now set their version numbers and description in the driver
    structure, like on BSD). postsetup wasn't used at all. Fixes the savage
    hooks for initializing and tearing down mappings at the right times.
    Testing involved at least starting X, running glxgears, killing
    glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)
2005-08-05 03:50:23 +00:00