diff options
| author | Andrzej Hajda <a.hajda@samsung.com> | 2018-10-26 06:40:03 -0400 |
|---|---|---|
| committer | Inki Dae <inki.dae@samsung.com> | 2018-11-05 02:37:24 -0500 |
| commit | deee3284cba3145a4ee03cbe8541d7a3bfc499e2 (patch) | |
| tree | a9900a92d03a592a3408a2cf8cfad648c3a215b4 | |
| parent | 6ca469e22a30992b4478d2ab88737c70667c1e00 (diff) | |
drm/exynos/dsi: register connector if it is created after drm bind
DSI device can be attached after DRM device is registered. In such
case newly created connector must be registered by exynos_dsi.
The patch fixes exynos_drm on rinato and trats boards.
Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
| -rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dsi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 32f256749789..d81e62ae286a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | #include <drm/drmP.h> | 15 | #include <drm/drmP.h> |
| 16 | #include <drm/drm_crtc_helper.h> | 16 | #include <drm/drm_crtc_helper.h> |
| 17 | #include <drm/drm_fb_helper.h> | ||
| 17 | #include <drm/drm_mipi_dsi.h> | 18 | #include <drm/drm_mipi_dsi.h> |
| 18 | #include <drm/drm_panel.h> | 19 | #include <drm/drm_panel.h> |
| 19 | #include <drm/drm_atomic_helper.h> | 20 | #include <drm/drm_atomic_helper.h> |
| @@ -1474,12 +1475,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder) | |||
| 1474 | { | 1475 | { |
| 1475 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); | 1476 | struct exynos_dsi *dsi = encoder_to_dsi(encoder); |
| 1476 | struct drm_connector *connector = &dsi->connector; | 1477 | struct drm_connector *connector = &dsi->connector; |
| 1478 | struct drm_device *drm = encoder->dev; | ||
| 1477 | int ret; | 1479 | int ret; |
| 1478 | 1480 | ||
| 1479 | connector->polled = DRM_CONNECTOR_POLL_HPD; | 1481 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
| 1480 | 1482 | ||
| 1481 | ret = drm_connector_init(encoder->dev, connector, | 1483 | ret = drm_connector_init(drm, connector, &exynos_dsi_connector_funcs, |
| 1482 | &exynos_dsi_connector_funcs, | ||
| 1483 | DRM_MODE_CONNECTOR_DSI); | 1484 | DRM_MODE_CONNECTOR_DSI); |
| 1484 | if (ret) { | 1485 | if (ret) { |
| 1485 | DRM_ERROR("Failed to initialize connector with drm\n"); | 1486 | DRM_ERROR("Failed to initialize connector with drm\n"); |
| @@ -1489,7 +1490,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder) | |||
| 1489 | connector->status = connector_status_disconnected; | 1490 | connector->status = connector_status_disconnected; |
| 1490 | drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs); | 1491 | drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs); |
| 1491 | drm_connector_attach_encoder(connector, encoder); | 1492 | drm_connector_attach_encoder(connector, encoder); |
| 1493 | if (!drm->registered) | ||
| 1494 | return 0; | ||
| 1492 | 1495 | ||
| 1496 | connector->funcs->reset(connector); | ||
| 1497 | drm_fb_helper_add_one_connector(drm->fb_helper, connector); | ||
| 1498 | drm_connector_register(connector); | ||
| 1493 | return 0; | 1499 | return 0; |
| 1494 | } | 1500 | } |
| 1495 | 1501 | ||
