Skip to content

Commit 24f4f57

Browse files
nfrapradorobertfoss
authored andcommitted
drm/bridge: dpc3433: Don't log an error when DSI host can't be found
Given that failing to find a DSI host causes the driver to defer probe, make use of dev_err_probe() to log the reason. This makes the defer probe reason available and avoids alerting userspace about something that is not necessarily an error. Also move the "failed to attach" error message so that it's only printed when the devm_mipi_dsi_attach() call fails. Fixes: 6352cd4 ("drm: bridge: Add TI DLPC3433 DSI to DMD bridge") Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240415-anx7625-defer-log-no-dsi-host-v3-7-619a28148e5c@collabora.com
1 parent 272377a commit 24f4f57

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

drivers/gpu/drm/bridge/ti-dlpc3433.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,11 @@ static int dlpc_host_attach(struct dlpc *dlpc)
319319
.channel = 0,
320320
.node = NULL,
321321
};
322+
int ret;
322323

323324
host = of_find_mipi_dsi_host_by_node(dlpc->host_node);
324-
if (!host) {
325-
DRM_DEV_ERROR(dev, "failed to find dsi host\n");
326-
return -EPROBE_DEFER;
327-
}
325+
if (!host)
326+
return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");
328327

329328
dlpc->dsi = mipi_dsi_device_register_full(host, &info);
330329
if (IS_ERR(dlpc->dsi)) {
@@ -336,7 +335,11 @@ static int dlpc_host_attach(struct dlpc *dlpc)
336335
dlpc->dsi->format = MIPI_DSI_FMT_RGB565;
337336
dlpc->dsi->lanes = dlpc->dsi_lanes;
338337

339-
return devm_mipi_dsi_attach(dev, dlpc->dsi);
338+
ret = devm_mipi_dsi_attach(dev, dlpc->dsi);
339+
if (ret)
340+
DRM_DEV_ERROR(dev, "failed to attach dsi host\n");
341+
342+
return ret;
340343
}
341344

342345
static int dlpc3433_probe(struct i2c_client *client)
@@ -367,10 +370,8 @@ static int dlpc3433_probe(struct i2c_client *client)
367370
drm_bridge_add(&dlpc->bridge);
368371

369372
ret = dlpc_host_attach(dlpc);
370-
if (ret) {
371-
DRM_DEV_ERROR(dev, "failed to attach dsi host\n");
373+
if (ret)
372374
goto err_remove_bridge;
373-
}
374375

375376
return 0;
376377

0 commit comments

Comments
 (0)