Skip to contentSkip to conversation

drm: exynos: dsi: Convert drm bridge

PATCH Superseded Jagan Teki 4 participants 22 messages Nov 22, 2021 – Jan 11, 2022

Subsystems (3)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

cover drm: exynos: dsi: Convert drm bridge

This is initial step to convert exynos dsi to bridge and make use of i.MX8MMini.

The previous RFC series for this is here [1]

I'm trying to add minimalist patches as I don't have hardware to validate, the next plan is to add panel_bridge and other improvements.

[1] https://www.spinics.net/lists/devicetree/msg431794.html

Any Inputs?
Jagan.

Jagan Teki (2):
drm: exynos: dsi: Convert to bridge driver
drm: exynos: dsi: Add mode_set function

 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 86 ++++++++++++++++++-------
 1 file changed, 63 insertions(+), 23 deletions(-)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/2 drm: exynos: dsi: Convert to bridge driver

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 73 +++++++++++++++++--------
 1 file changed, 51 insertions(+), 22 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +51 -22
index 8d137857818c..174590f543c3 100644
@@ -257,6 +257,7 @@ struct exynos_dsi {
 	struct drm_connector connector;
 	struct drm_panel *panel;
 	struct list_head bridge_chain;
+	struct drm_bridge bridge;
 	struct drm_bridge *out_bridge;
 	struct device *dev;
 
@@ -287,9 +288,9 @@ 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)
+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 {
@@ -1374,9 +1375,10 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi)
 	}
 }
 
-static void exynos_dsi_enable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_enable(struct drm_bridge *bridge,
+				     struct drm_bridge_state *old_bridge_state)
 {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct exynos_dsi *dsi = bridge_to_dsi(bridge);
 	struct drm_bridge *iter;
 	int ret;
 
@@ -1399,7 +1401,8 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
 		list_for_each_entry_reverse(iter, &dsi->bridge_chain,
 					    chain_node) {
 			if (iter->funcs->pre_enable)
-				iter->funcs->pre_enable(iter);
+				iter->funcs->atomic_pre_enable(iter,
+							       old_bridge_state);
 		}
 	}
 
@@ -1413,7 +1416,7 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
 	} else {
 		list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
 			if (iter->funcs->enable)
-				iter->funcs->enable(iter);
+				iter->funcs->atomic_enable(iter, old_bridge_state);
 		}
 	}
 
@@ -1429,9 +1432,10 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
 	pm_runtime_put(dsi->dev);
 }
 
-static void exynos_dsi_disable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_disable(struct drm_bridge *bridge,
+				      struct drm_bridge_state *old_bridge_state)
 {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct exynos_dsi *dsi = bridge_to_dsi(bridge);
 	struct drm_bridge *iter;
 
 	if (!(dsi->state & DSIM_STATE_ENABLED))
@@ -1443,7 +1447,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
 	list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) {
 		if (iter->funcs->disable)
-			iter->funcs->disable(iter);
+			iter->funcs->atomic_disable(iter, old_bridge_state);
 	}
 
 	exynos_dsi_set_display_enable(dsi, false);
@@ -1451,7 +1455,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
 	list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
 		if (iter->funcs->post_disable)
-			iter->funcs->post_disable(iter);
+			iter->funcs->atomic_post_disable(iter, old_bridge_state);
 	}
 
 	dsi->state &= ~DSIM_STATE_ENABLED;
@@ -1494,9 +1498,9 @@ 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)
+static int exynos_dsi_create_connector(struct exynos_dsi *dsi)
 {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct drm_encoder *encoder = &dsi->encoder;
 	struct drm_connector *connector = &dsi->connector;
 	struct drm_device *drm = encoder->dev;
 	int ret;
@@ -1522,9 +1526,21 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
 	return 0;
 }
 
-static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
-	.enable = exynos_dsi_enable,
-	.disable = exynos_dsi_disable,
+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, 0);
+}
+
+static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
+	.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_enable		= exynos_dsi_atomic_enable,
+	.atomic_disable		= exynos_dsi_atomic_disable,
+	.attach			= exynos_dsi_attach,
 };
 
 MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);
