msm: kgsl: Update pagetable on context destruction for A20x

Ensure that pagetable is updated during context destruction. This
resolves stability issues during Camera launch/exit scenarios. Applies
only to A20x GPUs. This change is already done for Z180 device.

Change-Id: I978cbce49ed2b45be0209c2939b1b8423c68d5ec
CRs-fixed: 381875
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno_drawctxt.c b/drivers/gpu/msm/adreno_drawctxt.c
index bd22233..74493f4 100644
--- a/drivers/gpu/msm/adreno_drawctxt.c
+++ b/drivers/gpu/msm/adreno_drawctxt.c
@@ -226,6 +226,10 @@
 
 	adreno_idle(device);
 
+	if (adreno_is_a20x(adreno_dev) && adreno_dev->drawctxt_active)
+		kgsl_setstate(&device->mmu, adreno_dev->drawctxt_active->id,
+			KGSL_MMUFLAGS_PTUPDATE);
+
 	kgsl_sharedmem_free(&drawctxt->gpustate);
 	kgsl_sharedmem_free(&drawctxt->context_gmem_shadow.gmemshadow);