From 0bae60fcc680b61b601ed28098aa9b17c8840386 Mon Sep 17 00:00:00 2001 From: Samantha Tran Date: Wed, 13 Jan 2021 16:09:38 -0800 Subject: [PATCH] disp: msm: update iommu parameter to orig_nents iommu_map_sg has been updated and is expecting argument orig_nents instead of nents. This change updates the parameter in places where that function is being used. Change-Id: I3b15485e3f0186f1d2f1c81a8205c46b521893f3 Signed-off-by: Samantha Tran --- msm/msm_iommu.c | 2 +- msm/msm_smmu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/msm/msm_iommu.c b/msm/msm_iommu.c index 2a90aa4cae..ebb80d3070 100644 --- a/msm/msm_iommu.c +++ b/msm/msm_iommu.c @@ -64,7 +64,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, size_t ret; // pm_runtime_get_sync(mmu->dev); - ret = iommu_map_sg(iommu->domain, iova, sgt->sgl, sgt->nents, prot); + ret = iommu_map_sg(iommu->domain, iova, sgt->sgl, sgt->orig_nents, prot); // pm_runtime_put_sync(mmu->dev); WARN_ON(!ret); diff --git a/msm/msm_smmu.c b/msm/msm_smmu.c index 53f5f92656..ad9c939395 100644 --- a/msm/msm_smmu.c +++ b/msm/msm_smmu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. * Copyright (C) 2013 Red Hat * Author: Rob Clark * @@ -185,7 +185,7 @@ static int msm_smmu_map(struct msm_mmu *mmu, uint64_t iova, if (sgt && sgt->sgl) { ret = iommu_map_sg(client->domain, iova, sgt->sgl, - sgt->nents, prot); + sgt->orig_nents, prot); WARN_ON((int)ret < 0); DRM_DEBUG("%pad/0x%x/0x%x/\n", &sgt->sgl->dma_address, sgt->sgl->dma_length, prot);