Skip to content

Commit

Permalink
drm/msm: add internal MSM_BO_MAP_PRIV flag
Browse files Browse the repository at this point in the history
This flag sets IOMMU_PRIV, which is required for some a6xx GMU objects.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Jordan Crouse <jcrouse@codeauorora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
  • Loading branch information
Jonathan Marek authored and Rob Clark committed May 18, 2020
1 parent d3b8877 commit 0b462d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/msm/msm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ static int msm_gem_pin_iova(struct drm_gem_object *obj,
if (!(msm_obj->flags & MSM_BO_GPU_READONLY))
prot |= IOMMU_WRITE;

if (msm_obj->flags & MSM_BO_MAP_PRIV)
prot |= IOMMU_PRIV;

WARN_ON(!mutex_is_locked(&msm_obj->lock));

if (WARN_ON(msm_obj->madv != MSM_MADV_WILLNEED))
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/msm/msm_gem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/* Additional internal-use only BO flags: */
#define MSM_BO_STOLEN 0x10000000 /* try to use stolen/splash memory */
#define MSM_BO_MAP_PRIV 0x20000000 /* use IOMMU_PRIV when mapping */

struct msm_gem_address_space {
const char *name;
Expand Down

0 comments on commit 0b462d7

Please sign in to comment.