Commit 53bf7f7a authored by Drew Davenport's avatar Drew Davenport Committed by Rob Clark

drm/msm: Remove unused function arguments

The arguments related to IOMMU port name have been unused since
commit 944fc36c ("drm/msm: use upstream iommu") and can be removed.
Signed-off-by: default avatarDrew Davenport <ddavenport@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent fa8278b8
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include "dpu_trace.h" #include "dpu_trace.h"
static const char * const iommu_ports[] = {
"mdp_0",
};
/* /*
* To enable overall DRM driver logging * To enable overall DRM driver logging
* # echo 0x2 > /sys/module/drm/parameters/debug * # echo 0x2 > /sys/module/drm/parameters/debug
...@@ -703,8 +699,7 @@ static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms) ...@@ -703,8 +699,7 @@ static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms)
mmu = dpu_kms->base.aspace->mmu; mmu = dpu_kms->base.aspace->mmu;
mmu->funcs->detach(mmu, (const char **)iommu_ports, mmu->funcs->detach(mmu);
ARRAY_SIZE(iommu_ports));
msm_gem_address_space_put(dpu_kms->base.aspace); msm_gem_address_space_put(dpu_kms->base.aspace);
dpu_kms->base.aspace = NULL; dpu_kms->base.aspace = NULL;
...@@ -730,8 +725,7 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms) ...@@ -730,8 +725,7 @@ static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms)
return PTR_ERR(aspace); return PTR_ERR(aspace);
} }
ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, ret = aspace->mmu->funcs->attach(aspace->mmu);
ARRAY_SIZE(iommu_ports));
if (ret) { if (ret) {
DPU_ERROR("failed to attach iommu %d\n", ret); DPU_ERROR("failed to attach iommu %d\n", ret);
msm_gem_address_space_put(aspace); msm_gem_address_space_put(aspace);
......
...@@ -157,10 +157,6 @@ static long mdp4_round_pixclk(struct msm_kms *kms, unsigned long rate, ...@@ -157,10 +157,6 @@ static long mdp4_round_pixclk(struct msm_kms *kms, unsigned long rate,
} }
} }
static const char * const iommu_ports[] = {
"mdp_port0_cb0", "mdp_port1_cb0",
};
static void mdp4_destroy(struct msm_kms *kms) static void mdp4_destroy(struct msm_kms *kms)
{ {
struct mdp4_kms *mdp4_kms = to_mdp4_kms(to_mdp_kms(kms)); struct mdp4_kms *mdp4_kms = to_mdp4_kms(to_mdp_kms(kms));
...@@ -172,8 +168,7 @@ static void mdp4_destroy(struct msm_kms *kms) ...@@ -172,8 +168,7 @@ static void mdp4_destroy(struct msm_kms *kms)
drm_gem_object_put_unlocked(mdp4_kms->blank_cursor_bo); drm_gem_object_put_unlocked(mdp4_kms->blank_cursor_bo);
if (aspace) { if (aspace) {
aspace->mmu->funcs->detach(aspace->mmu, aspace->mmu->funcs->detach(aspace->mmu);
iommu_ports, ARRAY_SIZE(iommu_ports));
msm_gem_address_space_put(aspace); msm_gem_address_space_put(aspace);
} }
...@@ -524,8 +519,7 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev) ...@@ -524,8 +519,7 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev)
kms->aspace = aspace; kms->aspace = aspace;
ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, ret = aspace->mmu->funcs->attach(aspace->mmu);
ARRAY_SIZE(iommu_ports));
if (ret) if (ret)
goto fail; goto fail;
} else { } else {
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
#include "msm_mmu.h" #include "msm_mmu.h"
#include "mdp5_kms.h" #include "mdp5_kms.h"
static const char *iommu_ports[] = {
"mdp_0",
};
static int mdp5_hw_init(struct msm_kms *kms) static int mdp5_hw_init(struct msm_kms *kms)
{ {
struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms)); struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms));
...@@ -233,8 +229,7 @@ static void mdp5_kms_destroy(struct msm_kms *kms) ...@@ -233,8 +229,7 @@ static void mdp5_kms_destroy(struct msm_kms *kms)
mdp5_pipe_destroy(mdp5_kms->hwpipes[i]); mdp5_pipe_destroy(mdp5_kms->hwpipes[i]);
if (aspace) { if (aspace) {
aspace->mmu->funcs->detach(aspace->mmu, aspace->mmu->funcs->detach(aspace->mmu);
iommu_ports, ARRAY_SIZE(iommu_ports));
msm_gem_address_space_put(aspace); msm_gem_address_space_put(aspace);
} }
} }
...@@ -737,8 +732,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) ...@@ -737,8 +732,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
kms->aspace = aspace; kms->aspace = aspace;
ret = aspace->mmu->funcs->attach(aspace->mmu, iommu_ports, ret = aspace->mmu->funcs->attach(aspace->mmu);
ARRAY_SIZE(iommu_ports));
if (ret) { if (ret) {
DRM_DEV_ERROR(&pdev->dev, "failed to attach iommu: %d\n", DRM_DEV_ERROR(&pdev->dev, "failed to attach iommu: %d\n",
ret); ret);
......
...@@ -838,7 +838,7 @@ msm_gpu_create_address_space(struct msm_gpu *gpu, struct platform_device *pdev, ...@@ -838,7 +838,7 @@ msm_gpu_create_address_space(struct msm_gpu *gpu, struct platform_device *pdev,
return ERR_CAST(aspace); return ERR_CAST(aspace);
} }
ret = aspace->mmu->funcs->attach(aspace->mmu, NULL, 0); ret = aspace->mmu->funcs->attach(aspace->mmu);
if (ret) { if (ret) {
msm_gem_address_space_put(aspace); msm_gem_address_space_put(aspace);
return ERR_PTR(ret); return ERR_PTR(ret);
...@@ -995,8 +995,7 @@ void msm_gpu_cleanup(struct msm_gpu *gpu) ...@@ -995,8 +995,7 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)
msm_gem_kernel_put(gpu->memptrs_bo, gpu->aspace, false); msm_gem_kernel_put(gpu->memptrs_bo, gpu->aspace, false);
if (!IS_ERR_OR_NULL(gpu->aspace)) { if (!IS_ERR_OR_NULL(gpu->aspace)) {
gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu, gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu);
NULL, 0);
msm_gem_address_space_put(gpu->aspace); msm_gem_address_space_put(gpu->aspace);
} }
} }
...@@ -21,14 +21,12 @@ struct msm_gpummu { ...@@ -21,14 +21,12 @@ struct msm_gpummu {
#define GPUMMU_PAGE_SIZE SZ_4K #define GPUMMU_PAGE_SIZE SZ_4K
#define TABLE_SIZE (sizeof(uint32_t) * GPUMMU_VA_RANGE / GPUMMU_PAGE_SIZE) #define TABLE_SIZE (sizeof(uint32_t) * GPUMMU_VA_RANGE / GPUMMU_PAGE_SIZE)
static int msm_gpummu_attach(struct msm_mmu *mmu, const char * const *names, static int msm_gpummu_attach(struct msm_mmu *mmu)
int cnt)
{ {
return 0; return 0;
} }
static void msm_gpummu_detach(struct msm_mmu *mmu, const char * const *names, static void msm_gpummu_detach(struct msm_mmu *mmu)
int cnt)
{ {
} }
......
...@@ -23,16 +23,14 @@ static int msm_fault_handler(struct iommu_domain *domain, struct device *dev, ...@@ -23,16 +23,14 @@ static int msm_fault_handler(struct iommu_domain *domain, struct device *dev,
return 0; return 0;
} }
static int msm_iommu_attach(struct msm_mmu *mmu, const char * const *names, static int msm_iommu_attach(struct msm_mmu *mmu)
int cnt)
{ {
struct msm_iommu *iommu = to_msm_iommu(mmu); struct msm_iommu *iommu = to_msm_iommu(mmu);
return iommu_attach_device(iommu->domain, mmu->dev); return iommu_attach_device(iommu->domain, mmu->dev);
} }
static void msm_iommu_detach(struct msm_mmu *mmu, const char * const *names, static void msm_iommu_detach(struct msm_mmu *mmu)
int cnt)
{ {
struct msm_iommu *iommu = to_msm_iommu(mmu); struct msm_iommu *iommu = to_msm_iommu(mmu);
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <linux/iommu.h> #include <linux/iommu.h>
struct msm_mmu_funcs { struct msm_mmu_funcs {
int (*attach)(struct msm_mmu *mmu, const char * const *names, int cnt); int (*attach)(struct msm_mmu *mmu);
void (*detach)(struct msm_mmu *mmu, const char * const *names, int cnt); void (*detach)(struct msm_mmu *mmu);
int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, int (*map)(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt,
unsigned len, int prot); unsigned len, int prot);
int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len); int (*unmap)(struct msm_mmu *mmu, uint64_t iova, unsigned len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment