summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm/adreno_iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/msm/adreno_iommu.c')
-rw-r--r--drivers/gpu/msm/adreno_iommu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/msm/adreno_iommu.c b/drivers/gpu/msm/adreno_iommu.c
index aa00dcb84185..4bb7f6286664 100644
--- a/drivers/gpu/msm/adreno_iommu.c
+++ b/drivers/gpu/msm/adreno_iommu.c
@@ -856,6 +856,17 @@ int adreno_iommu_set_pt_ctx(struct adreno_ringbuffer *rb,
int result = 0;
int cpu_path = 0;
+ /* Just do the context switch incase of NOMMU */
+ if (kgsl_mmu_get_mmutype(device) == KGSL_MMU_TYPE_NONE) {
+ if ((!(flags & ADRENO_CONTEXT_SWITCH_FORCE_GPU)) &&
+ adreno_isidle(device))
+ _set_ctxt_cpu(rb, drawctxt);
+ else
+ result = _set_ctxt_gpu(rb, drawctxt);
+
+ return result;
+ }
+
if (rb->drawctxt_active)
cur_pt = rb->drawctxt_active->base.proc_priv->pagetable;