Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm: Remove unused function arguments

The arguments related to IOMMU port name have been unused since
commit 944fc36c31ed ("drm/msm: use upstream iommu") and can be removed.

Signed-off-by: Drew Davenport <ddavenport@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Drew Davenport and committed by
Rob Clark
53bf7f7a fa8278b8

+14 -37
+2 -8
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
··· 30 30 #define CREATE_TRACE_POINTS 31 31 #include "dpu_trace.h" 32 32 33 - static const char * const iommu_ports[] = { 34 - "mdp_0", 35 - }; 36 - 37 33 /* 38 34 * To enable overall DRM driver logging 39 35 * # echo 0x2 > /sys/module/drm/parameters/debug ··· 699 703 700 704 mmu = dpu_kms->base.aspace->mmu; 701 705 702 - mmu->funcs->detach(mmu, (const char **)iommu_ports, 703 - ARRAY_SIZE(iommu_ports)); 706 + mmu->funcs->detach(mmu); 704 707 msm_gem_address_space_put(dpu_kms->base.aspace); 705 708 706 709 dpu_kms->base.aspace = NULL; ··· 725 730 return PTR_ERR(aspace); 726 731 } 727 732 728 - ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, 729 - ARRAY_SIZE(iommu_ports)); 733 + ret = aspace->mmu->funcs->attach(aspace->mmu); 730 734 if (ret) { 731 735 DPU_ERROR("failed to attach iommu %d\n", ret); 732 736 msm_gem_address_space_put(aspace);
+2 -8
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
··· 157 157 } 158 158 } 159 159 160 - static const char * const iommu_ports[] = { 161 - "mdp_port0_cb0", "mdp_port1_cb0", 162 - }; 163 - 164 160 static void mdp4_destroy(struct msm_kms *kms) 165 161 { 166 162 struct mdp4_kms *mdp4_kms = to_mdp4_kms(to_mdp_kms(kms)); ··· 168 172 drm_gem_object_put_unlocked(mdp4_kms->blank_cursor_bo); 169 173 170 174 if (aspace) { 171 - aspace->mmu->funcs->detach(aspace->mmu, 172 - iommu_ports, ARRAY_SIZE(iommu_ports)); 175 + aspace->mmu->funcs->detach(aspace->mmu); 173 176 msm_gem_address_space_put(aspace); 174 177 } 175 178 ··· 519 524 520 525 kms->aspace = aspace; 521 526 522 - ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, 523 - ARRAY_SIZE(iommu_ports)); 527 + ret = aspace->mmu->funcs->attach(aspace->mmu); 524 528 if (ret) 525 529 goto fail; 526 530 } else {
+2 -8
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
··· 19 19 #include "msm_mmu.h" 20 20 #include "mdp5_kms.h" 21 21 22 - static const char *iommu_ports[] = { 23 - "mdp_0", 24 - }; 25 - 26 22 static int mdp5_hw_init(struct msm_kms *kms) 27 23 { 28 24 struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms)); ··· 229 233 mdp5_pipe_destroy(mdp5_kms->hwpipes[i]); 230 234 231 235 if (aspace) { 232 - aspace->mmu->funcs->detach(aspace->mmu, 233 - iommu_ports, ARRAY_SIZE(iommu_ports)); 236 + aspace->mmu->funcs->detach(aspace->mmu); 234 237 msm_gem_address_space_put(aspace); 235 238 } 236 239 } ··· 732 737 733 738 kms->aspace = aspace; 734 739 735 - ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, 736 - ARRAY_SIZE(iommu_ports)); 740 + ret = aspace->mmu->funcs->attach(aspace->mmu); 737 741 if (ret) { 738 742 DRM_DEV_ERROR(&pdev->dev, "failed to attach iommu: %d\n", 739 743 ret);
+2 -3
drivers/gpu/drm/msm/msm_gpu.c
··· 838 838 return ERR_CAST(aspace); 839 839 } 840 840 841 - ret = aspace->mmu->funcs->attach(aspace->mmu, NULL, 0); 841 + ret = aspace->mmu->funcs->attach(aspace->mmu); 842 842 if (ret) { 843 843 msm_gem_address_space_put(aspace); 844 844 return ERR_PTR(ret); ··· 995 995 msm_gem_kernel_put(gpu->memptrs_bo, gpu->aspace, false); 996 996 997 997 if (!IS_ERR_OR_NULL(gpu->aspace)) { 998 - gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu, 999 - NULL, 0); 998 + gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu); 1000 999 msm_gem_address_space_put(gpu->aspace); 1001 1000 } 1002 1001 }
+2 -4
drivers/gpu/drm/msm/msm_gpummu.c
··· 21 21 #define GPUMMU_PAGE_SIZE SZ_4K 22 22 #define TABLE_SIZE (sizeof(uint32_t) * GPUMMU_VA_RANGE / GPUMMU_PAGE_SIZE) 23 23 24 - static int msm_gpummu_attach(struct msm_mmu *mmu, const char * const *names, 25 - int cnt) 24 + static int msm_gpummu_attach(struct msm_mmu *mmu) 26 25 { 27 26 return 0; 28 27 } 29 28 30 - static void msm_gpummu_detach(struct msm_mmu *mmu, const char * const *names, 31 - int cnt) 29 + static void msm_gpummu_detach(struct msm_mmu *mmu) 32 30 { 33 31 } 34 32
+2 -4
drivers/gpu/drm/msm/msm_iommu.c
··· 23 23 return 0; 24 24 } 25 25 26 - static int msm_iommu_attach(struct msm_mmu *mmu, const char * const *names, 27 - int cnt) 26 + static int msm_iommu_attach(struct msm_mmu *mmu) 28 27 { 29 28 struct msm_iommu *iommu = to_msm_iommu(mmu); 30 29 31 30 return iommu_attach_device(iommu->domain, mmu->dev); 32 31 } 33 32 34 - static void msm_iommu_detach(struct msm_mmu *mmu, const char * const *names, 35 - int cnt) 33 + static void msm_iommu_detach(struct msm_mmu *mmu) 36 34 { 37 35 struct msm_iommu *iommu = to_msm_iommu(mmu); 38 36
+2 -2
drivers/gpu/drm/msm/msm_mmu.h
··· 10 10 #include <linux/iommu.h> 11 11 12 12 struct msm_mmu_funcs { 13 - int (*attach)(struct msm_mmu *mmu, const char * const *names, int cnt); 14 - void (*detach)(struct msm_mmu *mmu, const char * const *names, int cnt); 13 + int (*attach)(struct msm_mmu *mmu); 14 + void (*detach)(struct msm_mmu *mmu); 15 15 int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, 16 16 unsigned len, int prot); 17 17 int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len);