Commit 2e9b3e74 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Andrzej Hajda

drm/bridge: analogix_dp: Don't create useless connectors

If there is another bridge after analogix_dp, then the connector object
should not be created. This fixes following timeouts on Exynos5420-based
Chromebook2 Peach-PIT board during boot:

exynos-dp 145b0000.dp-controller: AUX CH cmd reply timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
exynos-dp 145b0000.dp-controller: AUX CH enable timeout!
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-4-m.szyprowski@samsung.com
parent f25c8358
...@@ -1012,14 +1012,16 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge) ...@@ -1012,14 +1012,16 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge)
{ {
struct analogix_dp_device *dp = bridge->driver_private; struct analogix_dp_device *dp = bridge->driver_private;
struct drm_encoder *encoder = dp->encoder; struct drm_encoder *encoder = dp->encoder;
struct drm_connector *connector = &dp->connector; struct drm_connector *connector = NULL;
int ret; int ret = 0;
if (!bridge->encoder) { if (!bridge->encoder) {
DRM_ERROR("Parent encoder object not found"); DRM_ERROR("Parent encoder object not found");
return -ENODEV; return -ENODEV;
} }
if (!dp->plat_data->skip_connector) {
connector = &dp->connector;
connector->polled = DRM_CONNECTOR_POLL_HPD; connector->polled = DRM_CONNECTOR_POLL_HPD;
ret = drm_connector_init(dp->drm_dev, connector, ret = drm_connector_init(dp->drm_dev, connector,
...@@ -1033,6 +1035,7 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge) ...@@ -1033,6 +1035,7 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge)
drm_connector_helper_add(connector, drm_connector_helper_add(connector,
&analogix_dp_connector_helper_funcs); &analogix_dp_connector_helper_funcs);
drm_mode_connector_attach_encoder(connector, encoder); drm_mode_connector_attach_encoder(connector, encoder);
}
/* /*
* NOTE: the connector registration is implemented in analogix * NOTE: the connector registration is implemented in analogix
......
...@@ -244,6 +244,7 @@ static int exynos_dp_probe(struct platform_device *pdev) ...@@ -244,6 +244,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
/* The remote port can be either a panel or a bridge */ /* The remote port can be either a panel or a bridge */
dp->plat_data.panel = panel; dp->plat_data.panel = panel;
dp->plat_data.skip_connector = !!bridge;
dp->ptn_bridge = bridge; dp->ptn_bridge = bridge;
out: out:
......
...@@ -31,6 +31,7 @@ struct analogix_dp_plat_data { ...@@ -31,6 +31,7 @@ struct analogix_dp_plat_data {
struct drm_panel *panel; struct drm_panel *panel;
struct drm_encoder *encoder; struct drm_encoder *encoder;
struct drm_connector *connector; struct drm_connector *connector;
bool skip_connector;
int (*power_on)(struct analogix_dp_plat_data *); int (*power_on)(struct analogix_dp_plat_data *);
int (*power_off)(struct analogix_dp_plat_data *); int (*power_off)(struct analogix_dp_plat_data *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment