summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm/kgsl_iommu.c
diff options
context:
space:
mode:
authorSunil Khatri <sunilkh@codeaurora.org>2017-01-23 17:10:32 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-29 21:32:19 -0800
commit4cbaccd42fd5af353600ed7c4a352cc9d7beff55 (patch)
tree63d720b388fd3247e6393cd907524687d99cbbe0 /drivers/gpu/msm/kgsl_iommu.c
parent958e36a73f7fe46ee28a749cd9b56ddf5dbf56cd (diff)
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>
Diffstat (limited to 'drivers/gpu/msm/kgsl_iommu.c')
-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