Hi all:
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;
        int ret;

        if (ttm->state != tt_unpopulated)
                return 0;

2. Page number may not be the size it rounded up.
eg.
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
_______________________
|_____|_____|_____|_____|
         |<-------->|
              5k

Thanks
april

Reply via email to