Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a375c882 authored by Jordan Crouse's avatar Jordan Crouse Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: Remove the 'len' parameter from mmu map/unmap functions



Nobody uses this now that we are entirely scatter/gather enabled.
Remove it to avoid having to calculate the length unnecessarily.

CRs-Fixed: 2050484
Change-Id: Ic0dedbad020998e1c8fd5d526789f73beb0d5755
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 80e2ccd6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -305,8 +305,7 @@ put_iova(struct drm_gem_object *obj)
						obj->import_attach->dmabuf,
						DMA_BIDIRECTIONAL);
			else
				mmu->funcs->unmap(mmu, offset, msm_obj->sgt,
						obj->size);
				mmu->funcs->unmap(mmu, offset, msm_obj->sgt);
			msm_obj->domain[id].iova = 0;
		}
	}
+2 −2
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ static void msm_iommu_detach(struct msm_mmu *mmu, const char * const *names,
}

static int msm_iommu_map(struct msm_mmu *mmu, uint32_t iova,
		struct sg_table *sgt, unsigned len, int prot)
		struct sg_table *sgt, int prot)
{
	struct msm_iommu *iommu = to_msm_iommu(mmu);
	struct iommu_domain *domain = iommu->domain;
@@ -85,7 +85,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint32_t iova,
}

static int msm_iommu_unmap(struct msm_mmu *mmu, uint32_t iova,
		struct sg_table *sgt, unsigned len)
		struct sg_table *sgt)
{
	struct msm_iommu *iommu = to_msm_iommu(mmu);
	struct iommu_domain *domain = iommu->domain;
+2 −3
Original line number Diff line number Diff line
@@ -35,9 +35,8 @@ struct msm_mmu_funcs {
	int (*attach)(struct msm_mmu *mmu, const char * const *names, int cnt);
	void (*detach)(struct msm_mmu *mmu, const char * const *names, int cnt);
	int (*map)(struct msm_mmu *mmu, uint32_t iova, struct sg_table *sgt,
			unsigned int len, int prot);
	int (*unmap)(struct msm_mmu *mmu, uint32_t iova, struct sg_table *sgt,
			unsigned int len);
			int prot);
	int (*unmap)(struct msm_mmu *mmu, uint32_t iova, struct sg_table *sgt);
	int (*map_sg)(struct msm_mmu *mmu, struct sg_table *sgt,
			enum dma_data_direction dir);
	void (*unmap_sg)(struct msm_mmu *mmu, struct sg_table *sgt,
+2 −2
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static void msm_smmu_detach(struct msm_mmu *mmu, const char * const *names,
}

static int msm_smmu_map(struct msm_mmu *mmu, uint32_t iova,
		struct sg_table *sgt, unsigned int len, int prot)
		struct sg_table *sgt, int prot)
{
	struct msm_smmu *smmu = to_msm_smmu(mmu);
	struct msm_smmu_client *client = msm_smmu_to_client(smmu);
@@ -177,7 +177,7 @@ static void msm_smmu_unmap_sg(struct msm_mmu *mmu, struct sg_table *sgt,
}

static int msm_smmu_unmap(struct msm_mmu *mmu, uint32_t iova,
		struct sg_table *sgt, unsigned int len)
		struct sg_table *sgt)
{
	struct msm_smmu *smmu = to_msm_smmu(mmu);
	struct msm_smmu_client *client = msm_smmu_to_client(smmu);