Commit 6cf27275 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Inki Dae

drm/exynos: fold encoder setup into exynos_drm_load()

As we are removing the exynos encoder move the encoder setup operation
directly inside the exynos_drm_load()
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent a2986e80
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
static int exynos_drm_load(struct drm_device *dev, unsigned long flags) static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
{ {
struct exynos_drm_private *private; 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); private = kzalloc(sizeof(struct exynos_drm_private), GFP_KERNEL);
if (!private) if (!private)
...@@ -67,7 +69,13 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) ...@@ -67,7 +69,13 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
exynos_drm_mode_config_init(dev); exynos_drm_mode_config_init(dev);
/* setup possible_clones. */ /* 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); platform_set_drvdata(dev->platformdev, dev);
......
...@@ -78,19 +78,6 @@ static struct drm_encoder_funcs exynos_encoder_funcs = { ...@@ -78,19 +78,6 @@ static struct drm_encoder_funcs exynos_encoder_funcs = {
.destroy = drm_encoder_cleanup, .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, int exynos_drm_encoder_create(struct drm_device *dev,
struct exynos_drm_encoder *exynos_encoder, struct exynos_drm_encoder *exynos_encoder,
enum exynos_drm_output_type type) enum exynos_drm_output_type type)
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "exynos_drm_drv.h" #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 int exynos_drm_encoder_create(struct drm_device *dev, struct exynos_drm_encoder
*encoder, enum exynos_drm_output_type type); *encoder, enum exynos_drm_output_type type);
......
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