From 0623a02a84c925f34eacd69b3630995de3732ecf Mon Sep 17 00:00:00 2001 From: Nilaan Gunabalachandran Date: Fri, 19 Feb 2021 15:30:48 -0500 Subject: [PATCH] disp: msm: sde: update smmu fault handler to print debug info This change updates the smmu fault handlers in the display driver to return -ENOSYS. This will print out useful debug information from smmu driver. Change-Id: I427982286abe4d592f270477c8ad2e2be74700c9 Signed-off-by: Nilaan Gunabalachandran --- msm/msm_smmu.c | 5 ++--- rotator/sde_rotator_smmu.c | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/msm/msm_smmu.c b/msm/msm_smmu.c index ad9c939395..4618e595a6 100644 --- a/msm/msm_smmu.c +++ b/msm/msm_smmu.c @@ -426,11 +426,10 @@ static int msm_smmu_fault_handler(struct iommu_domain *domain, int flags, void *token) { struct msm_smmu_client *client; - int rc = -EINVAL; if (!token) { DRM_ERROR("Error: token is NULL\n"); - return -EINVAL; + return -ENOSYS; } client = (struct msm_smmu_client *)token; @@ -444,7 +443,7 @@ static int msm_smmu_fault_handler(struct iommu_domain *domain, * return -ENOSYS to allow smmu driver to dump out useful * debug info. */ - return rc; + return -ENOSYS; } /** diff --git a/rotator/sde_rotator_smmu.c b/rotator/sde_rotator_smmu.c index cf37bd92cc..7e27413a99 100644 --- a/rotator/sde_rotator_smmu.c +++ b/rotator/sde_rotator_smmu.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -459,11 +459,10 @@ static int sde_smmu_fault_handler(struct iommu_domain *domain, int flags, void *token) { struct sde_smmu_client *sde_smmu; - int rc = -EINVAL; if (!token) { SDEROT_ERR("Error: token is NULL\n"); - return -EINVAL; + return -ENOSYS; } sde_smmu = (struct sde_smmu_client *)token; @@ -480,7 +479,7 @@ static int sde_smmu_fault_handler(struct iommu_domain *domain, * return -ENOSYS to allow smmu driver to dump out useful * debug info. */ - return rc; + return -ENOSYS; } static struct sde_smmu_domain sde_rot_unsec = {