From 5e8779beb4fa6513d9440757d56b5baa8a4e7d2f Mon Sep 17 00:00:00 2001 From: Harsh Vardhan Dwivedi Date: Wed, 9 Oct 2013 17:08:29 -0600 Subject: [PATCH] msm: kgsl: Switch to default pagetables in case of NULL context Switch to default pagetables when context is NULL. This prevents instances of page faults when switching to default pagetable when GPU is busy. CRS-fixed: 550082 Change-Id: I74bab681b823bf50e58b50b6cb819fbf93163bf7 Signed-off-by: Harsh Vardhan Dwivedi --- drivers/gpu/msm/adreno.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index b8fe359c732..72d7410ae26 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -879,8 +879,10 @@ static int adreno_iommu_setstate(struct kgsl_device *device, num_iommu_units = kgsl_mmu_get_num_iommu_units(&device->mmu); context = kgsl_context_get(device, context_id); - if (context == NULL) + if (context == NULL) { + kgsl_mmu_device_setstate(&device->mmu, KGSL_CONTEXT_INVALID); return -EINVAL; + } adreno_ctx = ADRENO_CONTEXT(context);