summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_gem_vma.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2019-01-09 22:25:05 +0300
committerRob Clark <robdclark@gmail.com>2019-01-24 23:36:33 +0300
commitbbc2cd07c5100514f25ac6e09d2a94521b46b35b (patch)
treeebb7f2e3dc56a86060f08fc44e030f973a8f2e9a /drivers/gpu/drm/msm/msm_gem_vma.c
parent895ad6b0ccf71ec1f8d5bc4d9f15b525feb160a8 (diff)
downloadlinux-bbc2cd07c5100514f25ac6e09d2a94521b46b35b.tar.xz
drm/msm: honor GPU_READONLY flag
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem_vma.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gem_vma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c
index 557360788084..49c04829cf34 100644
--- a/drivers/gpu/drm/msm/msm_gem_vma.c
+++ b/drivers/gpu/drm/msm/msm_gem_vma.c
@@ -68,7 +68,8 @@ void msm_gem_unmap_vma(struct msm_gem_address_space *aspace,
int
msm_gem_map_vma(struct msm_gem_address_space *aspace,
- struct msm_gem_vma *vma, struct sg_table *sgt, int npages)
+ struct msm_gem_vma *vma, int prot,
+ struct sg_table *sgt, int npages)
{
unsigned size = npages << PAGE_SHIFT;
int ret = 0;
@@ -86,7 +87,7 @@ msm_gem_map_vma(struct msm_gem_address_space *aspace,
if (aspace->mmu)
ret = aspace->mmu->funcs->map(aspace->mmu, vma->iova, sgt,
- size, IOMMU_READ | IOMMU_WRITE);
+ size, prot);
if (ret)
vma->mapped = false;