Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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 <robdclark@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
[dianders: squashed in Stephen's simplification]
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211207215753.635841-1-robdclark@gmail.com

authored by

Rob Clark and committed by
Douglas Anderson
03848335 d6c75c29

+8 -16
+8 -16
drivers/gpu/drm/bridge/ti-sn65dsi86.c
··· 704 704 705 705 static int ti_sn_attach_host(struct ti_sn65dsi86 *pdata) 706 706 { 707 - int ret, val; 707 + int val; 708 708 struct mipi_dsi_host *host; 709 709 struct mipi_dsi_device *dsi; 710 710 struct device *dev = pdata->dev; ··· 714 714 }; 715 715 716 716 host = of_find_mipi_dsi_host_by_node(pdata->host_node); 717 - if (!host) { 718 - DRM_ERROR("failed to find dsi host\n"); 719 - return -ENODEV; 720 - } 717 + if (!host) 718 + return -EPROBE_DEFER; 721 719 722 720 dsi = devm_mipi_dsi_device_register_full(dev, host, &info); 723 - if (IS_ERR(dsi)) { 724 - DRM_ERROR("failed to create dsi device\n"); 721 + if (IS_ERR(dsi)) 725 722 return PTR_ERR(dsi); 726 - } 727 723 728 724 /* TODO: setting to 4 MIPI lanes always for now */ 729 725 dsi->lanes = 4; ··· 735 739 736 740 pdata->dsi = dsi; 737 741 738 - ret = devm_mipi_dsi_attach(dev, dsi); 739 - if (ret < 0) { 740 - DRM_ERROR("failed to attach dsi to host\n"); 741 - return ret; 742 - } 743 - 744 - return 0; 742 + return devm_mipi_dsi_attach(dev, dsi); 745 743 } 746 744 747 745 static int ti_sn_bridge_attach(struct drm_bridge *bridge, ··· 1257 1267 drm_bridge_add(&pdata->bridge); 1258 1268 1259 1269 ret = ti_sn_attach_host(pdata); 1260 - if (ret) 1270 + if (ret) { 1271 + dev_err_probe(pdata->dev, ret, "failed to attach dsi host\n"); 1261 1272 goto err_remove_bridge; 1273 + } 1262 1274 1263 1275 return 0; 1264 1276