diff options
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_dpi.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dpi.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c index 60a316183a4c..6850ce5a0e97 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c @@ -20,7 +20,8 @@ #include <video/of_videomode.h> #include <video/videomode.h> -#include "exynos_drm_drv.h" +#include "exynos_drm_encoder.h" +#include "exynos_drm_crtc.h" struct exynos_dpi { struct exynos_drm_encoder encoder; @@ -151,7 +152,6 @@ static void exynos_dpi_disable(struct exynos_drm_encoder *encoder) } static struct exynos_drm_encoder_ops exynos_dpi_encoder_ops = { - .create_connector = exynos_dpi_create_connector, .enable = exynos_dpi_enable, .disable = exynos_dpi_disable, }; @@ -280,6 +280,28 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx) return 0; } +int exynos_dpi_bind(struct drm_device *dev, + struct exynos_drm_encoder *exynos_encoder) +{ + int ret; + + ret = exynos_drm_encoder_create(dev, exynos_encoder, + EXYNOS_DISPLAY_TYPE_LCD); + if (ret) { + DRM_ERROR("failed to create encoder\n"); + return ret; + } + + ret = exynos_dpi_create_connector(exynos_encoder); + if (ret) { + DRM_ERROR("failed to create connector ret = %d\n", ret); + drm_encoder_cleanup(&exynos_encoder->base); + return ret; + } + + return 0; +} + struct exynos_drm_encoder *exynos_dpi_probe(struct device *dev) { struct exynos_dpi *ctx; |