diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-25 04:06:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-25 04:06:04 -0400 |
commit | 0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8 (patch) | |
tree | 71c906207227dd8753a0191db9304035ec3471a4 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 78010cd9736ec571796f4404524ed575b81238b9 (diff) | |
parent | 5481e27f6fd06b7cb902072e81d6b083db8155eb (diff) |
Merge remote-tracking branch 'airlied/drm-next' into topic/drm-misc
Backmerge latest drm-next to have a baseline for the
s/fence/dma_fence/ patch from Chris.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 887483b8b818..dcaf691f56b5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -555,10 +555,13 @@ struct amdgpu_ttm_tt { | |||
555 | int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages) | 555 | int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages) |
556 | { | 556 | { |
557 | struct amdgpu_ttm_tt *gtt = (void *)ttm; | 557 | struct amdgpu_ttm_tt *gtt = (void *)ttm; |
558 | int write = !(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY); | 558 | unsigned int flags = 0; |
559 | unsigned pinned = 0; | 559 | unsigned pinned = 0; |
560 | int r; | 560 | int r; |
561 | 561 | ||
562 | if (!(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY)) | ||
563 | flags |= FOLL_WRITE; | ||
564 | |||
562 | if (gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) { | 565 | if (gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) { |
563 | /* check that we only use anonymous memory | 566 | /* check that we only use anonymous memory |
564 | to prevent problems with writeback */ | 567 | to prevent problems with writeback */ |
@@ -581,7 +584,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages) | |||
581 | list_add(&guptask.list, >t->guptasks); | 584 | list_add(&guptask.list, >t->guptasks); |
582 | spin_unlock(>t->guptasklock); | 585 | spin_unlock(>t->guptasklock); |
583 | 586 | ||
584 | r = get_user_pages(userptr, num_pages, write, 0, p, NULL); | 587 | r = get_user_pages(userptr, num_pages, flags, p, NULL); |
585 | 588 | ||
586 | spin_lock(>t->guptasklock); | 589 | spin_lock(>t->guptasklock); |
587 | list_del(&guptask.list); | 590 | list_del(&guptask.list); |