Loading drivers/gpu/msm/kgsl_iommu.c +27 −11 Original line number Diff line number Diff line Loading @@ -2049,8 +2049,18 @@ static void kgsl_iommu_pagefault_resume(struct kgsl_mmu *mmu) { struct kgsl_iommu *iommu = _IOMMU_PRIV(mmu); struct kgsl_iommu_context *ctx = &iommu->ctx[KGSL_IOMMU_CONTEXT_USER]; unsigned int fsr_val; if (ctx->default_pt != NULL && ctx->fault) { while (1) { KGSL_IOMMU_SET_CTX_REG(ctx, FSR, 0xffffffff); /* * Make sure the above register write * is not reordered across the barrier * as we use writel_relaxed to write it. */ wmb(); /* * Write 1 to RESUME.TnR to terminate the * stalled transaction. Loading @@ -2062,6 +2072,12 @@ static void kgsl_iommu_pagefault_resume(struct kgsl_mmu *mmu) * as we use writel_relaxed to write them */ wmb(); udelay(5); fsr_val = KGSL_IOMMU_GET_CTX_REG(ctx, FSR); if (!(fsr_val & (1 << KGSL_IOMMU_FSR_SS_SHIFT))) break; } ctx->fault = 0; } } Loading drivers/gpu/msm/kgsl_iommu.h +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -63,6 +63,9 @@ #define KGSL_IOMMU_SCTLR_CFCFG_SHIFT 7 #define KGSL_IOMMU_SCTLR_CFIE_SHIFT 6 /* FSR fields */ #define KGSL_IOMMU_FSR_SS_SHIFT 30 enum kgsl_iommu_reg_map { KGSL_IOMMU_CTX_SCTLR = 0, KGSL_IOMMU_CTX_TTBR0, Loading Loading
drivers/gpu/msm/kgsl_iommu.c +27 −11 Original line number Diff line number Diff line Loading @@ -2049,8 +2049,18 @@ static void kgsl_iommu_pagefault_resume(struct kgsl_mmu *mmu) { struct kgsl_iommu *iommu = _IOMMU_PRIV(mmu); struct kgsl_iommu_context *ctx = &iommu->ctx[KGSL_IOMMU_CONTEXT_USER]; unsigned int fsr_val; if (ctx->default_pt != NULL && ctx->fault) { while (1) { KGSL_IOMMU_SET_CTX_REG(ctx, FSR, 0xffffffff); /* * Make sure the above register write * is not reordered across the barrier * as we use writel_relaxed to write it. */ wmb(); /* * Write 1 to RESUME.TnR to terminate the * stalled transaction. Loading @@ -2062,6 +2072,12 @@ static void kgsl_iommu_pagefault_resume(struct kgsl_mmu *mmu) * as we use writel_relaxed to write them */ wmb(); udelay(5); fsr_val = KGSL_IOMMU_GET_CTX_REG(ctx, FSR); if (!(fsr_val & (1 << KGSL_IOMMU_FSR_SS_SHIFT))) break; } ctx->fault = 0; } } Loading
drivers/gpu/msm/kgsl_iommu.h +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -63,6 +63,9 @@ #define KGSL_IOMMU_SCTLR_CFCFG_SHIFT 7 #define KGSL_IOMMU_SCTLR_CFIE_SHIFT 6 /* FSR fields */ #define KGSL_IOMMU_FSR_SS_SHIFT 30 enum kgsl_iommu_reg_map { KGSL_IOMMU_CTX_SCTLR = 0, KGSL_IOMMU_CTX_TTBR0, Loading