summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_encoder.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2015-08-05 20:24:20 -0300
committerInki Dae <inki.dae@samsung.com>2015-08-16 10:23:37 +0900
commita2986e8032bddbe237ed16e2e26c71f5416cd5fd (patch)
treee52b61cf865f2a2bec677b148852bb597fefb62a /drivers/gpu/drm/exynos/exynos_drm_encoder.c
parentaf8be3f6fe80262f29b5e353421392196ff626f0 (diff)
downloadtalos-obmc-linux-a2986e8032bddbe237ed16e2e26c71f5416cd5fd.tar.gz
talos-obmc-linux-a2986e8032bddbe237ed16e2e26c71f5416cd5fd.zip
drm/exynos: remove exynos_drm_create_enc_conn()
This functions was just hiding the encoder and connector creation in a way that was less clean than if we get rid of it. For example, exynos_encoder ops had .create_connector() defined only because we were handing off the encoder and connector creation to exynos_drm_create_enc_conn(). Without this function we can directly call the create_connector function internally in the code, without the need of any vtable access. It also does some refactoring in the code like creating a bind function for dpi devices. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_encoder.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index ce7b97e3550d..4ed360b9b041 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -17,6 +17,7 @@
#include "exynos_drm_drv.h"
#include "exynos_drm_encoder.h"
+#include "exynos_drm_crtc.h"
static bool
exynos_drm_encoder_mode_fixup(struct drm_encoder *encoder,
@@ -92,15 +93,17 @@ void exynos_drm_encoder_setup(struct drm_device *dev)
int exynos_drm_encoder_create(struct drm_device *dev,
struct exynos_drm_encoder *exynos_encoder,
- unsigned long possible_crtcs)
+ enum exynos_drm_output_type type)
{
struct drm_encoder *encoder;
+ int pipe;
- if (!possible_crtcs)
- return -EINVAL;
+ pipe = exynos_drm_crtc_get_pipe_from_type(dev, type);
+ if (pipe < 0)
+ return pipe;
encoder = &exynos_encoder->base;
- encoder->possible_crtcs = possible_crtcs;
+ encoder->possible_crtcs = 1 << pipe;
DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
OpenPOWER on IntegriCloud