msm: kgsl: Relocate the pagefault tracepoint

During a pagefault we print trace with the fault
information which gets delayed by unacceptable
time. It happens due to the the code that searches the
faulty address in the recently freed addresses for a matching
entry.

Moving it to new position wont have any impact on debugging
instead trace is dumped without any delay.

Change-Id: I11487798b60742096e06605cf3046b4cfc8cc057
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index eaf0995..b32cb63 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -813,6 +813,13 @@
 
 	ptname = MMU_FEATURE(mmu, KGSL_MMU_GLOBAL_PAGETABLE) ?
 		KGSL_MMU_GLOBAL_PT : tid;
+	/*
+	 * Trace needs to be logged before searching the faulting
+	 * address in free list as it takes quite long time in
+	 * search and delays the trace unnecessarily.
+	 */
+	trace_kgsl_mmu_pagefault(ctx->kgsldev, addr,
+			ptname, write ? "write" : "read");
 
 	if (test_bit(KGSL_FT_PAGEFAULT_LOG_ONE_PER_PAGE,
 		&adreno_dev->ft_pf_policy))
@@ -849,8 +856,6 @@
 		}
 	}
 
-	trace_kgsl_mmu_pagefault(ctx->kgsldev, addr,
-			ptname, write ? "write" : "read");
 
 	/*
 	 * We do not want the h/w to resume fetching data from an iommu