Skip to content

Commit 0b462d7

Browse files
fltorobclark
authored andcommitted
drm/msm: add internal MSM_BO_MAP_PRIV flag
This flag sets IOMMU_PRIV, which is required for some a6xx GMU objects. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent d3b8877 commit 0b462d7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/msm/msm_gem.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ static int msm_gem_pin_iova(struct drm_gem_object *obj,
428428
if (!(msm_obj->flags & MSM_BO_GPU_READONLY))
429429
prot |= IOMMU_WRITE;
430430

431+
if (msm_obj->flags & MSM_BO_MAP_PRIV)
432+
prot |= IOMMU_PRIV;
433+
431434
WARN_ON(!mutex_is_locked(&msm_obj->lock));
432435

433436
if (WARN_ON(msm_obj->madv != MSM_MADV_WILLNEED))

drivers/gpu/drm/msm/msm_gem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

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

1718
struct msm_gem_address_space {
1819
const char *name;

0 commit comments

Comments
 (0)