summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/msm/kgsl_iommu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/msm/kgsl_iommu.c b/drivers/gpu/msm/kgsl_iommu.c
index d997cdd2cc7e..6c667cb62896 100644
--- a/drivers/gpu/msm/kgsl_iommu.c
+++ b/drivers/gpu/msm/kgsl_iommu.c
@@ -809,6 +809,13 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
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))
@@ -845,8 +852,6 @@ static int kgsl_iommu_fault_handler(struct iommu_domain *domain,
}
}
- 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