@@ -1543,7 +1559,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
 		dsi->out_bridge = out_bridge;
 		list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain);
 	} else {
-		int ret = exynos_dsi_create_connector(encoder);
+		int ret = exynos_dsi_create_connector(dsi);
 
 		if (ret) {
 			DRM_DEV_ERROR(dsi->dev,
@@ -1596,7 +1612,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host,
 
 	if (dsi->panel) {
 		mutex_lock(&drm->mode_config.mutex);
-		exynos_dsi_disable(&dsi->encoder);
+		exynos_dsi_atomic_disable(&dsi->bridge, NULL);
 		dsi->panel = NULL;
 		dsi->connector.status = connector_status_disconnected;
 		mutex_unlock(&drm->mode_config.mutex);
@@ -1702,12 +1718,16 @@ 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;
 
+	ret = drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0);
+	if (ret) {
+		drm_encoder_cleanup(&dsi->encoder);
+		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);
@@ -1723,10 +1743,9 @@ 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_atomic_disable(&dsi->bridge, NULL);
+	drm_encoder_cleanup(&dsi->encoder);
 	mipi_dsi_host_unregister(&dsi->dsi_host);
 }
 
@@ -1819,6 +1838,12 @@ 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;
+
+	drm_bridge_add(&dsi->bridge);
+
 	ret = component_add(dev, &exynos_dsi_component_ops);
 	if (ret)
 		goto err_disable_runtime;
@@ -1833,6 +1858,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 
 static int exynos_dsi_remove(struct platform_device *pdev)
 {
+	struct exynos_dsi *dsi = platform_get_drvdata(pdev);
+
+	drm_bridge_remove(&dsi->bridge);
+
 	pm_runtime_disable(&pdev->dev);
 
 	component_del(&pdev->dev, &exynos_dsi_component_ops);
Signature · 1 line
2.25.1
author
#2 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek.

Quoted 211 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 73 +++++++++++++++++--------
 1 file changed, 51 insertions(+), 22 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +47 -22
index 8d137857818c..174590f543c3 100644
@@ -257,6 +257,7 @@ struct exynos_dsi {
        struct drm_connector connector;
        struct drm_panel *panel;
        struct list_head bridge_chain;
+       struct drm_bridge bridge;
        struct drm_bridge *out_bridge;
        struct device *dev;
 
@@ -287,9 +288,9 @@ 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)
+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 {
@@ -1374,9 +1375,10 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi)
        }
 }
 
-static void exynos_dsi_enable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_enable(struct drm_bridge *bridge,
+                                    struct drm_bridge_state *old_bridge_state)
 {
-       struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+       struct exynos_dsi *dsi = bridge_to_dsi(bridge);
        struct drm_bridge *iter;
        int ret;
 
@@ -1399,7 +1401,8 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
                list_for_each_entry_reverse(iter, &dsi->bridge_chain,
                                            chain_node) {
                        if (iter->funcs->pre_enable)
-                               iter->funcs->pre_enable(iter);
+                               iter->funcs->atomic_pre_enable(iter,
+                                                              old_bridge_state);
                }
        }
 
@@ -1413,7 +1416,7 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
        } else {
                list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
                        if (iter->funcs->enable)
-                               iter->funcs->enable(iter);
+                               iter->funcs->atomic_enable(iter, old_bridge_state);
                }
        }
 
@@ -1429,9 +1432,10 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
        pm_runtime_put(dsi->dev);
 }
 
-static void exynos_dsi_disable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_disable(struct drm_bridge *bridge,
+                                     struct drm_bridge_state *old_bridge_state)
 {
-       struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+       struct exynos_dsi *dsi = bridge_to_dsi(bridge);
        struct drm_bridge *iter;
 
        if (!(dsi->state & DSIM_STATE_ENABLED))
@@ -1443,7 +1447,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
        list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) {
                if (iter->funcs->disable)
-                       iter->funcs->disable(iter);
+                       iter->funcs->atomic_disable(iter, old_bridge_state);
        }
 
        exynos_dsi_set_display_enable(dsi, false);
@@ -1451,7 +1455,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
        list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
                if (iter->funcs->post_disable)
-                       iter->funcs->post_disable(iter);
+                       iter->funcs->atomic_post_disable(iter, old_bridge_state);
        }
 
        dsi->state &= ~DSIM_STATE_ENABLED;
@@ -1494,9 +1498,9 @@ 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)
+static int exynos_dsi_create_connector(struct exynos_dsi *dsi)
 {
-       struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+       struct drm_encoder *encoder = &dsi->encoder;
        struct drm_connector *connector = &dsi->connector;
        struct drm_device *drm = encoder->dev;
        int ret;
@@ -1522,9 +1526,21 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
        return 0;
 }
 
-static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
-       .enable = exynos_dsi_enable,
-       .disable = exynos_dsi_disable,
+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, 0);
+}
+
+static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
+       .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_enable          = exynos_dsi_atomic_enable,
+       .atomic_disable         = exynos_dsi_atomic_disable,
+       .attach                 = exynos_dsi_attach,
 };
 
 MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);
