mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
drm: rcar-du: Use dev_err_probe() to record cause of KMS init errors
The (large) rcar_du_modeset_init() function can fail for many reasons, two of two involving probe deferral. Use dev_err_probe() in those code paths to record the cause of the probe deferral, in order to help debugging probe issues. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
This commit is contained in:
parent
c58dcab081
commit
f3651bc0b7
|
|
@ -696,6 +696,10 @@ static int rcar_du_probe(struct platform_device *pdev)
|
|||
/* DRM/KMS objects */
|
||||
ret = rcar_du_modeset_init(rcdu);
|
||||
if (ret < 0) {
|
||||
/*
|
||||
* Don't use dev_err_probe(), as it would overwrite the probe
|
||||
* deferral reason recorded in rcar_du_modeset_init().
|
||||
*/
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev,
|
||||
"failed to initialize DRM/KMS (%d)\n", ret);
|
||||
|
|
|
|||
|
|
@ -935,7 +935,8 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
|
|||
/* Initialize the Color Management Modules. */
|
||||
ret = rcar_du_cmm_init(rcdu);
|
||||
if (ret)
|
||||
return ret;
|
||||
return dev_err_probe(rcdu->dev, ret,
|
||||
"failed to initialize CMM\n");
|
||||
|
||||
/* Create the CRTCs. */
|
||||
for (swindex = 0, hwindex = 0; swindex < rcdu->num_crtcs; ++hwindex) {
|
||||
|
|
@ -955,7 +956,8 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
|
|||
/* Initialize the encoders. */
|
||||
ret = rcar_du_encoders_init(rcdu);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
return dev_err_probe(rcdu->dev, ret,
|
||||
"failed to initialize encoders\n");
|
||||
|
||||
if (ret == 0) {
|
||||
dev_err(rcdu->dev, "error: no encoder could be initialized\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user