From: april <aapril03@gm...> - 2011-02-24 06:35:24
TTM provide "ttm_bo_type_user" which create bo from user space memory.
I try to use this functions, but find some problems:
1. Can not get "pages" when driver try to bind user pages to GPU apterure.
ttm->state set to "tt_unbound" when add ttm structs, while
ttm_tt_populate prevent driver populate function called if ttm->state
is not "tt_unpopulated"
int ttm_tt_populate(struct ttm_tt *ttm)
struct page *page;
unsigned long i;
struct ttm_backend *be;
if (ttm->state != tt_unpopulated)
2. Page number may not be the size it rounded up.
supports allocate a user space BO size=5K, which round up to 2
pages,but it should be 3, if the user space memory like this
page1 page2 page3