@@ -1543,7 +1559,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
                dsi->out_bridge = out_bridge;
                list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain);
        } else {
-               int ret = exynos_dsi_create_connector(encoder);
+               int ret = exynos_dsi_create_connector(dsi);
 
                if (ret) {
                        DRM_DEV_ERROR(dsi->dev,
@@ -1596,7 +1612,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host,
 
        if (dsi->panel) {
                mutex_lock(&drm->mode_config.mutex);
-               exynos_dsi_disable(&dsi->encoder);
+               exynos_dsi_atomic_disable(&dsi->bridge, NULL);
                dsi->panel = NULL;
                dsi->connector.status = connector_status_disconnected;
                mutex_unlock(&drm->mode_config.mutex);
@@ -1702,12 +1718,16 @@ 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;
 
+       ret = drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0);
+       if (ret) {
+               drm_encoder_cleanup(&dsi->encoder);
+               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);
@@ -1723,10 +1743,9 @@ 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_atomic_disable(&dsi->bridge, NULL);
+       drm_encoder_cleanup(&dsi->encoder);
        mipi_dsi_host_unregister(&dsi->dsi_host);
 }
 
@@ -1819,6 +1838,12 @@ 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;
+
+       drm_bridge_add(&dsi->bridge);
+
        ret = component_add(dev, &exynos_dsi_component_ops);
        if (ret)
                goto err_disable_runtime;

drivers/gpu/drm/exynos/exynos_drm_dsi.c static int exynos_dsi_probe(struct platform_device *pdev) · line 1867

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_dsi.c +4 -0
@@ -1833,6 +1858,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 
 static int exynos_dsi_remove(struct platform_device *pdev)
 {
+       struct exynos_dsi *dsi = platform_get_drvdata(pdev);
+
+       drm_bridge_remove(&dsi->bridge);
+
        pm_runtime_disable(&pdev->dev);
 
        component_del(&pdev->dev, &exynos_dsi_component_ops);

Can you please test this on Panel and Bridge devices, I've consecutive patches to move this driver to bridge in order to i.MX8MM, testing from your side would really helpful.

Thanks,
Jagan.

#3 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

In reply to Jagan Teki
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
  decon_atomic_disable+0x58/0xd4
  decon_unbind+0x1c/0x3c
  component_unbind+0x38/0x60
  component_bind_all+0x16c/0x25c
  exynos_drm_bind+0x104/0x1bc
  try_to_bring_up_master+0x164/0x1d0
  __component_add+0xa8/0x174
  component_add+0x14/0x20
  hdmi_probe+0x438/0x710
  platform_probe+0x68/0xe0
  really_probe.part.0+0x9c/0x31c
  __driver_probe_device+0x98/0x144
  driver_probe_device+0xc8/0x160
  __device_attach_driver+0xb8/0x120
  bus_for_each_drv+0x78/0xd0
  __device_attach+0xd8/0x180
  device_initial_probe+0x14/0x20
  bus_probe_device+0x9c/0xa4
  deferred_probe_work_func+0x88/0xc4
  process_one_work+0x288/0x6f0
  worker_thread+0x74/0x470
  kthread+0x188/0x194
  ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal 

exception ]---

I will try to debug it a bit more once I find some spare time. I've applied only the first patch.

Quoted 191 lines
  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 73 +++++++++++++++++--------
  1 file changed, 51 insertions(+), 22 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +47 -22
index 8d137857818c..174590f543c3 100644
@@ -257,6 +257,7 @@ struct exynos_dsi {
  	struct drm_connector connector;
  	struct drm_panel *panel;
  	struct list_head bridge_chain;
+	struct drm_bridge bridge;
  	struct drm_bridge *out_bridge;
  	struct device *dev;
 
@@ -287,9 +288,9 @@ 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)
+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 {
@@ -1374,9 +1375,10 @@ static void exynos_dsi_unregister_te_irq(struct exynos_dsi *dsi)
  	}
  }
 
-static void exynos_dsi_enable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_enable(struct drm_bridge *bridge,
+				     struct drm_bridge_state *old_bridge_state)
  {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct exynos_dsi *dsi = bridge_to_dsi(bridge);
  	struct drm_bridge *iter;
  	int ret;
 
@@ -1399,7 +1401,8 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
  		list_for_each_entry_reverse(iter, &dsi->bridge_chain,
  					    chain_node) {
  			if (iter->funcs->pre_enable)
-				iter->funcs->pre_enable(iter);
+				iter->funcs->atomic_pre_enable(iter,
+							       old_bridge_state);
  		}
  	}
 
@@ -1413,7 +1416,7 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
  	} else {
  		list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
  			if (iter->funcs->enable)
-				iter->funcs->enable(iter);
+				iter->funcs->atomic_enable(iter, old_bridge_state);
  		}
  	}
 
@@ -1429,9 +1432,10 @@ static void exynos_dsi_enable(struct drm_encoder *encoder)
  	pm_runtime_put(dsi->dev);
  }
 
-static void exynos_dsi_disable(struct drm_encoder *encoder)
+static void exynos_dsi_atomic_disable(struct drm_bridge *bridge,
+				      struct drm_bridge_state *old_bridge_state)
  {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct exynos_dsi *dsi = bridge_to_dsi(bridge);
  	struct drm_bridge *iter;
 
  	if (!(dsi->state & DSIM_STATE_ENABLED))
@@ -1443,7 +1447,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
  	list_for_each_entry_reverse(iter, &dsi->bridge_chain, chain_node) {
  		if (iter->funcs->disable)
-			iter->funcs->disable(iter);
+			iter->funcs->atomic_disable(iter, old_bridge_state);
  	}
 
  	exynos_dsi_set_display_enable(dsi, false);
@@ -1451,7 +1455,7 @@ static void exynos_dsi_disable(struct drm_encoder *encoder)
 
  	list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
  		if (iter->funcs->post_disable)
-			iter->funcs->post_disable(iter);
+			iter->funcs->atomic_post_disable(iter, old_bridge_state);
  	}
 
  	dsi->state &= ~DSIM_STATE_ENABLED;
@@ -1494,9 +1498,9 @@ 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)
+static int exynos_dsi_create_connector(struct exynos_dsi *dsi)
  {
-	struct exynos_dsi *dsi = encoder_to_dsi(encoder);
+	struct drm_encoder *encoder = &dsi->encoder;
  	struct drm_connector *connector = &dsi->connector;
  	struct drm_device *drm = encoder->dev;
  	int ret;
@@ -1522,9 +1526,21 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
  	return 0;
  }
 
