On Tue, Jun 13, 2017 at 02:49:48PM -0400, Rob Clark wrote: > Now that the msm_gem supports an arbitrary number of vma's, we no longer > need to assign an id (index) to each address space. So rip out the > associated code. > > Signed-off-by: Rob Clark <robdclark@xxxxxxxxx> Acked-by: Jordan Crouse <jcrouse@xxxxxxxxxxxxxx> > --- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 7 ------- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 7 ------- > drivers/gpu/drm/msm/msm_drv.c | 16 ---------------- > drivers/gpu/drm/msm/msm_drv.h | 11 ----------- > drivers/gpu/drm/msm/msm_gem.h | 1 - > drivers/gpu/drm/msm/msm_gpu.c | 2 -- > drivers/gpu/drm/msm/msm_gpu.h | 1 - > drivers/gpu/drm/msm/msm_kms.h | 1 - > 8 files changed, 46 deletions(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c > index d1f572f..c29eb1f 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c > +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c > @@ -548,13 +548,6 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev) > aspace = NULL; > } > > - kms->id = msm_register_address_space(dev, aspace); > - if (kms->id < 0) { > - ret = kms->id; > - dev_err(dev->dev, "failed to register mdp4 iommu: %d\n", ret); > - goto fail; > - } > - > ret = modeset_init(mdp4_kms); > if (ret) { > dev_err(dev->dev, "modeset_init failed: %d\n", ret); > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > index 6d9d332..438badd 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > @@ -746,13 +746,6 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev) > aspace = NULL;; > } > > - kms->id = msm_register_address_space(dev, aspace); > - if (kms->id < 0) { > - ret = kms->id; > - dev_err(&pdev->dev, "failed to register mdp5 iommu: %d\n", ret); > - goto fail; > - } > - > ret = modeset_init(mdp5_kms); > if (ret) { > dev_err(&pdev->dev, "modeset_init failed: %d\n", ret); > diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c > index e938379..ea43816 100644 > --- a/drivers/gpu/drm/msm/msm_drv.c > +++ b/drivers/gpu/drm/msm/msm_drv.c > @@ -51,22 +51,6 @@ static const struct drm_mode_config_funcs mode_config_funcs = { > .atomic_state_free = msm_atomic_state_free, > }; > > -#include "msm_gem.h" /* temporary */ > -int msm_register_address_space(struct drm_device *dev, > - struct msm_gem_address_space *aspace) > -{ > - struct msm_drm_private *priv = dev->dev_private; > - > - if (WARN_ON(priv->num_aspaces >= ARRAY_SIZE(priv->aspace))) > - return -EINVAL; > - > - priv->aspace[priv->num_aspaces] = aspace; > - > - aspace->id = priv->num_aspaces++; > - > - return aspace->id; > -} > - > #ifdef CONFIG_DRM_MSM_REGISTER_LOGGING > static bool reglog = false; > MODULE_PARM_DESC(reglog, "Enable register read/write logging"); > diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h > index f3f5d6a..b48aa88 100644 > --- a/drivers/gpu/drm/msm/msm_drv.h > +++ b/drivers/gpu/drm/msm/msm_drv.h > @@ -123,14 +123,6 @@ struct msm_drm_private { > uint32_t pending_crtcs; > wait_queue_head_t pending_crtcs_event; > > - /* Registered address spaces.. currently this is fixed per # of > - * iommu's. Ie. one for display block and one for gpu block. > - * Eventually, to do per-process gpu pagetables, we'll want one > - * of these per-process. > - */ > - unsigned int num_aspaces; > - struct msm_gem_address_space *aspace[NUM_DOMAINS]; > - > unsigned int num_planes; > struct drm_plane *planes[16]; > > @@ -183,9 +175,6 @@ struct drm_atomic_state *msm_atomic_state_alloc(struct drm_device *dev); > void msm_atomic_state_clear(struct drm_atomic_state *state); > void msm_atomic_state_free(struct drm_atomic_state *state); > > -int msm_register_address_space(struct drm_device *dev, > - struct msm_gem_address_space *aspace); > - > void msm_gem_unmap_vma(struct msm_gem_address_space *aspace, > struct msm_gem_vma *vma, struct sg_table *sgt); > int msm_gem_map_vma(struct msm_gem_address_space *aspace, > diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h > index ff468da..112eb63 100644 > --- a/drivers/gpu/drm/msm/msm_gem.h > +++ b/drivers/gpu/drm/msm/msm_gem.h > @@ -33,7 +33,6 @@ struct msm_gem_address_space { > struct drm_mm mm; > struct msm_mmu *mmu; > struct kref kref; > - int id; /* temporary */ > }; > > struct msm_gem_vma { > diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c > index de1d22c..bc6cd9e 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.c > +++ b/drivers/gpu/drm/msm/msm_gpu.c > @@ -660,8 +660,6 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, > } else { > dev_info(drm->dev, "%s: no IOMMU, fallback to VRAM carveout!\n", name); > } > - gpu->id = msm_register_address_space(drm, gpu->aspace); > - > > /* Create ringbuffer: */ > mutex_lock(&drm->struct_mutex); > diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h > index aa32410..4a959d8 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.h > +++ b/drivers/gpu/drm/msm/msm_gpu.h > @@ -99,7 +99,6 @@ struct msm_gpu { > int irq; > > struct msm_gem_address_space *aspace; > - int id; > > /* Power Control: */ > struct regulator *gpu_reg, *gpu_cx; > diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h > index 213b317..08760f2 100644 > --- a/drivers/gpu/drm/msm/msm_kms.h > +++ b/drivers/gpu/drm/msm/msm_kms.h > @@ -75,7 +75,6 @@ struct msm_kms { > int irq; > > /* mapper-id used to request GEM buffer mapped for scanout: */ > - int id; > struct msm_gem_address_space *aspace; > }; > > -- > 2.9.4 > -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel