Re: [PATCH 3/3] drm/amdgpu: replace get_user_pages with HMM address mirror helpers v7

2019-02-06 Thread Koenig, Christian
Am 06.02.19 um 16:53 schrieb Yang, Philip: > >> +/* If userptr are updated after amdgpu_cs_parser_bos(), restart > >> cs */ > >> amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { > >> struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); > >> -if

Re: [PATCH 3/3] drm/amdgpu: replace get_user_pages with HMM address mirror helpers v7

2019-02-06 Thread Yang, Philip
>> +/* If userptr are updated after amdgpu_cs_parser_bos(), restart >> cs */ >> amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { >> struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); >> -if (amdgpu_ttm_tt_userptr_needs_pages(bo->tbo.ttm)) { >> -r

Re: [PATCH 3/3] drm/amdgpu: replace get_user_pages with HMM address mirror helpers v7

2019-02-06 Thread Christian König
Am 05.02.19 um 23:00 schrieb Yang, Philip: Use HMM helper function hmm_vma_fault() to get physical pages backing userptr and start CPU page table update track of those pages. Then use hmm_vma_range_done() to check if those pages are updated before amdgpu_cs_submit for gfx or before user queues