-static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
-	.enable = exynos_dsi_enable,
-	.disable = exynos_dsi_disable,
+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, 0);
+}
+
+static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
+	.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_enable		= exynos_dsi_atomic_enable,
+	.atomic_disable		= exynos_dsi_atomic_disable,
+	.attach			= exynos_dsi_attach,
  };
 
  MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);
@@ -1543,7 +1559,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
  		dsi->out_bridge = out_bridge;
  		list_splice_init(&encoder->bridge_chain, &dsi->bridge_chain);
  	} else {
-		int ret = exynos_dsi_create_connector(encoder);
+		int ret = exynos_dsi_create_connector(dsi);
 
  		if (ret) {
  			DRM_DEV_ERROR(dsi->dev,
@@ -1596,7 +1612,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host,
 
  	if (dsi->panel) {
  		mutex_lock(&drm->mode_config.mutex);
-		exynos_dsi_disable(&dsi->encoder);
+		exynos_dsi_atomic_disable(&dsi->bridge, NULL);
  		dsi->panel = NULL;
  		dsi->connector.status = connector_status_disconnected;
  		mutex_unlock(&drm->mode_config.mutex);
@@ -1702,12 +1718,16 @@ 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;
 
+	ret = drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0);
+	if (ret) {
+		drm_encoder_cleanup(&dsi->encoder);
+		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);
@@ -1723,10 +1743,9 @@ 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_atomic_disable(&dsi->bridge, NULL);
+	drm_encoder_cleanup(&dsi->encoder);
  	mipi_dsi_host_unregister(&dsi->dsi_host);
  }
 
@@ -1819,6 +1838,12 @@ 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;
+
+	drm_bridge_add(&dsi->bridge);
+
  	ret = component_add(dev, &exynos_dsi_component_ops);
  	if (ret)
  		goto err_disable_runtime;

drivers/gpu/drm/exynos/exynos_drm_dsi.c static int exynos_dsi_probe(struct platform_device *pdev) · line 1867

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_dsi.c +4 -0
@@ -1833,6 +1858,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 
  static int exynos_dsi_remove(struct platform_device *pdev)
  {
+	struct exynos_dsi *dsi = platform_get_drvdata(pdev);
+
+	drm_bridge_remove(&dsi->bridge);
+
  	pm_runtime_disable(&pdev->dev);
 
  	component_del(&pdev->dev, &exynos_dsi_component_ops);

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author
#4 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek,

Quoted 79 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
  decon_atomic_disable+0x58/0xd4
  decon_unbind+0x1c/0x3c
  component_unbind+0x38/0x60
  component_bind_all+0x16c/0x25c
  exynos_drm_bind+0x104/0x1bc
  try_to_bring_up_master+0x164/0x1d0
  __component_add+0xa8/0x174
  component_add+0x14/0x20
  hdmi_probe+0x438/0x710
  platform_probe+0x68/0xe0
  really_probe.part.0+0x9c/0x31c
  __driver_probe_device+0x98/0x144
  driver_probe_device+0xc8/0x160
  __device_attach_driver+0xb8/0x120
  bus_for_each_drv+0x78/0xd0
  __device_attach+0xd8/0x180
  device_initial_probe+0x14/0x20
  bus_probe_device+0x9c/0xa4
  deferred_probe_work_func+0x88/0xc4
  process_one_work+0x288/0x6f0
  worker_thread+0x74/0x470
  kthread+0x188/0x194
  ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception
Quoted 6 lines

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal

exception ]---

Is this with Bridge or normal DSI panel?

Jagan.

author
#5 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek,

Quoted 91 lines · Jagan Teki

Hi Marek,

Quoted 79 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
  decon_atomic_disable+0x58/0xd4
  decon_unbind+0x1c/0x3c
  component_unbind+0x38/0x60
  component_bind_all+0x16c/0x25c
  exynos_drm_bind+0x104/0x1bc
  try_to_bring_up_master+0x164/0x1d0
  __component_add+0xa8/0x174
  component_add+0x14/0x20
  hdmi_probe+0x438/0x710
  platform_probe+0x68/0xe0
  really_probe.part.0+0x9c/0x31c
  __driver_probe_device+0x98/0x144
  driver_probe_device+0xc8/0x160
  __device_attach_driver+0xb8/0x120
  bus_for_each_drv+0x78/0xd0
  __device_attach+0xd8/0x180
  device_initial_probe+0x14/0x20
  bus_probe_device+0x9c/0xa4
  deferred_probe_work_func+0x88/0xc4
  process_one_work+0x288/0x6f0
  worker_thread+0x74/0x470
  kthread+0x188/0x194
  ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception
Quoted 6 lines

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal

exception ]---

Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://github.com/openedev/linux/commit/412f226acd774356e8188c9e62b653672926ee0d

Jagan.

author
#6 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek,

Quoted 95 lines · Jagan Teki

Hi Marek,

Quoted 91 lines · Jagan Teki

Hi Marek,

Quoted 85 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
  decon_atomic_disable+0x58/0xd4
  decon_unbind+0x1c/0x3c
  component_unbind+0x38/0x60
  component_bind_all+0x16c/0x25c
  exynos_drm_bind+0x104/0x1bc
  try_to_bring_up_master+0x164/0x1d0
  __component_add+0xa8/0x174
  component_add+0x14/0x20
  hdmi_probe+0x438/0x710
  platform_probe+0x68/0xe0
  really_probe.part.0+0x9c/0x31c
  __driver_probe_device+0x98/0x144
  driver_probe_device+0xc8/0x160
  __device_attach_driver+0xb8/0x120
  bus_for_each_drv+0x78/0xd0
  __device_attach+0xd8/0x180
  device_initial_probe+0x14/0x20
  bus_probe_device+0x9c/0xa4
  deferred_probe_work_func+0x88/0xc4
  process_one_work+0x288/0x6f0
  worker_thread+0x74/0x470
  kthread+0x188/0x194
  ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal

exception ]---

Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://github.com/openedev/linux/commit/412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

