Skip to content

Commit deee328

Browse files
Andrzej Hajdadaeinki
authored andcommitted
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: 6afb772 ("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>
1 parent 6ca469e commit deee328

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include <drm/drmP.h>
1616
#include <drm/drm_crtc_helper.h>
17+
#include <drm/drm_fb_helper.h>
1718
#include <drm/drm_mipi_dsi.h>
1819
#include <drm/drm_panel.h>
1920
#include <drm/drm_atomic_helper.h>
@@ -1474,12 +1475,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
14741475
{
14751476
struct exynos_dsi *dsi = encoder_to_dsi(encoder);
14761477
struct drm_connector *connector = &dsi->connector;
1478+
struct drm_device *drm = encoder->dev;
14771479
int ret;
14781480

14791481
connector->polled = DRM_CONNECTOR_POLL_HPD;
14801482

1481-
ret = drm_connector_init(encoder->dev, connector,
1482-
&exynos_dsi_connector_funcs,
1483+
ret = drm_connector_init(drm, connector, &exynos_dsi_connector_funcs,
14831484
DRM_MODE_CONNECTOR_DSI);
14841485
if (ret) {
14851486
DRM_ERROR("Failed to initialize connector with drm\n");
@@ -1489,7 +1490,12 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
14891490
connector->status = connector_status_disconnected;
14901491
drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs);
14911492
drm_connector_attach_encoder(connector, encoder);
1493+
if (!drm->registered)
1494+
return 0;
14921495

1496+
connector->funcs->reset(connector);
1497+
drm_fb_helper_add_one_connector(drm->fb_helper, connector);
1498+
drm_connector_register(connector);
14931499
return 0;
14941500
}
14951501

0 commit comments

Comments
 (0)