diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-07-03 22:03:07 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-06 22:14:11 -0400 |
commit | 5870a4d97da136908ca477e3a21bc9f4c2705161 (patch) | |
tree | 3030a0ee387f3187a5a30f8f4cc745788c7d69e7 /include/drm | |
parent | 123f94f22e3d283dfe68742b269c245b0501ad82 (diff) |
drm/ttm: Allocate the page pool manager in the heap.
Repeated ttm_page_alloc_init/fini fails noisily because the pool
manager kobj isn't zeroed out between uses (we could do just that but
statically allocated kobjects are generally considered a bad thing).
Move it to kzalloc'ed memory.
Note that this patch drops the refcounting behavior of the pool
allocator init/fini functions: it would have led to a race condition
in its current form, and anyway it was never exploited.
This fixes a regression with reloading kms modules at runtime, since
page allocator was introduced.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/ttm/ttm_page_alloc.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 8bb4de567b2c..116821448c38 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -56,10 +56,6 @@ void ttm_put_pages(struct list_head *pages, | |||
56 | enum ttm_caching_state cstate); | 56 | enum ttm_caching_state cstate); |
57 | /** | 57 | /** |
58 | * Initialize pool allocator. | 58 | * Initialize pool allocator. |
59 | * | ||
60 | * Pool allocator is internaly reference counted so it can be initialized | ||
61 | * multiple times but ttm_page_alloc_fini has to be called same number of | ||
62 | * times. | ||
63 | */ | 59 | */ |
64 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); | 60 | int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages); |
65 | /** | 61 | /** |