aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_drv.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2018-11-07 15:35:50 -0700
committerRob Clark <robdclark@gmail.com>2018-12-11 13:05:32 -0500
commit9fe041f6fdfedd92e15dd81d96475ff04bdf879e (patch)
tree031088e4ea1257701903dbe9fd03a9e522086302 /drivers/gpu/drm/msm/msm_drv.c
parentdrm/msm: Clean up and enhance the output of the 'gem' debugfs node (diff)
downloadlinux-dev-9fe041f6fdfedd92e15dd81d96475ff04bdf879e.tar.xz
linux-dev-9fe041f6fdfedd92e15dd81d96475ff04bdf879e.zip
drm/msm: Add msm_gem_get_and_pin_iova()
Add a new function to get and pin the iova memory in one step (basically renaming the old msm_gem_get_iova function) and switch msm_gem_get_iova() to only allocate an iova but not map it in the IOMMU. This is only currently used by msm_ioctl_gem_info() since all other users of of the iova expect that the memory be immediately available. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.c')
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index cf960dc78982..3f8ed21dfffb 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -868,6 +868,10 @@ static int msm_ioctl_gem_info_iova(struct drm_device *dev,
if (!priv->gpu)
return -EINVAL;
+ /*
+ * Don't pin the memory here - just get an address so that userspace can
+ * be productive
+ */
return msm_gem_get_iova(obj, priv->gpu->aspace, iova);
}