drm/exynos: set plane possible_crtcs in exynos_plane_init
authorAndrzej Hajda <a.hajda@samsung.com>
Wed, 15 Mar 2017 14:41:05 +0000 (15:41 +0100)
committerInki Dae <inki.dae@samsung.com>
Thu, 1 Jun 2017 07:21:34 +0000 (16:21 +0900)
All Exynos planes are assigned to exactly one CRTC, it allows to simplify
initialization by moving setting of possible_crtcs to exynos_plane_init.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
drivers/gpu/drm/exynos/exynos7_drm_decon.c
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_plane.c
drivers/gpu/drm/exynos/exynos_drm_plane.h
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/exynos/exynos_mixer.c

index dd5cbd553f764df74dcba7bc6ad41e407d407941..8a3aa8ef940adae86e555e29c8c31873720f5370 100644 (file)
@@ -604,7 +604,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
                ctx->configs[win].type = decon_win_types[tmp];
 
                ret = exynos_plane_init(drm_dev, &ctx->planes[win], win,
-                                       1 << ctx->pipe, &ctx->configs[win]);
+                                       &ctx->configs[win]);
                if (ret)
                        return ret;
        }
index 206e779e6acbb94ae39824010a6011f05bde0991..4320b3bbc4c00274686dad4ddbb569c50c04be10 100644 (file)
@@ -642,7 +642,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
                ctx->configs[i].type = decon_win_types[i];
 
                ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
-                                       1 << ctx->pipe, &ctx->configs[i]);
+                                       &ctx->configs[i]);
                if (ret)
                        return ret;
        }
index fc4ff9bdca4a05f828d860f5d4e810b77f514f65..969145fd8083b997770b4ba6dce8ca8f3aae6606 100644 (file)
@@ -995,7 +995,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
                ctx->configs[i].zpos = i;
                ctx->configs[i].type = fimd_win_types[i];
                ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
-                                       1 << ctx->pipe, &ctx->configs[i]);
+                                       &ctx->configs[i]);
                if (ret)
                        return ret;
        }
index c2f17f30afab2db811eed293d05662e90727d5d3..611b6fd65433d0a29a77c8549dcca47c0e4979a9 100644 (file)
@@ -273,14 +273,13 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
 }
 
 int exynos_plane_init(struct drm_device *dev,
-                     struct exynos_drm_plane *exynos_plane,
-                     unsigned int index, unsigned long possible_crtcs,
+                     struct exynos_drm_plane *exynos_plane, unsigned int index,
                      const struct exynos_drm_plane_config *config)
 {
        int err;
 
        err = drm_universal_plane_init(dev, &exynos_plane->base,
-                                      possible_crtcs,
+                                      1 << dev->mode_config.num_crtc,
                                       &exynos_plane_funcs,
                                       config->pixel_formats,
                                       config->num_pixel_formats,
index 9aafad164cdfc66552ddcd49f61318c8acbeb2bc..497047b196145e0a9ff0d8deb134059af350f0c2 100644 (file)
@@ -11,5 +11,4 @@
 
 int exynos_plane_init(struct drm_device *dev,
                      struct exynos_drm_plane *exynos_plane, unsigned int index,
-                     unsigned long possible_crtcs,
                      const struct exynos_drm_plane_config *config);
index 68870a938442a6192868c5582fc5079dcad3452d..92ebeaf50cdba26efb4ace6e9a2b386012bcd224 100644 (file)
@@ -407,7 +407,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
                plane_config.type = vidi_win_types[i];
 
                ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
-                                       1 << ctx->pipe, &plane_config);
+                                       &plane_config);
                if (ret)
                        return ret;
        }
index 1474982e94a9a35d10526cc713af6a89897b0593..3722b5ffabd10f6fb8140125962c6615c385f2e0 100644 (file)
@@ -1154,7 +1154,7 @@ static int mixer_bind(struct device *dev, struct device *manager, void *data)
                        continue;
 
                ret = exynos_plane_init(drm_dev, &ctx->planes[i], i,
-                                       1 << ctx->pipe, &plane_configs[i]);
+                                       &plane_configs[i]);
                if (ret)
                        return ret;
        }