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>
This commit is contained in:

committed by
Dave Airlie

parent
123f94f22e
commit
5870a4d97d
@@ -56,10 +56,6 @@ void ttm_put_pages(struct list_head *pages,
|
||||
enum ttm_caching_state cstate);
|
||||
/**
|
||||
* Initialize pool allocator.
|
||||
*
|
||||
* Pool allocator is internaly reference counted so it can be initialized
|
||||
* multiple times but ttm_page_alloc_fini has to be called same number of
|
||||
* times.
|
||||
*/
|
||||
int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
|
||||
/**
|
||||
|
Reference in New Issue
Block a user