Jagan.

#7 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Quoted 87 lines · Jagan Teki
Quoted 86 lines · Jagan Teki
Quoted 85 lines · Jagan Teki
Quoted 83 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal

exception ]---

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound

device name                                            status
-------------------------------------------------------------
13800000.decon                                      not bound 13880000.decon                                      not bound 13930000.mic                                        not bound (unknown)                                      not registered (unknown)                                      not registered

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#8 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Quoted 107 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal 

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: 

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name                                            status
-------------------------------------------------------------
13800000.decon                                      not bound 13880000.decon                                      not bound 13930000.mic                                        not bound (unknown)                                      not registered (unknown)                                      not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on 
minor 0

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author
#9 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek,

Quoted 145 lines · Marek Szyprowski
Quoted 107 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort:

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name status
-------------------------------------------------------------

13800000.decon                                      not bound
13880000.decon                                      not bound
13930000.mic                                        not bound

(unknown) not registered
(unknown) not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

Quoted 6 lines

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on
minor 0

Can you confirm, does linux-next work with panel, downstream bridge devices?

downstream bridge has, panel-simple out port (I2C based and non-I2C)

Thanks,
Jagan.

#10 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Jagan,

Quoted 148 lines · Jagan Teki
Quoted 146 lines · Marek Szyprowski
Quoted 106 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
    decon_atomic_disable+0x58/0xd4
    decon_unbind+0x1c/0x3c
    component_unbind+0x38/0x60
    component_bind_all+0x16c/0x25c
    exynos_drm_bind+0x104/0x1bc
    try_to_bring_up_master+0x164/0x1d0
    __component_add+0xa8/0x174
    component_add+0x14/0x20
    hdmi_probe+0x438/0x710
    platform_probe+0x68/0xe0
    really_probe.part.0+0x9c/0x31c
    __driver_probe_device+0x98/0x144
    driver_probe_device+0xc8/0x160
    __device_attach_driver+0xb8/0x120
    bus_for_each_drv+0x78/0xd0
    __device_attach+0xd8/0x180
    device_initial_probe+0x14/0x20
    bus_probe_device+0x9c/0xa4
    deferred_probe_work_func+0x88/0xc4
    process_one_work+0x288/0x6f0
    worker_thread+0x74/0x470
    kthread+0x188/0x194
    ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort:

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name status
-------------------------------------------------------------

13800000.decon                                      not bound
13880000.decon                                      not bound
13930000.mic                                        not bound

(unknown) not registered
(unknown) not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

Quoted 6 lines
Quoted 3 lines
# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on
minor 0

Can you confirm, does linux-next work with panel, downstream bridge devices?

downstream bridge has, panel-simple out port (I2C based and non-I2C)

What do you mean by downstream bridge devices?

I've just checked and two mentioned in this thread boards: TM2e and Trats properly display image with current (20211124) linux-next.

However I've noticed that the Arndale board (arch/arm/boot/dts/exynos5250-arndale.dts), which also uses Exynos DSI with some bridges, gives no display with current next. I will try to bisect and find when it got broken.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author
#11 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Marek,

Quoted 152 lines · Marek Szyprowski

Hi Jagan,

Quoted 148 lines · Jagan Teki
Quoted 146 lines · Marek Szyprowski
Quoted 106 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
    decon_atomic_disable+0x58/0xd4
    decon_unbind+0x1c/0x3c
    component_unbind+0x38/0x60
    component_bind_all+0x16c/0x25c
    exynos_drm_bind+0x104/0x1bc
    try_to_bring_up_master+0x164/0x1d0
    __component_add+0xa8/0x174
    component_add+0x14/0x20
    hdmi_probe+0x438/0x710
    platform_probe+0x68/0xe0
    really_probe.part.0+0x9c/0x31c
    __driver_probe_device+0x98/0x144
    driver_probe_device+0xc8/0x160
    __device_attach_driver+0xb8/0x120
    bus_for_each_drv+0x78/0xd0
    __device_attach+0xd8/0x180
    device_initial_probe+0x14/0x20
    bus_probe_device+0x9c/0xa4
    deferred_probe_work_func+0x88/0xc4
    process_one_work+0x288/0x6f0
    worker_thread+0x74/0x470
    kthread+0x188/0x194
    ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort:

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name status
-------------------------------------------------------------

