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: 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: 6352cd451ddb ("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

authored by

Nícolas F. R. A. Prado and committed by
Robert Foss
24f4f575 272377aa

+9 -8
+9 -8
drivers/gpu/drm/bridge/ti-dlpc3433.c
··· 319 319 .channel = 0, 320 320 .node = NULL, 321 321 }; 322 + int ret; 322 323 323 324 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"); 328 327 329 328 dlpc->dsi = mipi_dsi_device_register_full(host, &info); 330 329 if (IS_ERR(dlpc->dsi)) { ··· 335 336 dlpc->dsi->format = MIPI_DSI_FMT_RGB565; 336 337 dlpc->dsi->lanes = dlpc->dsi_lanes; 337 338 338 - return devm_mipi_dsi_attach(dev, dlpc->dsi); 339 + ret = devm_mipi_dsi_attach(dev, dlpc->dsi); 340 + if (ret) 341 + DRM_DEV_ERROR(dev, "failed to attach dsi host\n"); 342 + 343 + return ret; 339 344 } 340 345 341 346 static int dlpc3433_probe(struct i2c_client *client) ··· 370 367 drm_bridge_add(&dlpc->bridge); 371 368 372 369 ret = dlpc_host_attach(dlpc); 373 - if (ret) { 374 - DRM_DEV_ERROR(dev, "failed to attach dsi host\n"); 370 + if (ret) 375 371 goto err_remove_bridge; 376 - } 377 372 378 373 return 0; 379 374