drm/exynos: fold encoder setup into exynos_drm_load()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 6 Aug 2015 13:31:47 +0000 (10:31 -0300)
committerInki Dae <inki.dae@samsung.com>
Sun, 16 Aug 2015 01:23:37 +0000 (10:23 +0900)
As we are removing the exynos encoder move the encoder setup operation
directly inside the exynos_drm_load()

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c
drivers/gpu/drm/exynos/exynos_drm_encoder.c
drivers/gpu/drm/exynos/exynos_drm_encoder.h

index f1d69667b4e8036941566d675245b76d4209591a..105f10ef39562c1fda188bb4b9ceb290373f5576 100644 (file)
@@ -41,7 +41,9 @@
 static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 {
        struct exynos_drm_private *private;
-       int ret;
+       struct drm_encoder *encoder;
+       unsigned int clone_mask;
+       int cnt, ret;
 
        private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL);
        if (!private)
@@ -67,7 +69,13 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
        exynos_drm_mode_config_init(dev);
 
        /* setup possible_clones. */
-       exynos_drm_encoder_setup(dev);
+       cnt = 0;
+       clone_mask = 0;
+       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+               clone_mask |= (1 << (cnt++));
+
+       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+               encoder->possible_clones = clone_mask;
 
        platform_set_drvdata(dev->platformdev, dev);
 
index 4ed360b9b04171f768ce1f50ccc78e7945b8a36f..d45a5c5e382eadd653f06face10ca2578a104e7f 100644 (file)
@@ -78,19 +78,6 @@ static struct drm_encoder_funcs exynos_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };
 
-void exynos_drm_encoder_setup(struct drm_device *dev)
-{
-       struct drm_encoder *encoder;
-       unsigned int clone_mask = 0;
-       int cnt = 0;
-
-       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
-               clone_mask |= (1 << (cnt++));
-
-       list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
-               encoder->possible_clones = clone_mask;
-}
-
 int exynos_drm_encoder_create(struct drm_device *dev,
                              struct exynos_drm_encoder *exynos_encoder,
                              enum exynos_drm_output_type type)
index e998b82c801b6b452dc1def3b057f1e5547c8bfc..6610dee24d5495446c65a6d81e0ca79d44ec1d20 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "exynos_drm_drv.h"
 
-void exynos_drm_encoder_setup(struct drm_device *dev);
 int exynos_drm_encoder_create(struct drm_device *dev, struct exynos_drm_encoder
                              *encoder, enum exynos_drm_output_type type);