drm/msm: remove address-space id
authorRob Clark <robdclark@gmail.com>
Tue, 13 Jun 2017 18:27:45 +0000 (14:27 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 16 Jun 2017 15:16:06 +0000 (11:16 -0400)
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@gmail.com>
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_gem.h
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_gpu.h
drivers/gpu/drm/msm/msm_kms.h

index 0c01f9fe0ef00de4a1d35b3a50194da2f633dc06..3d96687a1b39e523ac42b62b581d5d75b50c4076 100644 (file)
@@ -522,13 +522,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);
index 71d08a805806f9e3cb2fab10bc927a92c5e20b25..5d13fa5381ee37705a0c282bf023b4782fc19268 100644 (file)
@@ -678,13 +678,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);
index a9c3c6b813d35c8554e4297d76a1aca1a859490a..506de3862c182163b892b0e6438cfa9520ded39d 100644 (file)
@@ -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");
index 5570c5c91340fc15a9d1da990aa17d40474ce141..1d47ec467dedeb6b2f729da786cfb083409d27a0 100644 (file)
@@ -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,
index ff468da70fb6bbbbd2df162e08744bc4c857ee48..112eb63b59087df83eb34409bfdd0aa6798fdbb9 100644 (file)
@@ -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 {
index 36f0f1e5fc81bd3b175abc76265ef1af2563390b..2d5c9afbcdbec10bb2a1a5f5972ff56dd381207d 100644 (file)
@@ -659,8 +659,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);
index fd8049592aae4d545ba07aa9da0fa76bfa5a8c4f..df4e2771fb85b254c6d9ad368459ffabff19869c 100644 (file)
@@ -106,7 +106,6 @@ struct msm_gpu {
        int irq;
 
        struct msm_gem_address_space *aspace;
-       int id;
 
        /* Power Control: */
        struct regulator *gpu_reg, *gpu_cx;
index 0b98171415fc2261a0cc78f89f2152a17f4ad2b9..a8f2ba5e5f077a923224a82cca7c2e014d869f92 100644 (file)
@@ -74,7 +74,6 @@ struct msm_kms {
        int irq;
 
        /* mapper-id used to request GEM buffer mapped for scanout: */
-       int id;
        struct msm_gem_address_space *aspace;
 };