Skip to contentSkip to conversation

drm/bridge: sn65dsi86: defer if there is no dsi host

PATCH Superseded Rob Clark 3 participants 3 messages Dec 7, 2021

Subsystems (5)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 drm/bridge: sn65dsi86: defer if there is no dsi host

From: Rob Clark <[email protected]>

Otherwise we don't get another shot at it if the bridge probes before the dsi host is registered. It seems like this is what *most* (but not all) of the other bridges do.

It looks like this was missed in the conversion to attach dsi host at probe time.

Fixes c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi86.c +1 -1
index 02b490671f8f..3684e12fbac3 100644
@@ -716,7 +716,7 @@ static int ti_sn_attach_host(struct ti_sn65dsi86 *pdata)
 	host = of_find_mipi_dsi_host_by_node(pdata->host_node);
 	if (!host) {
 		DRM_ERROR("failed to find dsi host\n");
-		return -ENODEV;
+		return -EPROBE_DEFER;
 	}
 
 	dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
Signature · 1 line
2.33.1
reviewer
#1 lore raw

Hi,

Quoted 21 lines · Rob Clark

From: Rob Clark <[email protected]>

Otherwise we don't get another shot at it if the bridge probes before the dsi host is registered. It seems like this is what *most* (but not all) of the other bridges do.

It looks like this was missed in the conversion to attach dsi host at probe time.

Fixes c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi86.c +0 -0
index 02b490671f8f..3684e12fbac3 100644

drivers/gpu/drm/bridge/ti-sn65dsi86.c static int ti_sn_attach_host(struct ti_sn65dsi86 *pdata) · line 719

Quoted 5 lines
drivers/gpu/drm/bridge/ti-sn65dsi86.c +1 -1
@@ -716,7 +716,7 @@ static int ti_sn_attach_host(struct ti_sn65dsi86 *pdata)
        host = of_find_mipi_dsi_host_by_node(pdata->host_node);
        if (!host) {
                DRM_ERROR("failed to find dsi host\n");
-               return -ENODEV;
+               return -EPROBE_DEFER;

Can you delete the DRM_ERROR line?

Thanks!

-Doug

#2 lore raw

Dne torek, 07. december 2021 ob 21:26:50 CET je Doug Anderson napisal(a):

Quoted 29 lines

Hi,

Quoted 26 lines · Rob Clark

From: Rob Clark <[email protected]>

Otherwise we don't get another shot at it if the bridge probes before the dsi host is registered. It seems like this is what *most* (but not all) of the other bridges do.

It looks like this was missed in the conversion to attach dsi host at probe time.

Fixes c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI

device at probe") Signed-off-by: Rob Clark <[email protected]>
---

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 02b490671f8f..3684e12fbac3 100644

drivers/gpu/drm/bridge/ti-sn65dsi86.c +0 -0
@@ -716,7 +716,7 @@ static int ti_sn_attach_host(struct ti_sn65dsi86
 *pdata)> 
        host = of_find_mipi_dsi_host_by_node(pdata->host_node);
        if (!host) {
 
Quoted 6 lines

drivers/gpu/drm/bridge/ti-sn65dsi86.c static int ti_sn_attach_host(struct ti_sn65dsi86 *pdata) · line 719

Quoted 4 lines
drivers/gpu/drm/bridge/ti-sn65dsi86.c +1 -1
                DRM_ERROR("failed to find dsi host\n");
 
-               return -ENODEV;
+               return -EPROBE_DEFER;

Can you delete the DRM_ERROR line?

or use dev_err_probe()

Best regards,
Jernej