Skip to content
Snippets Groups Projects
Commit af21e9d3 authored by Alex Wong's avatar Alex Wong Committed by Android Partner Code Review
Browse files

msm: kgsl: Idle GPU core before programming SMMU from CPU


Always idle the GPU core before programming SMMU from CPU for
SMMU-v1. GPU core was already being idled before programming
the pagetable register, make sure that it's also idle before
programming the tlb invalidate registers. This is required to
prevent a deadlock from happening at the bus level.

Change-Id: Ie901b92028b289fc546ab6186eedd01411d0727e
Signed-off-by: default avatarShubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: default avatarTarun Karra <tkarra@codeaurora.org>
Signed-off-by: default avatarAlex Wong <waiw@codeaurora.org>
parent 5570a7d8
No related merge requests found
...@@ -1158,10 +1158,15 @@ static void kgsl_iommu_default_setstate(struct kgsl_mmu *mmu, ...@@ -1158,10 +1158,15 @@ static void kgsl_iommu_default_setstate(struct kgsl_mmu *mmu,
/* Mask off the lsb of the pt base address since lsb will not change */ /* Mask off the lsb of the pt base address since lsb will not change */
pt_base &= (KGSL_IOMMU_TTBR0_PA_MASK << KGSL_IOMMU_TTBR0_PA_SHIFT); pt_base &= (KGSL_IOMMU_TTBR0_PA_MASK << KGSL_IOMMU_TTBR0_PA_SHIFT);
/* For v1 SMMU GPU needs to be idle for tlb invalidate as well */
if (msm_soc_version_supports_iommu_v1())
kgsl_idle(mmu->device);
/* Acquire GPU-CPU sync Lock here */ /* Acquire GPU-CPU sync Lock here */
msm_iommu_lock(); msm_iommu_lock();
if (flags & KGSL_MMUFLAGS_PTUPDATE) { if (flags & KGSL_MMUFLAGS_PTUPDATE) {
if (!msm_soc_version_supports_iommu_v1())
kgsl_idle(mmu->device); kgsl_idle(mmu->device);
for (i = 0; i < iommu->unit_count; i++) { for (i = 0; i < iommu->unit_count; i++) {
/* get the lsb value which should not change when /* get the lsb value which should not change when
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment