Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI: - https://patchwork.amarulasolutions.com/patch/1825/ - https://patchwork.amarulasolutions.com/patch/1838/
[1] https://patchwork.amarulasolutions.com/cover/1826/
Any inputs? Jagan.
Jagan Teki (5): drm: bridge: panel: Reset the connector state pointer drm: exynos: dsi: Use drm panel_bridge API drm: exynos: dsi: Convert to bridge driver drm: exynos: dsi: Switch to atomic funcs drm: exynos: dsi: Move DSI init in bridge pre_enable
drivers/gpu/drm/bridge/panel.c | 3 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 248 +++++++----------------- 2 files changed, 76 insertions(+), 175 deletions(-)
Trigger hotplug event with drm_kms_helper_hotplug_event might fail if the connector state pointer is NULL.
BUG observed in exynos dsi driver where drm_bridge_attach is trying to register a connector in panel_bridge before the hotplug event is triggered,
WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/drm_atomic_state_helper.c:494 drm_atomic_helper_connector_duplicate_state+0x94/0x9c Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.16.0-rc1-00009-g704b1dbfa4c2 #11058 Hardware name: Samsung Exynos (Flattened Device Tree) [<c0110b30>] (unwind_backtrace) from [<c010c618>] (show_stack+0x10/0x14) [<c010c618>] (show_stack) from [<c0b657d4>] (dump_stack_lvl+0x58/0x70) [<c0b657d4>] (dump_stack_lvl) from [<c01261dc>] (__warn+0xd0/0x134) [<c01261dc>] (__warn) from [<c0b5f628>] (warn_slowpath_fmt+0x5c/0xb4) [<c0b5f628>] (warn_slowpath_fmt) from [<c064bce4>] (drm_atomic_helper_connector_duplicate_state+0x94/0x9c) [<c064bce4>] (drm_atomic_helper_connector_duplicate_state) from [<c0666b64>] (drm_atomic_get_connector_state+0xd4/0x190) [<c0666b64>] (drm_atomic_get_connector_state) from [<c0667928>] (__drm_atomic_helper_set_config+0x314/0x368) [<c0667928>] (__drm_atomic_helper_set_config) from [<c067e628>] (drm_client_modeset_commit_atomic+0x170/0x278) [<c067e628>] (drm_client_modeset_commit_atomic) from [<c067e800>] (drm_client_modeset_commit_locked+0x60/0x1c8) [<c067e800>] (drm_client_modeset_commit_locked) from [<c067e98c>] (drm_client_modeset_commit+0x24/0x40) [<c067e98c>] (drm_client_modeset_commit) from [<c06509c0>] (drm_fb_helper_set_par+0xb8/0xf8) [<c06509c0>] (drm_fb_helper_set_par) from [<c05b86d0>] (fbcon_init+0x2c0/0x518) [<c05b86d0>] (fbcon_init) from [<c060636c>] (visual_init+0xc0/0x108) [<c060636c>] (visual_init) from [<c06085e4>] (do_bind_con_driver+0x1b8/0x3a4) [<c06085e4>] (do_bind_con_driver) from [<c0608b40>] (do_take_over_console+0x13c/0x1e8) [<c0608b40>] (do_take_over_console) from [<c05b6854>] (do_fbcon_takeover+0x78/0xd8) [<c05b6854>] (do_fbcon_takeover) from [<c05b1154>] (register_framebuffer+0x208/0x2e0) [<c05b1154>] (register_framebuffer) from [<c064ead0>] (__drm_fb_helper_initial_config_and_unlock+0x400/0x63c) [<c064ead0>] (__drm_fb_helper_initial_config_and_unlock) from [<c063a718>] (drm_kms_helper_hotplug_event+0x24/0x30) [<c063a718>] (drm_kms_helper_hotplug_event) from [<c068f668>] (exynos_dsi_host_attach+0x174/0x1fc) [<c068f668>] (exynos_dsi_host_attach) from [<c0699354>] (s6e8aa0_probe+0x1b4/0x218)
So reset the atomic state for a given connector by freeing the state pointer and allocate a new empty state object. This can be done using connector funcs->reset helper and has to be done before the hotplug even calls.
This patch calls the connector->funcs->reset in panel_bridge_attach.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v5: - none Changes for v4: - new patch
drivers/gpu/drm/bridge/panel.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index b32295abd9e7..f6eea194482a 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -83,6 +83,9 @@ static int panel_bridge_attach(struct drm_bridge *bridge, drm_connector_attach_encoder(&panel_bridge->connector, bridge->encoder);
+ if (connector->funcs->reset) + connector->funcs->reset(connector); + return 0; }
Replace the manual panel handling code by a drm panel_bridge via devm_drm_of_get_bridge().
Adding panel_bridge handling,
- Drops drm_connector and related operations as drm_bridge_attach creates connector during attachment.
- Drops panel pointer and iterate the bridge, so-that it can operate the normal bridge and panel_bridge in constitutive callbacks.
This simplifies the driver and allows all components in the display pipeline to be treated as bridges.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v5: - none Changes for v4: - drop unneeded headers Changes for v3: - fix port number - add print for attached device Changes for v2: - new patch
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 167 ++++-------------------- 1 file changed, 28 insertions(+), 139 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index bce5331ed1e6..ebb19194bb86 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -25,9 +25,7 @@
#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_mipi_dsi.h> -#include <drm/drm_panel.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> @@ -221,6 +219,11 @@ enum exynos_dsi_transfer_type { EXYNOS_DSI_RX, };
+enum { + DSI_PORT_IN, + DSI_PORT_OUT +}; + struct exynos_dsi_transfer { struct list_head list; struct completion completed; @@ -254,8 +257,6 @@ struct exynos_dsi_driver_data { struct exynos_dsi { struct drm_encoder encoder; struct mipi_dsi_host dsi_host; - struct drm_connector connector; - struct drm_panel *panel; struct list_head bridge_chain; struct drm_bridge *out_bridge; struct device *dev; @@ -286,7 +287,6 @@ struct exynos_dsi { };
#define host_to_dsi(host) container_of(host, struct exynos_dsi, dsi_host) -#define connector_to_dsi(c) container_of(c, struct exynos_dsi, connector)
static inline struct exynos_dsi *encoder_to_dsi(struct drm_encoder *e) { @@ -1392,42 +1392,21 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
dsi->state |= DSIM_STATE_ENABLED;
- if (dsi->panel) { - ret = drm_panel_prepare(dsi->panel); - if (ret < 0) - goto err_put_sync; - } else { - list_for_each_entry_reverse(iter, &dsi->bridge_chain, - chain_node) { - if (iter->funcs->pre_enable) - iter->funcs->pre_enable(iter); - } + list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) { + if (iter->funcs->pre_enable) + iter->funcs->pre_enable(iter); }
exynos_dsi_set_display_mode(dsi); exynos_dsi_set_display_enable(dsi, true);
- if (dsi->panel) { - ret = drm_panel_enable(dsi->panel); - if (ret < 0) - goto err_display_disable; - } else { - list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->enable) - iter->funcs->enable(iter); - } + list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { + if (iter->funcs->enable) + iter->funcs->enable(iter); }
dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; return; - -err_display_disable: - exynos_dsi_set_display_enable(dsi, false); - drm_panel_unprepare(dsi->panel); - -err_put_sync: - dsi->state &= ~DSIM_STATE_ENABLED; - pm_runtime_put(dsi->dev); }
static void exynos_dsi_disable(struct drm_encoder *encoder) @@ -1440,15 +1419,12 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE;
- drm_panel_disable(dsi->panel); - list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) { if (iter->funcs->disable) iter->funcs->disable(iter); }
exynos_dsi_set_display_enable(dsi, false); - drm_panel_unprepare(dsi->panel);
list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { if (iter->funcs->post_disable) @@ -1468,70 +1444,6 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder, drm_mode_copy(&dsi->mode, adjusted_mode); }
-static enum drm_connector_status -exynos_dsi_detect(struct drm_connector *connector, bool force) -{ - return connector->status; -} - -static void exynos_dsi_connector_destroy(struct drm_connector *connector) -{ - drm_connector_unregister(connector); - drm_connector_cleanup(connector); - connector->dev = NULL; -} - -static const struct drm_connector_funcs exynos_dsi_connector_funcs = { - .detect = exynos_dsi_detect, - .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = exynos_dsi_connector_destroy, - .reset = drm_atomic_helper_connector_reset, - .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, -}; - -static int exynos_dsi_get_modes(struct drm_connector *connector) -{ - struct exynos_dsi *dsi = connector_to_dsi(connector); - - if (dsi->panel) - return drm_panel_get_modes(dsi->panel, connector); - - return 0; -} - -static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { - .get_modes = exynos_dsi_get_modes, -}; - -static int exynos_dsi_create_connector(struct drm_encoder *encoder) -{ - struct exynos_dsi *dsi = encoder_to_dsi(encoder); - struct drm_connector *connector = &dsi->connector; - struct drm_device *drm = encoder->dev; - int ret; - - connector->polled = DRM_CONNECTOR_POLL_HPD; - - ret = drm_connector_init(drm, connector, &exynos_dsi_connector_funcs, - DRM_MODE_CONNECTOR_DSI); - if (ret) { - DRM_DEV_ERROR(dsi->dev, - "Failed to initialize connector with drm\n"); - return ret; - } - - connector->status = connector_status_disconnected; - drm_connector_helper_add(connector, &exynos_dsi_connector_helper_funcs); - drm_connector_attach_encoder(connector, encoder); - if (!drm->registered) - return 0; - - connector->funcs->reset(connector); - drm_connector_register(connector); - return 0; -} - static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { .enable = exynos_dsi_enable, .disable = exynos_dsi_disable, @@ -1544,33 +1456,23 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct exynos_dsi *dsi = host_to_dsi(host); + struct device *dev = dsi->dev; struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm = encoder->dev; - struct drm_bridge *out_bridge; - - out_bridge = of_drm_find_bridge(device->dev.of_node); - if (out_bridge) { - drm_bridge_attach(encoder, out_bridge, NULL, 0); - dsi->out_bridge = out_bridge; - list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); - } else { - int ret = exynos_dsi_create_connector(encoder); - - if (ret) { - DRM_DEV_ERROR(dsi->dev, - "failed to create connector ret = %d\n", - ret); - drm_encoder_cleanup(encoder); - return ret; - } + int ret;
- dsi->panel = of_drm_find_panel(device->dev.of_node); - if (IS_ERR(dsi->panel)) - dsi->panel = NULL; - else - dsi->connector.status = connector_status_connected; + dsi->out_bridge = devm_drm_of_get_bridge(dev, dev->of_node, DSI_PORT_OUT, 0); + if (IS_ERR(dsi->out_bridge)) { + ret = PTR_ERR(dsi->out_bridge); + DRM_DEV_ERROR(dev, "failed to find the bridge: %d\n", ret); + return ret; }
+ DRM_DEV_INFO(dev, "Attached %s device\n", device->name); + + drm_bridge_attach(encoder, dsi->out_bridge, NULL, 0); + list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); + /* * This is a temporary solution and should be made by more generic way. * @@ -1578,7 +1480,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, * TE interrupt handler. */ if (!(device->mode_flags & MIPI_DSI_MODE_VIDEO)) { - int ret = exynos_dsi_register_te_irq(dsi, &device->dev); + ret = exynos_dsi_register_te_irq(dsi, &device->dev); if (ret) return ret; } @@ -1605,18 +1507,10 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, struct exynos_dsi *dsi = host_to_dsi(host); struct drm_device *drm = dsi->encoder.dev;
- if (dsi->panel) { - mutex_lock(&drm->mode_config.mutex); - exynos_dsi_disable(&dsi->encoder); - dsi->panel = NULL; - dsi->connector.status = connector_status_disconnected; - mutex_unlock(&drm->mode_config.mutex); - } else { - if (dsi->out_bridge->funcs->detach) - dsi->out_bridge->funcs->detach(dsi->out_bridge); - dsi->out_bridge = NULL; - INIT_LIST_HEAD(&dsi->bridge_chain); - } + if (dsi->out_bridge->funcs->detach) + dsi->out_bridge->funcs->detach(dsi->out_bridge); + dsi->out_bridge = NULL; + INIT_LIST_HEAD(&dsi->bridge_chain);
if (drm->mode_config.poll_enabled) drm_kms_helper_hotplug_event(drm); @@ -1672,11 +1566,6 @@ static int exynos_dsi_of_read_u32(const struct device_node *np, return ret; }
-enum { - DSI_PORT_IN, - DSI_PORT_OUT -}; - static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) { struct device *dev = dsi->dev;
Convert the encoders to bridge drivers in order to standardize on a single API with built-in dumb encoder support for compatibility with existing component drivers.
Driver bridge conversion will help to reuse the same bridge on different platforms as exynos dsi driver can be used as a Samsung DSIM and use it for i.MX8MM platform.
Bridge conversion,
- Drops drm_encoder_helper_funcs.
- Adds drm_bridge_funcs and register a drm bridge.
- Drops bridge_chain.
- Separate pre_enable from enable function.
- Separate post_disable from disable function.
Convert it.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v5: - none Changes for v4: - add pre_enable function - add post_disable function Changes for v3: - move bridge add in host_attach - move bridge remove in host_detach - use flags, bridge in drm_bridge_attach in attch Changes for v2: - drop bridge_chain
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 88 +++++++++++++------------ 1 file changed, 45 insertions(+), 43 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ebb19194bb86..8ca95c72ef18 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -257,7 +257,7 @@ struct exynos_dsi_driver_data { struct exynos_dsi { struct drm_encoder encoder; struct mipi_dsi_host dsi_host; - struct list_head bridge_chain; + struct drm_bridge bridge; struct drm_bridge *out_bridge; struct device *dev; struct drm_display_mode mode; @@ -288,9 +288,9 @@ struct exynos_dsi {
#define host_to_dsi(host) container_of(host, struct exynos_dsi, dsi_host)
-static inline struct exynos_dsi *encoder_to_dsi(struct drm_encoder *e) +static inline struct exynos_dsi *bridge_to_dsi(struct drm_bridge *b) { - return container_of(e, struct exynos_dsi, encoder); + return container_of(b, struct exynos_dsi, bridge); }
enum reg_idx { @@ -1375,10 +1375,9 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) } }
-static void exynos_dsi_enable(struct drm_encoder *encoder) +static void exynos_dsi_pre_enable(struct drm_bridge *bridge) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); - struct drm_bridge *iter; + struct exynos_dsi *dsi = bridge_to_dsi(bridge); int ret;
if (dsi->state & DSIM_STATE_ENABLED) @@ -1391,63 +1390,64 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) }
dsi->state |= DSIM_STATE_ENABLED; +}
- list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->pre_enable) - iter->funcs->pre_enable(iter); - } +static void exynos_dsi_enable(struct drm_bridge *bridge) +{ + struct exynos_dsi *dsi = bridge_to_dsi(bridge);
exynos_dsi_set_display_mode(dsi); exynos_dsi_set_display_enable(dsi, true);
- list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->enable) - iter->funcs->enable(iter); - } - dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; + return; }
-static void exynos_dsi_disable(struct drm_encoder *encoder) +static void exynos_dsi_disable(struct drm_bridge *bridge) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); - struct drm_bridge *iter; + struct exynos_dsi *dsi = bridge_to_dsi(bridge);
if (!(dsi->state & DSIM_STATE_ENABLED)) return;
dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; +}
- list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->disable) - iter->funcs->disable(iter); - } +static void exynos_dsi_post_disable(struct drm_bridge *bridge) +{ + struct exynos_dsi *dsi = bridge_to_dsi(bridge);
exynos_dsi_set_display_enable(dsi, false);
- list_for_each_entry(iter, &dsi->bridge_chain, chain_node) { - if (iter->funcs->post_disable) - iter->funcs->post_disable(iter); - } - dsi->state &= ~DSIM_STATE_ENABLED; pm_runtime_put_sync(dsi->dev); }
-static void exynos_dsi_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) +static void exynos_dsi_mode_set(struct drm_bridge *bridge, + const struct drm_display_mode *mode, + const struct drm_display_mode *adjusted_mode) { - struct exynos_dsi *dsi = encoder_to_dsi(encoder); + struct exynos_dsi *dsi = bridge_to_dsi(bridge);
drm_mode_copy(&dsi->mode, adjusted_mode); }
-static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { - .enable = exynos_dsi_enable, - .disable = exynos_dsi_disable, - .mode_set = exynos_dsi_mode_set, +static int exynos_dsi_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct exynos_dsi *dsi = bridge_to_dsi(bridge); + + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, NULL, flags); +} + +static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { + .pre_enable = exynos_dsi_pre_enable, + .enable = exynos_dsi_enable, + .disable = exynos_dsi_disable, + .post_disable = exynos_dsi_post_disable, + .mode_set = exynos_dsi_mode_set, + .attach = exynos_dsi_attach, };
MODULE_DEVICE_TABLE(of, exynos_dsi_of_match); @@ -1470,8 +1470,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
DRM_DEV_INFO(dev, "Attached %s device\n", device->name);
- drm_bridge_attach(encoder, dsi->out_bridge, NULL, 0); - list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain); + drm_bridge_add(&dsi->bridge); + + drm_bridge_attach(encoder, &dsi->bridge, NULL, 0);
/* * This is a temporary solution and should be made by more generic way. @@ -1510,13 +1511,14 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, if (dsi->out_bridge->funcs->detach) dsi->out_bridge->funcs->detach(dsi->out_bridge); dsi->out_bridge = NULL; - INIT_LIST_HEAD(&dsi->bridge_chain);
if (drm->mode_config.poll_enabled) drm_kms_helper_hotplug_event(drm);
exynos_dsi_unregister_te_irq(dsi);
+ drm_bridge_remove(&dsi->bridge); + return 0; }
@@ -1602,8 +1604,6 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
- drm_encoder_helper_add(encoder, &exynos_dsi_encoder_helper_funcs); - ret = exynos_drm_set_possible_crtcs(encoder, EXYNOS_DISPLAY_TYPE_LCD); if (ret < 0) return ret; @@ -1623,9 +1623,8 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master, void *data) { struct exynos_dsi *dsi = dev_get_drvdata(dev); - struct drm_encoder *encoder = &dsi->encoder;
- exynos_dsi_disable(encoder); + exynos_dsi_disable(&dsi->bridge);
mipi_dsi_host_unregister(&dsi->dsi_host); } @@ -1651,7 +1650,6 @@ static int exynos_dsi_probe(struct platform_device *pdev) init_completion(&dsi->completed); spin_lock_init(&dsi->transfer_lock); INIT_LIST_HEAD(&dsi->transfer_list); - INIT_LIST_HEAD(&dsi->bridge_chain);
dsi->dsi_host.ops = &exynos_dsi_ops; dsi->dsi_host.dev = dev; @@ -1719,6 +1717,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
pm_runtime_enable(dev);
+ dsi->bridge.funcs = &exynos_dsi_bridge_funcs; + dsi->bridge.of_node = dev->of_node; + dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + ret = component_add(dev, &exynos_dsi_component_ops); if (ret) goto err_disable_runtime;
The new support drm bridges are moving towards atomic functions.
Replace atomic version of functions to continue the transition to the atomic API.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v5, v4, v3: - none
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 8ca95c72ef18..891b5c984f0c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1375,7 +1375,8 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi) } }
-static void exynos_dsi_pre_enable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_pre_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge); int ret; @@ -1392,7 +1393,8 @@ static void exynos_dsi_pre_enable(struct drm_bridge *bridge) dsi->state |= DSIM_STATE_ENABLED; }
-static void exynos_dsi_enable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge);
@@ -1404,7 +1406,8 @@ static void exynos_dsi_enable(struct drm_bridge *bridge) return; }
-static void exynos_dsi_disable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge);
@@ -1414,7 +1417,8 @@ static void exynos_dsi_disable(struct drm_bridge *bridge) dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; }
-static void exynos_dsi_post_disable(struct drm_bridge *bridge) +static void exynos_dsi_atomic_post_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct exynos_dsi *dsi = bridge_to_dsi(bridge);
@@ -1442,10 +1446,13 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, }
static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { - .pre_enable = exynos_dsi_pre_enable, - .enable = exynos_dsi_enable, - .disable = exynos_dsi_disable, - .post_disable = exynos_dsi_post_disable, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .atomic_pre_enable = exynos_dsi_atomic_pre_enable, + .atomic_enable = exynos_dsi_atomic_enable, + .atomic_disable = exynos_dsi_atomic_disable, + .atomic_post_disable = exynos_dsi_atomic_post_disable, .mode_set = exynos_dsi_mode_set, .attach = exynos_dsi_attach, }; @@ -1624,7 +1631,7 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master, { struct exynos_dsi *dsi = dev_get_drvdata(dev);
- exynos_dsi_disable(&dsi->bridge); + exynos_dsi_atomic_disable(&dsi->bridge, NULL);
mipi_dsi_host_unregister(&dsi->dsi_host); }
Host transfer in DSI master will invoke only when the DSI commands sent from DSI devices like DSI Panel or DSI bridges and this host transfer wouldn't invoke I2C based DSI bridge drivers.
Handling DSI host initialization in transfer calls might miss the controller setup for I2C configured DSI bridges.
So, move the DSI initialization from transfer to bridge pre_enable as the bridge enable API as it is common across all classes of DSI device drivers.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Changes for v5: - init dsi in pre_enable Changes for v4: - none Changes for v3: - new patch
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 891b5c984f0c..1c3633f9982d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1391,6 +1391,13 @@ static void exynos_dsi_atomic_pre_enable(struct drm_bridge *bridge, }
dsi->state |= DSIM_STATE_ENABLED; + + if (!(dsi->state & DSIM_STATE_INITIALIZED)) { + ret = exynos_dsi_init(dsi); + if (ret) + return; + dsi->state |= DSIM_STATE_INITIALIZED; + } }
static void exynos_dsi_atomic_enable(struct drm_bridge *bridge, @@ -1539,13 +1546,6 @@ static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, if (!(dsi->state & DSIM_STATE_ENABLED)) return -EINVAL;
- if (!(dsi->state & DSIM_STATE_INITIALIZED)) { - ret = exynos_dsi_init(dsi); - if (ret) - return ret; - dsi->state |= DSIM_STATE_INITIALIZED; - } - ret = mipi_dsi_create_packet(&xfer.packet, msg); if (ret < 0) return ret;
Hi,
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Best regards
Hi Marek,
On Fri, Jan 21, 2022 at 5:06 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
Hi,
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Please use drm-misc/drm-misc-next with below patches and then apply this series. - https://patchwork.amarulasolutions.com/patch/1825/ - https://patchwork.amarulasolutions.com/patch/1838/
Jagan.
Hi Jagan,
On 21.01.2022 12:40, Jagan Teki wrote:
On Fri, Jan 21, 2022 at 5:06 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Please use drm-misc/drm-misc-next with below patches and then apply this series.
I don't have a good news. It doesn't work. The last patch even breaks DSI operation:
[   4.520276] [drm] Exynos DRM: using 13800000.decon device for DMA mapping operations [   4.520578] exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) [   4.580473] exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) [   4.580726] exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [   4.584304] exynos-dsi 13900000.dsi: [drm:exynos_dsi_host_attach] Attached s6e3hf2 device [   4.585141] exynos-drm exynos-drm: bound 13900000.dsi (ops exynos_dsi_component_ops) [   4.593189] rc_core: Couldn't load IR keymap rc-cec [   4.594133] Registered IR keymap rc-empty [   4.598760] rc rc0: sii8620 as /devices/virtual/rc/rc0 [   4.605219] input: sii8620 as /devices/virtual/rc/rc0/input1 [   4.610238] exynos-drm exynos-drm: bound 13970000.hdmi (ops hdmi_component_ops) [   4.920038] exynos-dsi 13900000.dsi: xfer timed out: 39 03 00 00 f0 5a 5a [   5.024033] ------------[ cut here ]------------ [   5.024055] [CRTC:49:crtc-0] vblank wait timed out [   5.024129] WARNING: CPU: 4 PID: 151 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [   5.024171] Modules linked in: [   5.024195] CPU: 4 PID: 151 Comm: kworker/4:7 Not tainted 5.16.0-rc5+ #11232 [   5.024219] Hardware name: Samsung TM2E board (DT) [   5.024232] Workqueue: events output_poll_execute [   5.024262] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [   5.024285] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [   5.024308] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [   5.024327] sp : ffff800013b5b970 [   5.024340] x29: ffff800013b5b970 x28: 0000000000000000 x27: ffff00002437e400 [   5.024391] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [   5.024437] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [   5.024482] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [   5.024526] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [   5.024571] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [   5.024615] x11: 656820747563205b x10: 000000000000003a x9 : 000000007e82f035 [   5.024661] x8 : ffff800011b66df8 x7 : ffff800013b5b740 x6 : 0000000000000001 [   5.024704] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 0000000000000007 [   5.024747] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [   5.024791] Call trace: [   5.024802] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [   5.024825] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [   5.024845] commit_tail+0x9c/0x170 [   5.024864] drm_atomic_helper_commit+0x188/0x3a0 [   5.024884] drm_atomic_commit+0x54/0x68 [   5.024906] drm_client_modeset_commit_atomic+0x260/0x288 [   5.024927] drm_client_modeset_commit_locked+0x54/0x1c0 [   5.024945] drm_client_modeset_commit+0x2c/0x50 [   5.024962] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [   5.024983] drm_fb_helper_set_par+0x38/0x70 [   5.025000] drm_fb_helper_hotplug_event.part.29+0xb0/0xe0 [   5.025018] drm_fb_helper_output_poll_changed+0x30/0x40 [   5.025035] drm_kms_helper_hotplug_event+0x28/0x40 [   5.025053] output_poll_execute+0xc4/0x1f0 [   5.025071] process_one_work+0x29c/0x6e8 [   5.025090] worker_thread+0x48/0x460 [   5.025106] kthread+0x154/0x188 [   5.025128] ret_from_fork+0x10/0x20 [   5.025148] irq event stamp: 878 [   5.025160] hardirqs last enabled at (877): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [   5.025188] hardirqs last disabled at (878): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [   5.025214] softirqs last enabled at (206): [<ffff800010010488>] _stext+0x488/0x5cc [   5.025233] softirqs last disabled at (201): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [   5.025256] ---[ end trace 458e29685f12760b ]--- [  15.240069] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  15.240131] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [  25.480001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  25.480031] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [  35.720001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  35.720031] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [  35.824013] ------------[ cut here ]------------ [  35.824037] [CRTC:49:crtc-0] vblank wait timed out [  35.824116] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  35.824155] Modules linked in: [  35.824180] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G       W        5.16.0-rc5+ #11232 [  35.824205] Hardware name: Samsung TM2E board (DT) [  35.824221] Workqueue: events_unbound deferred_probe_work_func [  35.824255] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [  35.824281] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  35.824304] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  35.824325] sp : ffff80001386b380 [  35.824339] x29: ffff80001386b380 x28: 0000000000000000 x27: ffff000023c91c00 [  35.824395] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [  35.824446] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [  35.824495] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [  35.824544] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [  35.824594] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [  35.824643] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [  35.824693] x8 : ffff800011b66df8 x7 : ffff80001386b150 x6 : 0000000000000001 [  35.824741] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [  35.824788] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [  35.824838] Call trace: [  35.824851] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  35.824875] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [  35.824898] commit_tail+0x9c/0x170 [  35.824918] drm_atomic_helper_commit+0x188/0x3a0 [  35.824939] drm_atomic_commit+0x54/0x68 [  35.824962] drm_client_modeset_commit_atomic+0x260/0x288 [  35.824983] drm_client_modeset_commit_locked+0x54/0x1c0 [  35.825003] drm_client_modeset_commit+0x2c/0x50 [  35.825023] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [  35.825043] drm_fb_helper_set_par+0x38/0x70 [  35.825062] fbcon_init+0x440/0x4e0 [  35.825085] visual_init+0xb0/0x108 [  35.825107] do_bind_con_driver+0x1cc/0x3c0 [  35.825127] do_take_over_console+0x148/0x1d8 [  35.825148] do_fbcon_takeover+0x70/0xe8 [  35.825170] fbcon_fb_registered+0x13c/0x150 [  35.825192] register_framebuffer+0x1c4/0x340 [  35.825211] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [  35.825239] drm_fb_helper_initial_config+0x44/0x50 [  35.825257] exynos_drm_fbdev_init+0x90/0x100 [  35.825282] exynos_drm_bind+0x164/0x1a8 [  35.825303] try_to_bring_up_master+0x15c/0x1c8 [  35.825326] __component_add+0xa8/0x170 [  35.825348] component_add+0x10/0x18 [  35.825370] hdmi_probe+0x43c/0x6d0 [  35.825389] platform_probe+0x90/0xd8 [  35.825412] really_probe+0xb4/0x2e0 [  35.825432] __driver_probe_device+0x78/0xd8 [  35.825452] driver_probe_device+0x40/0x110 [  35.825473] __device_attach_driver+0x9c/0xd8 [  35.825494] bus_for_each_drv+0x70/0xc8 [  35.825513] __device_attach+0xec/0x150 [  35.825533] device_initial_probe+0x10/0x18 [  35.825556] bus_probe_device+0x94/0xa0 [  35.825575] deferred_probe_work_func+0x84/0xc0 [  35.825595] process_one_work+0x29c/0x6e8 [  35.825614] worker_thread+0x21c/0x460 [  35.825631] kthread+0x154/0x188 [  35.825653] ret_from_fork+0x10/0x20 [  35.825673] irq event stamp: 162880 [  35.825687] hardirqs last enabled at (162879): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [  35.825716] hardirqs last disabled at (162880): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [  35.825742] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [  35.825763] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [  35.825787] ---[ end trace 458e29685f12760c ]--- [  45.960007] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  45.960039] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [  56.200000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  56.200030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [  66.440000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  66.440030] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [  66.544003] ------------[ cut here ]------------ [  66.544027] [CRTC:49:crtc-0] vblank wait timed out [  66.544102] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  66.544138] Modules linked in: [  66.544162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G       W        5.16.0-rc5+ #11232 [  66.544186] Hardware name: Samsung TM2E board (DT) [  66.544200] Workqueue: events_unbound deferred_probe_work_func [  66.544233] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [  66.544255] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  66.544277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  66.544297] sp : ffff80001386b160 [  66.544310] x29: ffff80001386b160 x28: 0000000000000000 x27: ffff000023d83500 [  66.544363] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [  66.544412] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [  66.544461] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [  66.544509] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [  66.544558] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [  66.544606] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [  66.544655] x8 : ffff800011b66df8 x7 : ffff80001386af30 x6 : 0000000000000001 [  66.544702] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [  66.544749] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [  66.544796] Call trace: [  66.544808] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  66.544830] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [  66.544852] commit_tail+0x9c/0x170 [  66.544871] drm_atomic_helper_commit+0x188/0x3a0 [  66.544892] drm_atomic_commit+0x54/0x68 [  66.544915] drm_client_modeset_commit_atomic+0x260/0x288 [  66.544935] drm_client_modeset_commit_locked+0x54/0x1c0 [  66.544954] drm_fb_helper_pan_display+0xb0/0x1c0 [  66.544973] fb_pan_display+0xb8/0x158 [  66.544990] bit_update_start+0x1c/0x40 [  66.545013] fbcon_switch+0x308/0x458 [  66.545034] redraw_screen+0x158/0x238 [  66.545056] fbcon_prepare_logo+0x3cc/0x440 [  66.545077] fbcon_init+0x380/0x4e0 [  66.545098] visual_init+0xb0/0x108 [  66.545118] do_bind_con_driver+0x1cc/0x3c0 [  66.545137] do_take_over_console+0x148/0x1d8 [  66.545158] do_fbcon_takeover+0x70/0xe8 [  66.545178] fbcon_fb_registered+0x13c/0x150 [  66.545199] register_framebuffer+0x1c4/0x340 [  66.545217] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [  66.545244] drm_fb_helper_initial_config+0x44/0x50 [  66.545263] exynos_drm_fbdev_init+0x90/0x100 [  66.545286] exynos_drm_bind+0x164/0x1a8 [  66.545306] try_to_bring_up_master+0x15c/0x1c8 [  66.545329] __component_add+0xa8/0x170 [  66.545350] component_add+0x10/0x18 [  66.545371] hdmi_probe+0x43c/0x6d0 [  66.545389] platform_probe+0x90/0xd8 [  66.545411] really_probe+0xb4/0x2e0 [  66.545431] __driver_probe_device+0x78/0xd8 [  66.545452] driver_probe_device+0x40/0x110 [  66.545472] __device_attach_driver+0x9c/0xd8 [  66.545493] bus_for_each_drv+0x70/0xc8 [  66.545513] __device_attach+0xec/0x150 [  66.545532] device_initial_probe+0x10/0x18 [  66.545553] bus_probe_device+0x94/0xa0 [  66.545573] deferred_probe_work_func+0x84/0xc0 [  66.545592] process_one_work+0x29c/0x6e8 [  66.545612] worker_thread+0x21c/0x460 [  66.545628] kthread+0x154/0x188 [  66.545651] ret_from_fork+0x10/0x20 [  66.545671] irq event stamp: 163148 [  66.545684] hardirqs last enabled at (163147): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [  66.545712] hardirqs last disabled at (163148): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [  66.545735] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [  66.545754] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [  66.545778] ---[ end trace 458e29685f12760d ]--- [  66.589975] Console: switching to colour frame buffer device 200x160 [  76.680050] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  76.680082] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [  86.920001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  86.920030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [  97.160001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [  97.160029] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [  97.264005] ------------[ cut here ]------------ [  97.264029] [CRTC:49:crtc-0] vblank wait timed out [  97.264103] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  97.264139] Modules linked in: [  97.264162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G       W        5.16.0-rc5+ #11232 [  97.264185] Hardware name: Samsung TM2E board (DT) [  97.264199] Workqueue: events_unbound deferred_probe_work_func [  97.264231] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [  97.264254] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  97.264277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  97.264298] sp : ffff80001386b290 [  97.264310] x29: ffff80001386b290 x28: 0000000000000000 x27: ffff0000250a6a00 [  97.264361] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [  97.264409] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [  97.264457] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [  97.264505] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [  97.264554] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [  97.264603] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [  97.264652] x8 : ffff800011b66df8 x7 : ffff80001386b060 x6 : 0000000000000001 [  97.264699] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [  97.264746] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [  97.264794] Call trace: [  97.264806] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [  97.264829] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [  97.264852] commit_tail+0x9c/0x170 [  97.264872] drm_atomic_helper_commit+0x188/0x3a0 [  97.264892] drm_atomic_commit+0x54/0x68 [  97.264915] drm_client_modeset_commit_atomic+0x260/0x288 [  97.264936] drm_client_modeset_commit_locked+0x54/0x1c0 [  97.264955] drm_fb_helper_pan_display+0xb0/0x1c0 [  97.264974] fb_pan_display+0xb8/0x158 [  97.264991] bit_update_start+0x1c/0x40 [  97.265014] fbcon_switch+0x308/0x458 [  97.265034] redraw_screen+0x158/0x238 [  97.265056] do_bind_con_driver+0x2d0/0x3c0 [  97.265075] do_take_over_console+0x148/0x1d8 [  97.265096] do_fbcon_takeover+0x70/0xe8 [  97.265117] fbcon_fb_registered+0x13c/0x150 [  97.265138] register_framebuffer+0x1c4/0x340 [  97.265156] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [  97.265183] drm_fb_helper_initial_config+0x44/0x50 [  97.265202] exynos_drm_fbdev_init+0x90/0x100 [  97.265225] exynos_drm_bind+0x164/0x1a8 [  97.265246] try_to_bring_up_master+0x15c/0x1c8 [  97.265268] __component_add+0xa8/0x170 [  97.265289] component_add+0x10/0x18 [  97.265310] hdmi_probe+0x43c/0x6d0 [  97.265327] platform_probe+0x90/0xd8 [  97.265349] really_probe+0xb4/0x2e0 [  97.265368] __driver_probe_device+0x78/0xd8 [  97.265388] driver_probe_device+0x40/0x110 [  97.265408] __device_attach_driver+0x9c/0xd8 [  97.265428] bus_for_each_drv+0x70/0xc8 [  97.265446] __device_attach+0xec/0x150 [  97.265465] device_initial_probe+0x10/0x18 [  97.265485] bus_probe_device+0x94/0xa0 [  97.265505] deferred_probe_work_func+0x84/0xc0 [  97.265524] process_one_work+0x29c/0x6e8 [  97.265543] worker_thread+0x21c/0x460 [  97.265559] kthread+0x154/0x188 [  97.265580] ret_from_fork+0x10/0x20 [  97.265601] irq event stamp: 163438 [  97.265613] hardirqs last enabled at (163437): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [  97.265641] hardirqs last disabled at (163438): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [  97.265664] softirqs last enabled at (163174): [<ffff800010010488>] _stext+0x488/0x5cc [  97.265684] softirqs last disabled at (163169): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [  97.265706] ---[ end trace 458e29685f12760e ]--- [  98.742702] exynos-drm exynos-drm: [drm] fb0: exynos frame buffer device [  98.752101] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
Best regards
Hi Marek,
On Fri, Jan 21, 2022 at 6:14 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
Hi Jagan,
On 21.01.2022 12:40, Jagan Teki wrote:
On Fri, Jan 21, 2022 at 5:06 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Please use drm-misc/drm-misc-next with below patches and then apply this series.
I don't have a good news. It doesn't work. The last patch even breaks DSI operation:
[ 4.520276] [drm] Exynos DRM: using 13800000.decon device for DMA mapping operations [ 4.520578] exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) [ 4.580473] exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) [ 4.580726] exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [ 4.584304] exynos-dsi 13900000.dsi: [drm:exynos_dsi_host_attach] Attached s6e3hf2 device [ 4.585141] exynos-drm exynos-drm: bound 13900000.dsi (ops exynos_dsi_component_ops) [ 4.593189] rc_core: Couldn't load IR keymap rc-cec [ 4.594133] Registered IR keymap rc-empty [ 4.598760] rc rc0: sii8620 as /devices/virtual/rc/rc0 [ 4.605219] input: sii8620 as /devices/virtual/rc/rc0/input1 [ 4.610238] exynos-drm exynos-drm: bound 13970000.hdmi (ops hdmi_component_ops) [ 4.920038] exynos-dsi 13900000.dsi: xfer timed out: 39 03 00 00 f0 5a 5a [ 5.024033] ------------[ cut here ]------------ [ 5.024055] [CRTC:49:crtc-0] vblank wait timed out [ 5.024129] WARNING: CPU: 4 PID: 151 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024171] Modules linked in: [ 5.024195] CPU: 4 PID: 151 Comm: kworker/4:7 Not tainted 5.16.0-rc5+ #11232 [ 5.024219] Hardware name: Samsung TM2E board (DT) [ 5.024232] Workqueue: events output_poll_execute [ 5.024262] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 5.024285] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024308] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024327] sp : ffff800013b5b970 [ 5.024340] x29: ffff800013b5b970 x28: 0000000000000000 x27: ffff00002437e400 [ 5.024391] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 5.024437] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 5.024482] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 5.024526] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 5.024571] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 5.024615] x11: 656820747563205b x10: 000000000000003a x9 : 000000007e82f035 [ 5.024661] x8 : ffff800011b66df8 x7 : ffff800013b5b740 x6 : 0000000000000001 [ 5.024704] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 0000000000000007 [ 5.024747] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 5.024791] Call trace: [ 5.024802] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024825] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 5.024845] commit_tail+0x9c/0x170 [ 5.024864] drm_atomic_helper_commit+0x188/0x3a0 [ 5.024884] drm_atomic_commit+0x54/0x68 [ 5.024906] drm_client_modeset_commit_atomic+0x260/0x288 [ 5.024927] drm_client_modeset_commit_locked+0x54/0x1c0 [ 5.024945] drm_client_modeset_commit+0x2c/0x50 [ 5.024962] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 5.024983] drm_fb_helper_set_par+0x38/0x70 [ 5.025000] drm_fb_helper_hotplug_event.part.29+0xb0/0xe0 [ 5.025018] drm_fb_helper_output_poll_changed+0x30/0x40 [ 5.025035] drm_kms_helper_hotplug_event+0x28/0x40 [ 5.025053] output_poll_execute+0xc4/0x1f0 [ 5.025071] process_one_work+0x29c/0x6e8 [ 5.025090] worker_thread+0x48/0x460 [ 5.025106] kthread+0x154/0x188 [ 5.025128] ret_from_fork+0x10/0x20 [ 5.025148] irq event stamp: 878 [ 5.025160] hardirqs last enabled at (877): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 5.025188] hardirqs last disabled at (878): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 5.025214] softirqs last enabled at (206): [<ffff800010010488>] _stext+0x488/0x5cc [ 5.025233] softirqs last disabled at (201): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 5.025256] ---[ end trace 458e29685f12760b ]--- [ 15.240069] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 15.240131] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 25.480001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 25.480031] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 35.720001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 35.720031] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 35.824013] ------------[ cut here ]------------ [ 35.824037] [CRTC:49:crtc-0] vblank wait timed out [ 35.824116] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824155] Modules linked in: [ 35.824180] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 35.824205] Hardware name: Samsung TM2E board (DT) [ 35.824221] Workqueue: events_unbound deferred_probe_work_func [ 35.824255] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 35.824281] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824304] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824325] sp : ffff80001386b380 [ 35.824339] x29: ffff80001386b380 x28: 0000000000000000 x27: ffff000023c91c00 [ 35.824395] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 35.824446] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 35.824495] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 35.824544] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 35.824594] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 35.824643] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 35.824693] x8 : ffff800011b66df8 x7 : ffff80001386b150 x6 : 0000000000000001 [ 35.824741] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 35.824788] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 35.824838] Call trace: [ 35.824851] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824875] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 35.824898] commit_tail+0x9c/0x170 [ 35.824918] drm_atomic_helper_commit+0x188/0x3a0 [ 35.824939] drm_atomic_commit+0x54/0x68 [ 35.824962] drm_client_modeset_commit_atomic+0x260/0x288 [ 35.824983] drm_client_modeset_commit_locked+0x54/0x1c0 [ 35.825003] drm_client_modeset_commit+0x2c/0x50 [ 35.825023] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 35.825043] drm_fb_helper_set_par+0x38/0x70 [ 35.825062] fbcon_init+0x440/0x4e0 [ 35.825085] visual_init+0xb0/0x108 [ 35.825107] do_bind_con_driver+0x1cc/0x3c0 [ 35.825127] do_take_over_console+0x148/0x1d8 [ 35.825148] do_fbcon_takeover+0x70/0xe8 [ 35.825170] fbcon_fb_registered+0x13c/0x150 [ 35.825192] register_framebuffer+0x1c4/0x340 [ 35.825211] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 35.825239] drm_fb_helper_initial_config+0x44/0x50 [ 35.825257] exynos_drm_fbdev_init+0x90/0x100 [ 35.825282] exynos_drm_bind+0x164/0x1a8 [ 35.825303] try_to_bring_up_master+0x15c/0x1c8 [ 35.825326] __component_add+0xa8/0x170 [ 35.825348] component_add+0x10/0x18 [ 35.825370] hdmi_probe+0x43c/0x6d0 [ 35.825389] platform_probe+0x90/0xd8 [ 35.825412] really_probe+0xb4/0x2e0 [ 35.825432] __driver_probe_device+0x78/0xd8 [ 35.825452] driver_probe_device+0x40/0x110 [ 35.825473] __device_attach_driver+0x9c/0xd8 [ 35.825494] bus_for_each_drv+0x70/0xc8 [ 35.825513] __device_attach+0xec/0x150 [ 35.825533] device_initial_probe+0x10/0x18 [ 35.825556] bus_probe_device+0x94/0xa0 [ 35.825575] deferred_probe_work_func+0x84/0xc0 [ 35.825595] process_one_work+0x29c/0x6e8 [ 35.825614] worker_thread+0x21c/0x460 [ 35.825631] kthread+0x154/0x188 [ 35.825653] ret_from_fork+0x10/0x20 [ 35.825673] irq event stamp: 162880 [ 35.825687] hardirqs last enabled at (162879): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 35.825716] hardirqs last disabled at (162880): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 35.825742] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 35.825763] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 35.825787] ---[ end trace 458e29685f12760c ]--- [ 45.960007] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 45.960039] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 56.200000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 56.200030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 66.440000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 66.440030] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 66.544003] ------------[ cut here ]------------ [ 66.544027] [CRTC:49:crtc-0] vblank wait timed out [ 66.544102] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544138] Modules linked in: [ 66.544162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 66.544186] Hardware name: Samsung TM2E board (DT) [ 66.544200] Workqueue: events_unbound deferred_probe_work_func [ 66.544233] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 66.544255] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544297] sp : ffff80001386b160 [ 66.544310] x29: ffff80001386b160 x28: 0000000000000000 x27: ffff000023d83500 [ 66.544363] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 66.544412] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 66.544461] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 66.544509] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 66.544558] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 66.544606] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 66.544655] x8 : ffff800011b66df8 x7 : ffff80001386af30 x6 : 0000000000000001 [ 66.544702] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 66.544749] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 66.544796] Call trace: [ 66.544808] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544830] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 66.544852] commit_tail+0x9c/0x170 [ 66.544871] drm_atomic_helper_commit+0x188/0x3a0 [ 66.544892] drm_atomic_commit+0x54/0x68 [ 66.544915] drm_client_modeset_commit_atomic+0x260/0x288 [ 66.544935] drm_client_modeset_commit_locked+0x54/0x1c0 [ 66.544954] drm_fb_helper_pan_display+0xb0/0x1c0 [ 66.544973] fb_pan_display+0xb8/0x158 [ 66.544990] bit_update_start+0x1c/0x40 [ 66.545013] fbcon_switch+0x308/0x458 [ 66.545034] redraw_screen+0x158/0x238 [ 66.545056] fbcon_prepare_logo+0x3cc/0x440 [ 66.545077] fbcon_init+0x380/0x4e0 [ 66.545098] visual_init+0xb0/0x108 [ 66.545118] do_bind_con_driver+0x1cc/0x3c0 [ 66.545137] do_take_over_console+0x148/0x1d8 [ 66.545158] do_fbcon_takeover+0x70/0xe8 [ 66.545178] fbcon_fb_registered+0x13c/0x150 [ 66.545199] register_framebuffer+0x1c4/0x340 [ 66.545217] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 66.545244] drm_fb_helper_initial_config+0x44/0x50 [ 66.545263] exynos_drm_fbdev_init+0x90/0x100 [ 66.545286] exynos_drm_bind+0x164/0x1a8 [ 66.545306] try_to_bring_up_master+0x15c/0x1c8 [ 66.545329] __component_add+0xa8/0x170 [ 66.545350] component_add+0x10/0x18 [ 66.545371] hdmi_probe+0x43c/0x6d0 [ 66.545389] platform_probe+0x90/0xd8 [ 66.545411] really_probe+0xb4/0x2e0 [ 66.545431] __driver_probe_device+0x78/0xd8 [ 66.545452] driver_probe_device+0x40/0x110 [ 66.545472] __device_attach_driver+0x9c/0xd8 [ 66.545493] bus_for_each_drv+0x70/0xc8 [ 66.545513] __device_attach+0xec/0x150 [ 66.545532] device_initial_probe+0x10/0x18 [ 66.545553] bus_probe_device+0x94/0xa0 [ 66.545573] deferred_probe_work_func+0x84/0xc0 [ 66.545592] process_one_work+0x29c/0x6e8 [ 66.545612] worker_thread+0x21c/0x460 [ 66.545628] kthread+0x154/0x188 [ 66.545651] ret_from_fork+0x10/0x20 [ 66.545671] irq event stamp: 163148 [ 66.545684] hardirqs last enabled at (163147): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 66.545712] hardirqs last disabled at (163148): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 66.545735] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 66.545754] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 66.545778] ---[ end trace 458e29685f12760d ]--- [ 66.589975] Console: switching to colour frame buffer device 200x160 [ 76.680050] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 76.680082] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 86.920001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 86.920030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 97.160001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 97.160029] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 97.264005] ------------[ cut here ]------------ [ 97.264029] [CRTC:49:crtc-0] vblank wait timed out [ 97.264103] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264139] Modules linked in: [ 97.264162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 97.264185] Hardware name: Samsung TM2E board (DT) [ 97.264199] Workqueue: events_unbound deferred_probe_work_func [ 97.264231] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 97.264254] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264298] sp : ffff80001386b290 [ 97.264310] x29: ffff80001386b290 x28: 0000000000000000 x27: ffff0000250a6a00 [ 97.264361] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 97.264409] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 97.264457] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 97.264505] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 97.264554] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 97.264603] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 97.264652] x8 : ffff800011b66df8 x7 : ffff80001386b060 x6 : 0000000000000001 [ 97.264699] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 97.264746] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 97.264794] Call trace: [ 97.264806] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264829] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 97.264852] commit_tail+0x9c/0x170 [ 97.264872] drm_atomic_helper_commit+0x188/0x3a0 [ 97.264892] drm_atomic_commit+0x54/0x68 [ 97.264915] drm_client_modeset_commit_atomic+0x260/0x288 [ 97.264936] drm_client_modeset_commit_locked+0x54/0x1c0 [ 97.264955] drm_fb_helper_pan_display+0xb0/0x1c0 [ 97.264974] fb_pan_display+0xb8/0x158 [ 97.264991] bit_update_start+0x1c/0x40 [ 97.265014] fbcon_switch+0x308/0x458 [ 97.265034] redraw_screen+0x158/0x238 [ 97.265056] do_bind_con_driver+0x2d0/0x3c0 [ 97.265075] do_take_over_console+0x148/0x1d8 [ 97.265096] do_fbcon_takeover+0x70/0xe8 [ 97.265117] fbcon_fb_registered+0x13c/0x150 [ 97.265138] register_framebuffer+0x1c4/0x340 [ 97.265156] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 97.265183] drm_fb_helper_initial_config+0x44/0x50 [ 97.265202] exynos_drm_fbdev_init+0x90/0x100 [ 97.265225] exynos_drm_bind+0x164/0x1a8 [ 97.265246] try_to_bring_up_master+0x15c/0x1c8 [ 97.265268] __component_add+0xa8/0x170 [ 97.265289] component_add+0x10/0x18 [ 97.265310] hdmi_probe+0x43c/0x6d0 [ 97.265327] platform_probe+0x90/0xd8 [ 97.265349] really_probe+0xb4/0x2e0 [ 97.265368] __driver_probe_device+0x78/0xd8 [ 97.265388] driver_probe_device+0x40/0x110 [ 97.265408] __device_attach_driver+0x9c/0xd8 [ 97.265428] bus_for_each_drv+0x70/0xc8 [ 97.265446] __device_attach+0xec/0x150 [ 97.265465] device_initial_probe+0x10/0x18 [ 97.265485] bus_probe_device+0x94/0xa0 [ 97.265505] deferred_probe_work_func+0x84/0xc0 [ 97.265524] process_one_work+0x29c/0x6e8 [ 97.265543] worker_thread+0x21c/0x460 [ 97.265559] kthread+0x154/0x188 [ 97.265580] ret_from_fork+0x10/0x20 [ 97.265601] irq event stamp: 163438 [ 97.265613] hardirqs last enabled at (163437): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 97.265641] hardirqs last disabled at (163438): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 97.265664] softirqs last enabled at (163174): [<ffff800010010488>] _stext+0x488/0x5cc [ 97.265684] softirqs last disabled at (163169): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 97.265706] ---[ end trace 458e29685f12760e ]--- [ 98.742702] exynos-drm exynos-drm: [drm] fb0: exynos frame buffer device [ 98.752101] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
So, MIC-based pipeline SoC's are not working? like
Exynos5433 Decon -> Exynos MIC -> Exynos DSI -> s6e3ha2 DSI panel
If so, we can attach the add attach in MIC bridge so that it can link the downstream bridge ie DSI.
Thanks, Jagan.
On Wed, Feb 2, 2022 at 9:54 PM Jagan Teki jagan@amarulasolutions.com wrote:
Hi Marek,
On Fri, Jan 21, 2022 at 6:14 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
Hi Jagan,
On 21.01.2022 12:40, Jagan Teki wrote:
On Fri, Jan 21, 2022 at 5:06 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Please use drm-misc/drm-misc-next with below patches and then apply this series.
I don't have a good news. It doesn't work. The last patch even breaks DSI operation:
[ 4.520276] [drm] Exynos DRM: using 13800000.decon device for DMA mapping operations [ 4.520578] exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) [ 4.580473] exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) [ 4.580726] exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [ 4.584304] exynos-dsi 13900000.dsi: [drm:exynos_dsi_host_attach] Attached s6e3hf2 device [ 4.585141] exynos-drm exynos-drm: bound 13900000.dsi (ops exynos_dsi_component_ops) [ 4.593189] rc_core: Couldn't load IR keymap rc-cec [ 4.594133] Registered IR keymap rc-empty [ 4.598760] rc rc0: sii8620 as /devices/virtual/rc/rc0 [ 4.605219] input: sii8620 as /devices/virtual/rc/rc0/input1 [ 4.610238] exynos-drm exynos-drm: bound 13970000.hdmi (ops hdmi_component_ops) [ 4.920038] exynos-dsi 13900000.dsi: xfer timed out: 39 03 00 00 f0 5a 5a [ 5.024033] ------------[ cut here ]------------ [ 5.024055] [CRTC:49:crtc-0] vblank wait timed out [ 5.024129] WARNING: CPU: 4 PID: 151 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024171] Modules linked in: [ 5.024195] CPU: 4 PID: 151 Comm: kworker/4:7 Not tainted 5.16.0-rc5+ #11232 [ 5.024219] Hardware name: Samsung TM2E board (DT) [ 5.024232] Workqueue: events output_poll_execute [ 5.024262] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 5.024285] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024308] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024327] sp : ffff800013b5b970 [ 5.024340] x29: ffff800013b5b970 x28: 0000000000000000 x27: ffff00002437e400 [ 5.024391] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 5.024437] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 5.024482] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 5.024526] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 5.024571] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 5.024615] x11: 656820747563205b x10: 000000000000003a x9 : 000000007e82f035 [ 5.024661] x8 : ffff800011b66df8 x7 : ffff800013b5b740 x6 : 0000000000000001 [ 5.024704] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 0000000000000007 [ 5.024747] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 5.024791] Call trace: [ 5.024802] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024825] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 5.024845] commit_tail+0x9c/0x170 [ 5.024864] drm_atomic_helper_commit+0x188/0x3a0 [ 5.024884] drm_atomic_commit+0x54/0x68 [ 5.024906] drm_client_modeset_commit_atomic+0x260/0x288 [ 5.024927] drm_client_modeset_commit_locked+0x54/0x1c0 [ 5.024945] drm_client_modeset_commit+0x2c/0x50 [ 5.024962] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 5.024983] drm_fb_helper_set_par+0x38/0x70 [ 5.025000] drm_fb_helper_hotplug_event.part.29+0xb0/0xe0 [ 5.025018] drm_fb_helper_output_poll_changed+0x30/0x40 [ 5.025035] drm_kms_helper_hotplug_event+0x28/0x40 [ 5.025053] output_poll_execute+0xc4/0x1f0 [ 5.025071] process_one_work+0x29c/0x6e8 [ 5.025090] worker_thread+0x48/0x460 [ 5.025106] kthread+0x154/0x188 [ 5.025128] ret_from_fork+0x10/0x20 [ 5.025148] irq event stamp: 878 [ 5.025160] hardirqs last enabled at (877): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 5.025188] hardirqs last disabled at (878): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 5.025214] softirqs last enabled at (206): [<ffff800010010488>] _stext+0x488/0x5cc [ 5.025233] softirqs last disabled at (201): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 5.025256] ---[ end trace 458e29685f12760b ]--- [ 15.240069] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 15.240131] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 25.480001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 25.480031] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 35.720001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 35.720031] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 35.824013] ------------[ cut here ]------------ [ 35.824037] [CRTC:49:crtc-0] vblank wait timed out [ 35.824116] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824155] Modules linked in: [ 35.824180] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 35.824205] Hardware name: Samsung TM2E board (DT) [ 35.824221] Workqueue: events_unbound deferred_probe_work_func [ 35.824255] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 35.824281] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824304] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824325] sp : ffff80001386b380 [ 35.824339] x29: ffff80001386b380 x28: 0000000000000000 x27: ffff000023c91c00 [ 35.824395] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 35.824446] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 35.824495] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 35.824544] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 35.824594] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 35.824643] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 35.824693] x8 : ffff800011b66df8 x7 : ffff80001386b150 x6 : 0000000000000001 [ 35.824741] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 35.824788] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 35.824838] Call trace: [ 35.824851] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824875] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 35.824898] commit_tail+0x9c/0x170 [ 35.824918] drm_atomic_helper_commit+0x188/0x3a0 [ 35.824939] drm_atomic_commit+0x54/0x68 [ 35.824962] drm_client_modeset_commit_atomic+0x260/0x288 [ 35.824983] drm_client_modeset_commit_locked+0x54/0x1c0 [ 35.825003] drm_client_modeset_commit+0x2c/0x50 [ 35.825023] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 35.825043] drm_fb_helper_set_par+0x38/0x70 [ 35.825062] fbcon_init+0x440/0x4e0 [ 35.825085] visual_init+0xb0/0x108 [ 35.825107] do_bind_con_driver+0x1cc/0x3c0 [ 35.825127] do_take_over_console+0x148/0x1d8 [ 35.825148] do_fbcon_takeover+0x70/0xe8 [ 35.825170] fbcon_fb_registered+0x13c/0x150 [ 35.825192] register_framebuffer+0x1c4/0x340 [ 35.825211] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 35.825239] drm_fb_helper_initial_config+0x44/0x50 [ 35.825257] exynos_drm_fbdev_init+0x90/0x100 [ 35.825282] exynos_drm_bind+0x164/0x1a8 [ 35.825303] try_to_bring_up_master+0x15c/0x1c8 [ 35.825326] __component_add+0xa8/0x170 [ 35.825348] component_add+0x10/0x18 [ 35.825370] hdmi_probe+0x43c/0x6d0 [ 35.825389] platform_probe+0x90/0xd8 [ 35.825412] really_probe+0xb4/0x2e0 [ 35.825432] __driver_probe_device+0x78/0xd8 [ 35.825452] driver_probe_device+0x40/0x110 [ 35.825473] __device_attach_driver+0x9c/0xd8 [ 35.825494] bus_for_each_drv+0x70/0xc8 [ 35.825513] __device_attach+0xec/0x150 [ 35.825533] device_initial_probe+0x10/0x18 [ 35.825556] bus_probe_device+0x94/0xa0 [ 35.825575] deferred_probe_work_func+0x84/0xc0 [ 35.825595] process_one_work+0x29c/0x6e8 [ 35.825614] worker_thread+0x21c/0x460 [ 35.825631] kthread+0x154/0x188 [ 35.825653] ret_from_fork+0x10/0x20 [ 35.825673] irq event stamp: 162880 [ 35.825687] hardirqs last enabled at (162879): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 35.825716] hardirqs last disabled at (162880): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 35.825742] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 35.825763] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 35.825787] ---[ end trace 458e29685f12760c ]--- [ 45.960007] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 45.960039] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 56.200000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 56.200030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 66.440000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 66.440030] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 66.544003] ------------[ cut here ]------------ [ 66.544027] [CRTC:49:crtc-0] vblank wait timed out [ 66.544102] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544138] Modules linked in: [ 66.544162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 66.544186] Hardware name: Samsung TM2E board (DT) [ 66.544200] Workqueue: events_unbound deferred_probe_work_func [ 66.544233] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 66.544255] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544297] sp : ffff80001386b160 [ 66.544310] x29: ffff80001386b160 x28: 0000000000000000 x27: ffff000023d83500 [ 66.544363] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 66.544412] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 66.544461] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 66.544509] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 66.544558] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 66.544606] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 66.544655] x8 : ffff800011b66df8 x7 : ffff80001386af30 x6 : 0000000000000001 [ 66.544702] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 66.544749] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 66.544796] Call trace: [ 66.544808] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544830] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 66.544852] commit_tail+0x9c/0x170 [ 66.544871] drm_atomic_helper_commit+0x188/0x3a0 [ 66.544892] drm_atomic_commit+0x54/0x68 [ 66.544915] drm_client_modeset_commit_atomic+0x260/0x288 [ 66.544935] drm_client_modeset_commit_locked+0x54/0x1c0 [ 66.544954] drm_fb_helper_pan_display+0xb0/0x1c0 [ 66.544973] fb_pan_display+0xb8/0x158 [ 66.544990] bit_update_start+0x1c/0x40 [ 66.545013] fbcon_switch+0x308/0x458 [ 66.545034] redraw_screen+0x158/0x238 [ 66.545056] fbcon_prepare_logo+0x3cc/0x440 [ 66.545077] fbcon_init+0x380/0x4e0 [ 66.545098] visual_init+0xb0/0x108 [ 66.545118] do_bind_con_driver+0x1cc/0x3c0 [ 66.545137] do_take_over_console+0x148/0x1d8 [ 66.545158] do_fbcon_takeover+0x70/0xe8 [ 66.545178] fbcon_fb_registered+0x13c/0x150 [ 66.545199] register_framebuffer+0x1c4/0x340 [ 66.545217] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 66.545244] drm_fb_helper_initial_config+0x44/0x50 [ 66.545263] exynos_drm_fbdev_init+0x90/0x100 [ 66.545286] exynos_drm_bind+0x164/0x1a8 [ 66.545306] try_to_bring_up_master+0x15c/0x1c8 [ 66.545329] __component_add+0xa8/0x170 [ 66.545350] component_add+0x10/0x18 [ 66.545371] hdmi_probe+0x43c/0x6d0 [ 66.545389] platform_probe+0x90/0xd8 [ 66.545411] really_probe+0xb4/0x2e0 [ 66.545431] __driver_probe_device+0x78/0xd8 [ 66.545452] driver_probe_device+0x40/0x110 [ 66.545472] __device_attach_driver+0x9c/0xd8 [ 66.545493] bus_for_each_drv+0x70/0xc8 [ 66.545513] __device_attach+0xec/0x150 [ 66.545532] device_initial_probe+0x10/0x18 [ 66.545553] bus_probe_device+0x94/0xa0 [ 66.545573] deferred_probe_work_func+0x84/0xc0 [ 66.545592] process_one_work+0x29c/0x6e8 [ 66.545612] worker_thread+0x21c/0x460 [ 66.545628] kthread+0x154/0x188 [ 66.545651] ret_from_fork+0x10/0x20 [ 66.545671] irq event stamp: 163148 [ 66.545684] hardirqs last enabled at (163147): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 66.545712] hardirqs last disabled at (163148): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 66.545735] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 66.545754] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 66.545778] ---[ end trace 458e29685f12760d ]--- [ 66.589975] Console: switching to colour frame buffer device 200x160 [ 76.680050] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 76.680082] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 86.920001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 86.920030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 97.160001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 97.160029] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 97.264005] ------------[ cut here ]------------ [ 97.264029] [CRTC:49:crtc-0] vblank wait timed out [ 97.264103] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264139] Modules linked in: [ 97.264162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 97.264185] Hardware name: Samsung TM2E board (DT) [ 97.264199] Workqueue: events_unbound deferred_probe_work_func [ 97.264231] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 97.264254] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264298] sp : ffff80001386b290 [ 97.264310] x29: ffff80001386b290 x28: 0000000000000000 x27: ffff0000250a6a00 [ 97.264361] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 97.264409] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 97.264457] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 97.264505] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 97.264554] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 97.264603] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 97.264652] x8 : ffff800011b66df8 x7 : ffff80001386b060 x6 : 0000000000000001 [ 97.264699] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 97.264746] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 97.264794] Call trace: [ 97.264806] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264829] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 97.264852] commit_tail+0x9c/0x170 [ 97.264872] drm_atomic_helper_commit+0x188/0x3a0 [ 97.264892] drm_atomic_commit+0x54/0x68 [ 97.264915] drm_client_modeset_commit_atomic+0x260/0x288 [ 97.264936] drm_client_modeset_commit_locked+0x54/0x1c0 [ 97.264955] drm_fb_helper_pan_display+0xb0/0x1c0 [ 97.264974] fb_pan_display+0xb8/0x158 [ 97.264991] bit_update_start+0x1c/0x40 [ 97.265014] fbcon_switch+0x308/0x458 [ 97.265034] redraw_screen+0x158/0x238 [ 97.265056] do_bind_con_driver+0x2d0/0x3c0 [ 97.265075] do_take_over_console+0x148/0x1d8 [ 97.265096] do_fbcon_takeover+0x70/0xe8 [ 97.265117] fbcon_fb_registered+0x13c/0x150 [ 97.265138] register_framebuffer+0x1c4/0x340 [ 97.265156] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 97.265183] drm_fb_helper_initial_config+0x44/0x50 [ 97.265202] exynos_drm_fbdev_init+0x90/0x100 [ 97.265225] exynos_drm_bind+0x164/0x1a8 [ 97.265246] try_to_bring_up_master+0x15c/0x1c8 [ 97.265268] __component_add+0xa8/0x170 [ 97.265289] component_add+0x10/0x18 [ 97.265310] hdmi_probe+0x43c/0x6d0 [ 97.265327] platform_probe+0x90/0xd8 [ 97.265349] really_probe+0xb4/0x2e0 [ 97.265368] __driver_probe_device+0x78/0xd8 [ 97.265388] driver_probe_device+0x40/0x110 [ 97.265408] __device_attach_driver+0x9c/0xd8 [ 97.265428] bus_for_each_drv+0x70/0xc8 [ 97.265446] __device_attach+0xec/0x150 [ 97.265465] device_initial_probe+0x10/0x18 [ 97.265485] bus_probe_device+0x94/0xa0 [ 97.265505] deferred_probe_work_func+0x84/0xc0 [ 97.265524] process_one_work+0x29c/0x6e8 [ 97.265543] worker_thread+0x21c/0x460 [ 97.265559] kthread+0x154/0x188 [ 97.265580] ret_from_fork+0x10/0x20 [ 97.265601] irq event stamp: 163438 [ 97.265613] hardirqs last enabled at (163437): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 97.265641] hardirqs last disabled at (163438): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 97.265664] softirqs last enabled at (163174): [<ffff800010010488>] _stext+0x488/0x5cc [ 97.265684] softirqs last disabled at (163169): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 97.265706] ---[ end trace 458e29685f12760e ]--- [ 98.742702] exynos-drm exynos-drm: [drm] fb0: exynos frame buffer device [ 98.752101] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
So, MIC-based pipeline SoC's are not working? like
Exynos5433 Decon -> Exynos MIC -> Exynos DSI -> s6e3ha2 DSI panel
If so, we can attach the add attach in MIC bridge so that it can link the downstream bridge ie DSI.
Any further comments?
Thanks, Jagan.
Hi Marek,
On Tue, Feb 22, 2022 at 12:19 PM Jagan Teki jagan@amarulasolutions.com wrote:
On Wed, Feb 2, 2022 at 9:54 PM Jagan Teki jagan@amarulasolutions.com wrote:
Hi Marek,
On Fri, Jan 21, 2022 at 6:14 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
Hi Jagan,
On 21.01.2022 12:40, Jagan Teki wrote:
On Fri, Jan 21, 2022 at 5:06 PM Marek Szyprowski m.szyprowski@samsung.com wrote:
On 17.01.2022 09:42, Jagan Teki wrote:
Updated series about drm bridge conversion of exynos dsi.
Previous version can be accessible, here [1].
Patch 1: connector reset
Patch 2: panel_bridge API
Patch 3: bridge conversion
Patch 4: atomic functions
Patch 5: DSI init in pre_enable
Apply below patches to test on Exynos DSI:
- https://protect2.fireeye.com/v1/url?k=53bdf119-0c26c815-53bc7a56-000babff356...
- https://protect2.fireeye.com/v1/url?k=cb269ea3-94bda7af-cb2715ec-000babff356...
[1] https://protect2.fireeye.com/v1/url?k=ee1dae12-b186971e-ee1c255d-000babff356...
Any inputs?
I've tried a few times, but I am unable to find what is the base for this patchset. I always get a conflict around exynos_dsi_mode_set() function. I've tried current linux-next, drm-next, v5.16-rc1 and v5.16. It looks that I must have missed applying some patch before playing with this.
I've also tried to apply only the last patch, as if I got it right, it is the only difference between v4 and v5 and updated 'drm: of: Lookup if child node has panel or bridge'. In such case the board freezes during the drm initialization.
Please use drm-misc/drm-misc-next with below patches and then apply this series.
I don't have a good news. It doesn't work. The last patch even breaks DSI operation:
[ 4.520276] [drm] Exynos DRM: using 13800000.decon device for DMA mapping operations [ 4.520578] exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) [ 4.580473] exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) [ 4.580726] exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [ 4.584304] exynos-dsi 13900000.dsi: [drm:exynos_dsi_host_attach] Attached s6e3hf2 device [ 4.585141] exynos-drm exynos-drm: bound 13900000.dsi (ops exynos_dsi_component_ops) [ 4.593189] rc_core: Couldn't load IR keymap rc-cec [ 4.594133] Registered IR keymap rc-empty [ 4.598760] rc rc0: sii8620 as /devices/virtual/rc/rc0 [ 4.605219] input: sii8620 as /devices/virtual/rc/rc0/input1 [ 4.610238] exynos-drm exynos-drm: bound 13970000.hdmi (ops hdmi_component_ops) [ 4.920038] exynos-dsi 13900000.dsi: xfer timed out: 39 03 00 00 f0 5a 5a [ 5.024033] ------------[ cut here ]------------ [ 5.024055] [CRTC:49:crtc-0] vblank wait timed out [ 5.024129] WARNING: CPU: 4 PID: 151 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024171] Modules linked in: [ 5.024195] CPU: 4 PID: 151 Comm: kworker/4:7 Not tainted 5.16.0-rc5+ #11232 [ 5.024219] Hardware name: Samsung TM2E board (DT) [ 5.024232] Workqueue: events output_poll_execute [ 5.024262] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 5.024285] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024308] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024327] sp : ffff800013b5b970 [ 5.024340] x29: ffff800013b5b970 x28: 0000000000000000 x27: ffff00002437e400 [ 5.024391] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 5.024437] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 5.024482] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 5.024526] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 5.024571] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 5.024615] x11: 656820747563205b x10: 000000000000003a x9 : 000000007e82f035 [ 5.024661] x8 : ffff800011b66df8 x7 : ffff800013b5b740 x6 : 0000000000000001 [ 5.024704] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 0000000000000007 [ 5.024747] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 5.024791] Call trace: [ 5.024802] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 5.024825] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 5.024845] commit_tail+0x9c/0x170 [ 5.024864] drm_atomic_helper_commit+0x188/0x3a0 [ 5.024884] drm_atomic_commit+0x54/0x68 [ 5.024906] drm_client_modeset_commit_atomic+0x260/0x288 [ 5.024927] drm_client_modeset_commit_locked+0x54/0x1c0 [ 5.024945] drm_client_modeset_commit+0x2c/0x50 [ 5.024962] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 5.024983] drm_fb_helper_set_par+0x38/0x70 [ 5.025000] drm_fb_helper_hotplug_event.part.29+0xb0/0xe0 [ 5.025018] drm_fb_helper_output_poll_changed+0x30/0x40 [ 5.025035] drm_kms_helper_hotplug_event+0x28/0x40 [ 5.025053] output_poll_execute+0xc4/0x1f0 [ 5.025071] process_one_work+0x29c/0x6e8 [ 5.025090] worker_thread+0x48/0x460 [ 5.025106] kthread+0x154/0x188 [ 5.025128] ret_from_fork+0x10/0x20 [ 5.025148] irq event stamp: 878 [ 5.025160] hardirqs last enabled at (877): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 5.025188] hardirqs last disabled at (878): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 5.025214] softirqs last enabled at (206): [<ffff800010010488>] _stext+0x488/0x5cc [ 5.025233] softirqs last disabled at (201): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 5.025256] ---[ end trace 458e29685f12760b ]--- [ 15.240069] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 15.240131] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 25.480001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 25.480031] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 35.720001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 35.720031] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 35.824013] ------------[ cut here ]------------ [ 35.824037] [CRTC:49:crtc-0] vblank wait timed out [ 35.824116] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824155] Modules linked in: [ 35.824180] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 35.824205] Hardware name: Samsung TM2E board (DT) [ 35.824221] Workqueue: events_unbound deferred_probe_work_func [ 35.824255] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 35.824281] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824304] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824325] sp : ffff80001386b380 [ 35.824339] x29: ffff80001386b380 x28: 0000000000000000 x27: ffff000023c91c00 [ 35.824395] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 35.824446] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 35.824495] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 35.824544] x17: 0048000000000a11 x16: 0000000000000028 x15: ffff800011b66df8 [ 35.824594] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 35.824643] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 35.824693] x8 : ffff800011b66df8 x7 : ffff80001386b150 x6 : 0000000000000001 [ 35.824741] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 35.824788] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 35.824838] Call trace: [ 35.824851] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 35.824875] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 35.824898] commit_tail+0x9c/0x170 [ 35.824918] drm_atomic_helper_commit+0x188/0x3a0 [ 35.824939] drm_atomic_commit+0x54/0x68 [ 35.824962] drm_client_modeset_commit_atomic+0x260/0x288 [ 35.824983] drm_client_modeset_commit_locked+0x54/0x1c0 [ 35.825003] drm_client_modeset_commit+0x2c/0x50 [ 35.825023] __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xf8 [ 35.825043] drm_fb_helper_set_par+0x38/0x70 [ 35.825062] fbcon_init+0x440/0x4e0 [ 35.825085] visual_init+0xb0/0x108 [ 35.825107] do_bind_con_driver+0x1cc/0x3c0 [ 35.825127] do_take_over_console+0x148/0x1d8 [ 35.825148] do_fbcon_takeover+0x70/0xe8 [ 35.825170] fbcon_fb_registered+0x13c/0x150 [ 35.825192] register_framebuffer+0x1c4/0x340 [ 35.825211] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 35.825239] drm_fb_helper_initial_config+0x44/0x50 [ 35.825257] exynos_drm_fbdev_init+0x90/0x100 [ 35.825282] exynos_drm_bind+0x164/0x1a8 [ 35.825303] try_to_bring_up_master+0x15c/0x1c8 [ 35.825326] __component_add+0xa8/0x170 [ 35.825348] component_add+0x10/0x18 [ 35.825370] hdmi_probe+0x43c/0x6d0 [ 35.825389] platform_probe+0x90/0xd8 [ 35.825412] really_probe+0xb4/0x2e0 [ 35.825432] __driver_probe_device+0x78/0xd8 [ 35.825452] driver_probe_device+0x40/0x110 [ 35.825473] __device_attach_driver+0x9c/0xd8 [ 35.825494] bus_for_each_drv+0x70/0xc8 [ 35.825513] __device_attach+0xec/0x150 [ 35.825533] device_initial_probe+0x10/0x18 [ 35.825556] bus_probe_device+0x94/0xa0 [ 35.825575] deferred_probe_work_func+0x84/0xc0 [ 35.825595] process_one_work+0x29c/0x6e8 [ 35.825614] worker_thread+0x21c/0x460 [ 35.825631] kthread+0x154/0x188 [ 35.825653] ret_from_fork+0x10/0x20 [ 35.825673] irq event stamp: 162880 [ 35.825687] hardirqs last enabled at (162879): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 35.825716] hardirqs last disabled at (162880): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 35.825742] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 35.825763] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 35.825787] ---[ end trace 458e29685f12760c ]--- [ 45.960007] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 45.960039] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 56.200000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 56.200030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 66.440000] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 66.440030] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 66.544003] ------------[ cut here ]------------ [ 66.544027] [CRTC:49:crtc-0] vblank wait timed out [ 66.544102] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544138] Modules linked in: [ 66.544162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 66.544186] Hardware name: Samsung TM2E board (DT) [ 66.544200] Workqueue: events_unbound deferred_probe_work_func [ 66.544233] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 66.544255] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544297] sp : ffff80001386b160 [ 66.544310] x29: ffff80001386b160 x28: 0000000000000000 x27: ffff000023d83500 [ 66.544363] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 66.544412] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 66.544461] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 66.544509] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 66.544558] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 66.544606] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 66.544655] x8 : ffff800011b66df8 x7 : ffff80001386af30 x6 : 0000000000000001 [ 66.544702] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 66.544749] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 66.544796] Call trace: [ 66.544808] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 66.544830] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 66.544852] commit_tail+0x9c/0x170 [ 66.544871] drm_atomic_helper_commit+0x188/0x3a0 [ 66.544892] drm_atomic_commit+0x54/0x68 [ 66.544915] drm_client_modeset_commit_atomic+0x260/0x288 [ 66.544935] drm_client_modeset_commit_locked+0x54/0x1c0 [ 66.544954] drm_fb_helper_pan_display+0xb0/0x1c0 [ 66.544973] fb_pan_display+0xb8/0x158 [ 66.544990] bit_update_start+0x1c/0x40 [ 66.545013] fbcon_switch+0x308/0x458 [ 66.545034] redraw_screen+0x158/0x238 [ 66.545056] fbcon_prepare_logo+0x3cc/0x440 [ 66.545077] fbcon_init+0x380/0x4e0 [ 66.545098] visual_init+0xb0/0x108 [ 66.545118] do_bind_con_driver+0x1cc/0x3c0 [ 66.545137] do_take_over_console+0x148/0x1d8 [ 66.545158] do_fbcon_takeover+0x70/0xe8 [ 66.545178] fbcon_fb_registered+0x13c/0x150 [ 66.545199] register_framebuffer+0x1c4/0x340 [ 66.545217] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 66.545244] drm_fb_helper_initial_config+0x44/0x50 [ 66.545263] exynos_drm_fbdev_init+0x90/0x100 [ 66.545286] exynos_drm_bind+0x164/0x1a8 [ 66.545306] try_to_bring_up_master+0x15c/0x1c8 [ 66.545329] __component_add+0xa8/0x170 [ 66.545350] component_add+0x10/0x18 [ 66.545371] hdmi_probe+0x43c/0x6d0 [ 66.545389] platform_probe+0x90/0xd8 [ 66.545411] really_probe+0xb4/0x2e0 [ 66.545431] __driver_probe_device+0x78/0xd8 [ 66.545452] driver_probe_device+0x40/0x110 [ 66.545472] __device_attach_driver+0x9c/0xd8 [ 66.545493] bus_for_each_drv+0x70/0xc8 [ 66.545513] __device_attach+0xec/0x150 [ 66.545532] device_initial_probe+0x10/0x18 [ 66.545553] bus_probe_device+0x94/0xa0 [ 66.545573] deferred_probe_work_func+0x84/0xc0 [ 66.545592] process_one_work+0x29c/0x6e8 [ 66.545612] worker_thread+0x21c/0x460 [ 66.545628] kthread+0x154/0x188 [ 66.545651] ret_from_fork+0x10/0x20 [ 66.545671] irq event stamp: 163148 [ 66.545684] hardirqs last enabled at (163147): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 66.545712] hardirqs last disabled at (163148): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 66.545735] softirqs last enabled at (162726): [<ffff800010010488>] _stext+0x488/0x5cc [ 66.545754] softirqs last disabled at (162721): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 66.545778] ---[ end trace 458e29685f12760d ]--- [ 66.589975] Console: switching to colour frame buffer device 200x160 [ 76.680050] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 76.680082] exynos-drm exynos-drm: [drm] *ERROR* [CRTC:49:crtc-0] commit wait timed out [ 86.920001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 86.920030] exynos-drm exynos-drm: [drm] *ERROR* [CONNECTOR:68:DSI-1] commit wait timed out [ 97.160001] exynos-drm exynos-drm: [drm] *ERROR* flip_done timed out [ 97.160029] exynos-drm exynos-drm: [drm] *ERROR* [PLANE:37:plane-2] commit wait timed out [ 97.264005] ------------[ cut here ]------------ [ 97.264029] [CRTC:49:crtc-0] vblank wait timed out [ 97.264103] WARNING: CPU: 7 PID: 74 at drivers/gpu/drm/drm_atomic_helper.c:1530 drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264139] Modules linked in: [ 97.264162] CPU: 7 PID: 74 Comm: kworker/u16:1 Tainted: G W 5.16.0-rc5+ #11232 [ 97.264185] Hardware name: Samsung TM2E board (DT) [ 97.264199] Workqueue: events_unbound deferred_probe_work_func [ 97.264231] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 97.264254] pc : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264277] lr : drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264298] sp : ffff80001386b290 [ 97.264310] x29: ffff80001386b290 x28: 0000000000000000 x27: ffff0000250a6a00 [ 97.264361] x26: 0000000000000000 x25: 0000000000000000 x24: ffff800011aa0c60 [ 97.264409] x23: 0000000000000001 x22: ffff000025113000 x21: 0000000000000001 [ 97.264457] x20: ffff0000316fc800 x19: 0000000000000000 x18: ffffffffffffffff [ 97.264505] x17: 0048000000000a11 x16: 0a020a010a110a00 x15: ffff800011b66df8 [ 97.264554] x14: 0000000000000000 x13: 0a74756f2064656d x12: 6974207469617720 [ 97.264603] x11: 656820747563205b x10: 000000000000003a x9 : 0000000088c3aa19 [ 97.264652] x8 : ffff800011b66df8 x7 : ffff80001386b060 x6 : 0000000000000001 [ 97.264699] x5 : 0000000000000001 x4 : 0000000000000000 x3 : 000000000000000c [ 97.264746] x2 : ffff800012524ea0 x1 : 68a66f6a76622200 x0 : 0000000000000000 [ 97.264794] Call trace: [ 97.264806] drm_atomic_helper_wait_for_vblanks.part.24+0x298/0x2a8 [ 97.264829] drm_atomic_helper_commit_tail_rpm+0x60/0x78 [ 97.264852] commit_tail+0x9c/0x170 [ 97.264872] drm_atomic_helper_commit+0x188/0x3a0 [ 97.264892] drm_atomic_commit+0x54/0x68 [ 97.264915] drm_client_modeset_commit_atomic+0x260/0x288 [ 97.264936] drm_client_modeset_commit_locked+0x54/0x1c0 [ 97.264955] drm_fb_helper_pan_display+0xb0/0x1c0 [ 97.264974] fb_pan_display+0xb8/0x158 [ 97.264991] bit_update_start+0x1c/0x40 [ 97.265014] fbcon_switch+0x308/0x458 [ 97.265034] redraw_screen+0x158/0x238 [ 97.265056] do_bind_con_driver+0x2d0/0x3c0 [ 97.265075] do_take_over_console+0x148/0x1d8 [ 97.265096] do_fbcon_takeover+0x70/0xe8 [ 97.265117] fbcon_fb_registered+0x13c/0x150 [ 97.265138] register_framebuffer+0x1c4/0x340 [ 97.265156] __drm_fb_helper_initial_config_and_unlock+0x360/0x548 [ 97.265183] drm_fb_helper_initial_config+0x44/0x50 [ 97.265202] exynos_drm_fbdev_init+0x90/0x100 [ 97.265225] exynos_drm_bind+0x164/0x1a8 [ 97.265246] try_to_bring_up_master+0x15c/0x1c8 [ 97.265268] __component_add+0xa8/0x170 [ 97.265289] component_add+0x10/0x18 [ 97.265310] hdmi_probe+0x43c/0x6d0 [ 97.265327] platform_probe+0x90/0xd8 [ 97.265349] really_probe+0xb4/0x2e0 [ 97.265368] __driver_probe_device+0x78/0xd8 [ 97.265388] driver_probe_device+0x40/0x110 [ 97.265408] __device_attach_driver+0x9c/0xd8 [ 97.265428] bus_for_each_drv+0x70/0xc8 [ 97.265446] __device_attach+0xec/0x150 [ 97.265465] device_initial_probe+0x10/0x18 [ 97.265485] bus_probe_device+0x94/0xa0 [ 97.265505] deferred_probe_work_func+0x84/0xc0 [ 97.265524] process_one_work+0x29c/0x6e8 [ 97.265543] worker_thread+0x21c/0x460 [ 97.265559] kthread+0x154/0x188 [ 97.265580] ret_from_fork+0x10/0x20 [ 97.265601] irq event stamp: 163438 [ 97.265613] hardirqs last enabled at (163437): [<ffff80001010e9fc>] vprintk_emit+0x2bc/0x2f8 [ 97.265641] hardirqs last disabled at (163438): [<ffff80001100fccc>] el1_dbg+0x24/0x88 [ 97.265664] softirqs last enabled at (163174): [<ffff800010010488>] _stext+0x488/0x5cc [ 97.265684] softirqs last disabled at (163169): [<ffff800010095718>] irq_exit_rcu+0x168/0x1a8 [ 97.265706] ---[ end trace 458e29685f12760e ]--- [ 98.742702] exynos-drm exynos-drm: [drm] fb0: exynos frame buffer device [ 98.752101] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
So, MIC-based pipeline SoC's are not working? like
Exynos5433 Decon -> Exynos MIC -> Exynos DSI -> s6e3ha2 DSI panel
If so, we can attach the add attach in MIC bridge so that it can link the downstream bridge ie DSI.
Any further comments?
Please check the below patch. as I stated, I have moved in_bridge away from DSI.
Author: Jagan Teki jagan@amarulasolutions.com Date: Tue Feb 22 12:57:00 2022 +0530
exynos: drm: dsi: Attach in_bridge in MIC driver
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index b7d0a4aead0a..741c046513e8 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1660,11 +1660,6 @@ static int exynos_dsi_of_read_u32(const struct device_node *np, return ret; }
-enum { - DSI_PORT_IN, - DSI_PORT_OUT -}; - static int exynos_dsi_parse_dt(struct exynos_dsi *dsi) { struct device *dev = dsi->dev; @@ -1695,8 +1690,6 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, struct exynos_dsi *dsi = dev_get_drvdata(dev); struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm_dev = data; - struct device_node *in_bridge_node; - struct drm_bridge *in_bridge; int ret;
drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS); @@ -1707,14 +1700,6 @@ static int exynos_dsi_bind(struct device *dev, struct device *master, if (ret < 0) return ret;
- in_bridge_node = of_graph_get_remote_node(dev->of_node, DSI_PORT_IN, 0); - if (in_bridge_node) { - in_bridge = of_drm_find_bridge(in_bridge_node); - if (in_bridge) - drm_bridge_attach(encoder, in_bridge, NULL, 0); - of_node_put(in_bridge_node); - } - return mipi_dsi_host_register(&dsi->dsi_host); }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index 32672bf8ae4a..550811dc0fc6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -102,6 +102,7 @@ struct exynos_mic { struct videomode vm; struct drm_encoder *encoder; struct drm_bridge bridge; + struct drm_bridge *next_bridge;
bool enabled; }; @@ -298,12 +299,22 @@ static void mic_pre_enable(struct drm_bridge *bridge)
static void mic_enable(struct drm_bridge *bridge) { }
+static int mic_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct exynos_mic *mic = bridge->driver_private; + + return drm_bridge_attach(bridge->encoder, mic->next_bridge, + &mic->bridge, flags); +} + static const struct drm_bridge_funcs mic_bridge_funcs = { .disable = mic_disable, .post_disable = mic_post_disable, .mode_set = mic_mode_set, .pre_enable = mic_pre_enable, .enable = mic_enable, + .attach = mic_attach, };
static int exynos_mic_bind(struct device *dev, struct device *master, @@ -377,6 +388,7 @@ static int exynos_mic_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct exynos_mic *mic; + struct device_node *remote; struct resource res; int ret, i;
@@ -420,6 +432,16 @@ static int exynos_mic_probe(struct platform_device *pdev) } }
+ remote = of_graph_get_remote_node(dev->of_node, 1, 0); + mic->next_bridge = of_drm_find_bridge(remote); + if (IS_ERR(mic->next_bridge)) { + DRM_DEV_ERROR(dev, "mic: Failed to find next bridge\n"); + ret = PTR_ERR(mic->next_bridge); + goto err; + } + + of_node_put(remote); + platform_set_drvdata(pdev, mic);
mic->bridge.funcs = &mic_bridge_funcs;
Repo: https://github.com/openedev/kernel/tree/exynos-dsi
Thanks, Jagan.
dri-devel@lists.freedesktop.org