summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_dpi.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2014-05-09 14:25:20 +0900
committerInki Dae <daeinki@gmail.com>2014-06-02 02:07:04 +0900
commitf37cd5e8098441af6447a87574fbb78eb5b4f9bf (patch)
treec1fc99c2d61e3ea0f91b5d336328690d390fb192 /drivers/gpu/drm/exynos/exynos_drm_dpi.c
parent121692eb0895c5c16f29f3b2141d2913021584ac (diff)
drm/exynos: add component framework support
This patch adds component framework support to resolve the probe order issue. Until now, exynos drm had used codes specific to exynos drm to resolve that issue so with this patch, the specific codes are removed. Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_dpi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dpi.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 82e52c71bccc..f5503af52148 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -248,7 +248,7 @@ enum {
FIMD_PORT_WRB,
};
-static struct device_node *exynos_dpi_of_find_panel_node(struct device *dev)
+struct device_node *exynos_dpi_of_find_panel_node(struct device *dev)
{
struct device_node *np, *ep;
@@ -301,7 +301,7 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx)
return 0;
}
-int exynos_dpi_probe(struct device *dev)
+int exynos_dpi_probe(struct drm_device *drm_dev, struct device *dev)
{
struct exynos_dpi *ctx;
int ret;
@@ -318,15 +318,17 @@ int exynos_dpi_probe(struct device *dev)
if (ret < 0)
return ret;
- exynos_drm_display_register(&exynos_dpi_display);
-
- return 0;
+ return exynos_drm_create_enc_conn(drm_dev, &exynos_dpi_display);
}
-int exynos_dpi_remove(struct device *dev)
+int exynos_dpi_remove(struct drm_device *drm_dev, struct device *dev)
{
+ struct drm_encoder *encoder = exynos_dpi_display.encoder;
+ struct exynos_dpi *ctx = exynos_dpi_display.ctx;
+
exynos_dpi_dpms(&exynos_dpi_display, DRM_MODE_DPMS_OFF);
- exynos_drm_display_unregister(&exynos_dpi_display);
+ encoder->funcs->destroy(encoder);
+ drm_connector_cleanup(&ctx->connector);
return 0;
}