13800000.decon                                      not bound
13880000.decon                                      not bound
13930000.mic                                        not bound

(unknown) not registered
(unknown) not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on
minor 0

Can you confirm, does linux-next work with panel, downstream bridge devices?

downstream bridge has, panel-simple out port (I2C based and non-I2C)

What do you mean by downstream bridge devices?

Bridge devices connected from Exynos Host.

Quoted 8 lines

I've just checked and two mentioned in this thread boards: TM2e and Trats properly display image with current (20211124) linux-next.

However I've noticed that the Arndale board (arch/arm/boot/dts/exynos5250-arndale.dts), which also uses Exynos DSI with some bridges, gives no display with current next. I will try to bisect and find when it got broken.

I understand why it is broken. Would you please come irc for further discussion on this?
#dri-devel
jagan_

Thaks,
Jagan.

author
#12 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

In reply to Marek Szyprowski

Hi Robert,

Quoted 145 lines · Marek Szyprowski
Quoted 107 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort:

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name status
-------------------------------------------------------------

13800000.decon                                      not bound
13880000.decon                                      not bound
13930000.mic                                        not bound

(unknown) not registered
(unknown) not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

Quoted 6 lines

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on
minor 0

I can see this patch is merged in drm-misc [1], not sure why? because we are in v4 of this series[2] and this patch certainly broke the exynos DSI Let me know what I need to do for next version to send-up?

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=92e794fab87af0793403d5e4a547f0be94a0e656
[2] https://patchwork.kernel.org/project/dri-devel/cover/[email protected]/

Thanks,
Jagan.

#13 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hey Jagan,

This is a mistake on my end, I must have been looking at reviewing this series and then accidentally included it with another batch of patches. Thank you for catching this.

I would suggest reverting these two patches[1][2]. Is that ok with you?

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=92e794fab87af0793403d5e4a547f0be94a0e656
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=aee039e66035b66f0c587cc1b0dd32fb04c9a892

Quoted 166 lines · Jagan Teki

Hi Robert,

Quoted 145 lines · Marek Szyprowski
Quoted 107 lines · Marek Szyprowski
Quoted 93 lines · Jagan Teki
Quoted 91 lines · Jagan Teki
Quoted 89 lines · Jagan Teki
Quoted 87 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations
exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops)
[drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal

exception
SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort:

Fatal
exception ]---

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Is this with Bridge or normal DSI panel?

Can you apply this patch and check?
https://protect2.fireeye.com/v1/url?k=aad62f08-f54d1627-aad7a447-0cc47a31cdf8-ea5858ddb7f0ecfe&q=1&e=2d730862-2c56-4988-a252-8febd02da578&u=https%3A%2F%2Fgithub.com%2Fopenedev%2Flinux%2Fcommit%2F412f226acd774356e8188c9e62b653672926ee0d

Any news on this? just asking in case if you missed it.

It is somehow better. System doesn't crash, but the DRM is not bound:

# cat /sys/kernel/debug/device_component/exynos-drm
master name                                            status
-------------------------------------------------------------
exynos-drm                                          not bound
Quoted 8 lines

device name status
-------------------------------------------------------------

13800000.decon                                      not bound
13880000.decon                                      not bound
13930000.mic                                        not bound

(unknown) not registered
(unknown) not registered

Well, I also checked a much simpler case, the Samsung Trats board (arch/arm/boot/dts/exynos4210-trats.dts). It has only Exynos FIMD (CRTC), Exynos DSI (encoder) and s6e8aa0 panel. No bridges at all. With only the $subject patch applied I got the following errors:

