From 964a85a898bdd34e24f62d4a50251aeba8d9a7d5 Mon Sep 17 00:00:00 2001
From: Carter Cooper <ccooper@codeaurora.org>
Date: Wed, 8 Oct 2014 15:18:45 -0600
Subject: [PATCH] msm: kgsl: Fix IOMMU version naming for old driver

One minor discrepancy between new and old IOMMU drivers.

Change-Id: Ia3b74c2b1ecbcc70e2a2836212bbea9b49c9770d
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
---
 drivers/gpu/msm/kgsl_iommu.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index 2d5c0b879943..717164fe1fde 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -395,7 +395,7 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
 	fsynr1 = KGSL_IOMMU_GET_CTX_REG(iommu, iommu_unit,
 		iommu_dev->ctx_id, FSYNR1);
 
-	if (!msm_soc_version_supports_iommu_v1())
+	if (msm_soc_version_supports_iommu_v1())
 		write = ((fsynr1 & (KGSL_IOMMU_FSYNR1_AWRITE_MASK <<
 			KGSL_IOMMU_FSYNR1_AWRITE_SHIFT)) ? 1 : 0);
 	else
@@ -1632,7 +1632,6 @@ static void kgsl_iommu_lock_rb_in_tlb(struct kgsl_mmu *mmu)
 
 static int kgsl_iommu_start(struct kgsl_mmu *mmu)
 {
-	struct kgsl_device *device = mmu->device;
 	int status;
 	struct kgsl_iommu *iommu = mmu->priv;
 	int i, j;
@@ -1646,11 +1645,6 @@ static int kgsl_iommu_start(struct kgsl_mmu *mmu)
 		status = kgsl_iommu_setup_defaultpagetable(mmu);
 		if (status)
 			return -ENOMEM;
-
-		/* Initialize the sync lock between GPU and CPU */
-		if (msm_soc_version_supports_iommu_v1() &&
-			(device->id == KGSL_DEVICE_3D0))
-				kgsl_iommu_init_sync_lock(mmu);
 	}
 	status = kgsl_iommu_start_sync_lock(mmu);
 	if (status)
-- 
GitLab