summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm/adreno_iommu.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2015-12-03 08:38:11 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:16:31 -0700
commit7359adc0bfd3d94e4aa8f66b7f18aa276bffa598 (patch)
tree2c386398a04aeeeb068d53c81b508e4c4eb8b03d /drivers/gpu/msm/adreno_iommu.c
parentca2aa87713dd63dd67fd27e17c19c5955af16146 (diff)
msm: kgsl: Move setstate to the IOMMU initialization
The setstate memory is a IOMMU specific construct. Move it to the IOMMU code where it belongs. Change-Id: Ic0dedbada977f2861f7c1300a5365da5b09d70a9 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/adreno_iommu.c')
-rw-r--r--drivers/gpu/msm/adreno_iommu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/msm/adreno_iommu.c b/drivers/gpu/msm/adreno_iommu.c
index ba240190f98b..02935f6ff1ec 100644
--- a/drivers/gpu/msm/adreno_iommu.c
+++ b/drivers/gpu/msm/adreno_iommu.c
@@ -600,8 +600,7 @@ unsigned int adreno_iommu_set_pt_generate_cmds(
cmds += adreno_iommu_set_apriv(adreno_dev, cmds, 1);
cmds += _adreno_iommu_add_idle_indirect_cmds(adreno_dev, cmds,
- device->mmu.setstate_memory.gpuaddr +
- KGSL_IOMMU_SETSTATE_NOP_OFFSET);
+ iommu->setstate.gpuaddr + KGSL_IOMMU_SETSTATE_NOP_OFFSET);
if (iommu->version >= 2) {
if (adreno_is_a5xx(adreno_dev))
@@ -872,15 +871,19 @@ static int _set_pagetable_gpu(struct adreno_ringbuffer *rb,
int adreno_iommu_init(struct adreno_device *adreno_dev)
{
struct kgsl_device *device = &adreno_dev->dev;
+ struct kgsl_iommu *iommu = device->mmu.priv;
if (kgsl_mmu_get_mmutype() == KGSL_MMU_TYPE_NONE)
return 0;
+ if (iommu == NULL)
+ return -ENODEV;
+
/*
* A nop is required in an indirect buffer when switching
* pagetables in-stream
*/
- kgsl_sharedmem_writel(device, &device->mmu.setstate_memory,
+ kgsl_sharedmem_writel(device, &iommu->setstate,
KGSL_IOMMU_SETSTATE_NOP_OFFSET,
cp_packet(adreno_dev, CP_NOP, 1));