exynos4-fb 11c00000.fimd: Adding to iommu group 0
OF: graph: no port node found in /soc/fimd@11c00000
[drm] Exynos DRM: using 11c00000.fimd device for DMA mapping operations exynos-drm exynos-drm: bound 11c00000.fimd (ops fimd_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc/dsi@11c80000 to encoder TMDS-50: -22
exynos-drm exynos-drm: failed to bind 11c80000.dsi (ops exynos_dsi_component_ops): -22
exynos-drm exynos-drm: master bind failed: -22
exynos-drm: probe of exynos-drm failed with error -22
lima 13000000.gpu: gp - mali400 version major 1 minor 1
lima 13000000.gpu: pp0 - mali400 version major 1 minor 1
lima 13000000.gpu: pp1 - mali400 version major 1 minor 1
lima 13000000.gpu: pp2 - mali400 version major 1 minor 1
lima 13000000.gpu: pp3 - mali400 version major 1 minor 1
lima 13000000.gpu: l2 cache 128K, 4-way, 64byte cache line, 64bit external bus
lima 13000000.gpu: bus rate = 200000000
lima 13000000.gpu: mod rate = 100000000
lima 13000000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on minor 0

Quoted 6 lines

After applying "drm: exynos: dsi: Add component only once DSI device attached" the Exynos DRM is not even tried to bind:

# dmesg | grep drm
[    2.495898] [drm] Initialized lima 1.1.0 20191231 for 13000000.gpu on
minor 0

I can see this patch is merged in drm-misc [1], not sure why? because we are in v4 of this series[2] and this patch certainly broke the exynos DSI Let me know what I need to do for next version to send-up?

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=92e794fab87af0793403d5e4a547f0be94a0e656
[2] https://patchwork.kernel.org/project/dri-devel/cover/[email protected]/

Thanks,
Jagan.

author
#14 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Hi Robert,

Quoted 6 lines · Robert Foss

Hey Jagan,

This is a mistake on my end, I must have been looking at reviewing this series and then accidentally included it with another batch of patches. Thank you for catching this.

Thanks for the response.

Quoted 2 lines

I would suggest reverting these two patches[1][2]. Is that ok with you?

May be I will revert 1/2. but 2/2 is valid. Please let me know, if you have any concerns on reverting 1/2.

Thanks,
Jagan.

#15 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Quoted 11 lines · Jagan Teki

Hi Robert,

Quoted 6 lines · Robert Foss

Hey Jagan,

This is a mistake on my end, I must have been looking at reviewing this series and then accidentally included it with another batch of patches. Thank you for catching this.

Quoted 7 lines

Thanks for the response.

Quoted 2 lines

I would suggest reverting these two patches[1][2]. Is that ok with you?

May be I will revert 1/2. but 2/2 is valid. Please let me know, if you have any concerns on reverting 1/2.

Please go ahead!

author
#16 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Quoted 16 lines · Robert Foss
Quoted 14 lines · Jagan Teki

Hi Robert,

Quoted 6 lines · Robert Foss

Hey Jagan,

This is a mistake on my end, I must have been looking at reviewing this series and then accidentally included it with another batch of patches. Thank you for catching this.

Thanks for the response.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I would suggest reverting these two patches[1][2]. Is that ok with you?

May be I will revert 1/2. but 2/2 is valid. Please let me know, if you have any concerns on reverting 1/2.

Please go ahead!

Sent.

Thanks,
Jagan.

#17 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

In reply to Jagan Teki

Hi Jagan,

Quoted 1 line · Jagan Teki

Is this with Bridge or normal DSI panel?

According to the log shared by Marek, the dts being used is:
arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts
which includes arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi.

In this dtsi there is a "sil,sii8620" bridge.

#18 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

Quoted 10 lines · Fabio Estevam

Hi Jagan,

Quoted 1 line · Jagan Teki

Is this with Bridge or normal DSI panel?

According to the log shared by Marek, the dts being used is:
arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts
which includes arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi.

In this dtsi there is a "sil,sii8620" bridge.

Sii8620 bridge is attached to the HDMI display path. That's completely different from the DSI display path modified by this patchset.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#19 lore raw

Re: [PATCH 1/2] drm: exynos: dsi: Convert to bridge driver

In reply to Jagan Teki

Hi Jagan,

Quoted 85 lines · Jagan Teki
Quoted 77 lines · Marek Szyprowski
Quoted 12 lines · Jagan Teki

Some display panels would come up with a non-DSI output, those can have an option to connect the DSI host by means of interface bridge converter.

This DSI to non-DSI interface bridge converter would requires DSI Host to handle drm bridge functionalities in order to DSI Host to Interface bridge.

This patch convert the existing to a drm bridge driver with a built-in encoder support for compatibility with existing component drivers.

Quoted 6 lines

---
Note:
Hi Marek Szyprowski,

Please test this on Panel and Bridge hardware.

I don't have good news, t crashes:

[drm] Exynos DRM: using 13800000.decon device for DMA mapping operations exynos-drm exynos-drm: bound 13800000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13880000.decon (ops decon_component_ops) exynos-drm exynos-drm: bound 13930000.mic (ops exynos_mic_component_ops) [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/dsi@13900000 to encoder TMDS-67: -22
exynos-drm exynos-drm: failed to bind 13900000.dsi (ops exynos_dsi_component_ops): -22

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 74 Comm: kworker/u16:1 Not tainted 5.16.0-rc1+ #4141
Hardware name: Samsung TM2E board (DT)
Workqueue: events_unbound deferred_probe_work_func
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : decon_atomic_disable+0x58/0xd4
lr : decon_atomic_disable+0x28/0xd4

sp : ffff80001390b940
x29: ffff80001390b940 x28: ffff80001259a000 x27: ffff000027f39e80
input: stmfts as /devices/platform/soc@0/14ed0000.hsi2c/i2c-3/3-0049/input/input0
x26: 00000000ffffffea x25: ffff000025a40280 x24: 0000000000000001
x23: ffff800011b55f98 x22: ffff0000315dc000 x21: ffff00002695d100
x20: ffff000027e7a080 x19: ffff0000315e6000 x18: 0000000000000000
x17: 645f736f6e797865 x16: 2073706f28206973 x15: 0000000000028ee0
x14: 0000000000000028 x13: 0000000000000001 x12: 0000000000000040
x11: ffff000023c18920 x10: ffff000023c18922 x9 : ffff8000126352f0 x8 : ffff000023c00270 x7 : 0000000000000000 x6 : ffff000023c00268 x5 : ffff000027e7a3a0 x4 : 0000000000000001 x3 : ffff000027e7a080 x2 : 0000000000000024 x1 : ffff800013bc8024 x0 : ffff0000246117c0

Call trace:
   decon_atomic_disable+0x58/0xd4
   decon_unbind+0x1c/0x3c
   component_unbind+0x38/0x60
   component_bind_all+0x16c/0x25c
   exynos_drm_bind+0x104/0x1bc
   try_to_bring_up_master+0x164/0x1d0
   __component_add+0xa8/0x174
   component_add+0x14/0x20
   hdmi_probe+0x438/0x710
   platform_probe+0x68/0xe0
   really_probe.part.0+0x9c/0x31c
   __driver_probe_device+0x98/0x144
   driver_probe_device+0xc8/0x160
   __device_attach_driver+0xb8/0x120
   bus_for_each_drv+0x78/0xd0
   __device_attach+0xd8/0x180
   device_initial_probe+0x14/0x20
   bus_probe_device+0x9c/0xa4
   deferred_probe_work_func+0x88/0xc4
   process_one_work+0x288/0x6f0
   worker_thread+0x74/0x470
   kthread+0x188/0x194
   ret_from_fork+0x10/0x20
Code: 11002042 f9481c61 531e7442 8b020021 (88dffc21)
---[ end trace d73aff585b108954 ]---
Kernel panic - not syncing: synchronous external abort: Fatal exception
Quoted 6 lines

SMP: stopping secondary CPUs
Kernel Offset: disabled
CPU features: 0x2,300071c2,00000846
Memory Limit: none

---[ end Kernel panic - not syncing: synchronous external abort: Fatal

exception ]---

Quoted 1 line

Is this with Bridge or normal DSI panel?

This log is from the TM2e board (arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts) with a normal DSI panel and Exynos MIC bridge between Exynos Decon and Exynos DSI.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author
#20 lore raw

PATCH 2/2 drm: exynos: dsi: Add mode_set function

In reply to Jagan Teki

Get the display mode settings via mode_set bridge function instead of explicitly de-reference.

---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +12 -1
index 174590f543c3..3d4713346949 100644
@@ -260,6 +260,7 @@ struct exynos_dsi {
 	struct drm_bridge bridge;
 	struct drm_bridge *out_bridge;
 	struct device *dev;
+	struct drm_display_mode mode;
 
 	void __iomem *reg_base;
 	struct phy *phy;
@@ -883,7 +884,7 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi)
 
 static void exynos_dsi_set_display_mode(struct exynos_dsi *dsi)
 {
-	struct drm_display_mode *m = &dsi->encoder.crtc->state->adjusted_mode;
+	struct drm_display_mode *m = &dsi->mode;
 	unsigned int num_bits_resol = dsi->driver_data->num_bits_resol;
 	u32 reg;
 
@@ -1526,6 +1527,15 @@ static int exynos_dsi_create_connector(struct exynos_dsi *dsi)
 	return 0;
 }
 
+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 = bridge_to_dsi(bridge);
+
+	drm_mode_copy(&dsi->mode, adjusted_mode);
+}
+
 static int exynos_dsi_attach(struct drm_bridge *bridge,
 			     enum drm_bridge_attach_flags flags)
 {
@@ -1540,6 +1550,7 @@ static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
 	.atomic_reset		= drm_atomic_helper_bridge_reset,
 	.atomic_enable		= exynos_dsi_atomic_enable,
 	.atomic_disable		= exynos_dsi_atomic_disable,
+	.mode_set		= exynos_dsi_mode_set,
 	.attach			= exynos_dsi_attach,
 };
 
Signature · 1 line
2.25.1
Reviewed-by on v1 2/2
#21 lore raw

Re: [PATCH 2/2] drm: exynos: dsi: Add mode_set function

Hi Jagan,

Quoted 55 lines · Jagan Teki

Get the display mode settings via mode_set bridge function instead of explicitly de-reference.

---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +12 -2
index 174590f543c3..3d4713346949 100644
@@ -260,6 +260,7 @@ struct exynos_dsi {
        struct drm_bridge bridge;
        struct drm_bridge *out_bridge;
        struct device *dev;
+       struct drm_display_mode mode;
 
        void __iomem *reg_base;
        struct phy *phy;
@@ -883,7 +884,7 @@ static int exynos_dsi_init_link(struct exynos_dsi *dsi)
 
 static void exynos_dsi_set_display_mode(struct exynos_dsi *dsi)
 {
-       struct drm_display_mode *m = &dsi->encoder.crtc->state->adjusted_mode;
+       struct drm_display_mode *m = &dsi->mode;
        unsigned int num_bits_resol = dsi->driver_data->num_bits_resol;
        u32 reg;
 
@@ -1526,6 +1527,15 @@ static int exynos_dsi_create_connector(struct exynos_dsi *dsi)
        return 0;
 }
 
+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 = bridge_to_dsi(bridge);
+
+       drm_mode_copy(&dsi->mode, adjusted_mode);
+}
+
 static int exynos_dsi_attach(struct drm_bridge *bridge,
                             enum drm_bridge_attach_flags flags)
 {
@@ -1540,6 +1550,7 @@ static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = {
        .atomic_reset           = drm_atomic_helper_bridge_reset,
        .atomic_enable          = exynos_dsi_atomic_enable,
        .atomic_disable         = exynos_dsi_atomic_disable,
+       .mode_set               = exynos_dsi_mode_set,
        .attach                 = exynos_dsi_attach,
 };
 
--
Quoted 2 lines

2.25.1