2024-04-15 21:49:54

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 0/9] drm: Switch from dev_err to dev_err_probe for missing DSI host error path

This series changes every occurrence of the following pattern:

dsi_host = of_find_mipi_dsi_host_by_node(dsi);
if (!dsi_host) {
dev_err(dev, "failed to find dsi host\n");
return -EPROBE_DEFER;
}

into

dsi_host = of_find_mipi_dsi_host_by_node(dsi);
if (!dsi_host)
return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");

This registers the defer probe reason (so it can later be printed by the
driver core or checked on demand through the devices_deferred file in
debugfs) and prevents errors to be spammed in the kernel log every time
the driver retries to probe, unnecessarily alerting userspace about
something that is a normal part of the boot process.

I have omitted a Fixes: tag in the last patch, for the truly-nt35597
panel, because it predates the dev_err_probe() helper.

Changes in v3:
- Added trailers
- Rebased on next-20240415
- Link to v2: https://lore.kernel.org/r/20240229-anx7625-defer-log-no-dsi-host-v2-0-00506941049a@collabora.com

Changes in v2:
- Added patches 2 onwards to fix all occurences of this pattern instead
of just for the anx7625 driver
- Link to v1: https://lore.kernel.org/r/20240226-anx7625-defer-log-no-dsi-host-v1-1-242b1af31884@collabora.com

---
Nícolas F. R. A. Prado (9):
drm/bridge: anx7625: Don't log an error when DSI host can't be found
drm/bridge: icn6211: Don't log an error when DSI host can't be found
drm/bridge: lt8912b: Don't log an error when DSI host can't be found
drm/bridge: lt9611: Don't log an error when DSI host can't be found
drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found
drm/bridge: tc358775: Don't log an error when DSI host can't be found
drm/bridge: dpc3433: Don't log an error when DSI host can't be found
drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
drm/panel: truly-nt35597: Don't log an error when DSI host can't be found

drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++----
drivers/gpu/drm/bridge/chipone-icn6211.c | 6 ++----
drivers/gpu/drm/bridge/lontium-lt8912b.c | 6 ++----
drivers/gpu/drm/bridge/lontium-lt9611.c | 6 ++----
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++----
drivers/gpu/drm/bridge/tc358775.c | 6 ++----
drivers/gpu/drm/bridge/ti-dlpc3433.c | 17 +++++++++--------
drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++----
drivers/gpu/drm/panel/panel-truly-nt35597.c | 6 ++----
9 files changed, 25 insertions(+), 40 deletions(-)
---
base-commit: 6bd343537461b57f3efe5dfc5fc193a232dfef1e
change-id: 20240226-anx7625-defer-log-no-dsi-host-c3f9ccbcb287

Best regards,
--
Nícolas F. R. A. Prado <[email protected]>



2024-04-15 21:50:05

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 1/9] drm/bridge: anx7625: 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.

Fixes: 269332997a16 ("drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found")
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 9d96d28d6fe8..02bf45005307 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -2066,10 +2066,8 @@ static int anx7625_setup_dsi_device(struct anx7625_data *ctx)
};

host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node);
- if (!host) {
- DRM_DEV_ERROR(dev, "fail to find dsi host.\n");
- return -EPROBE_DEFER;
- }
+ if (!host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "fail to find dsi host.\n");

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:50:15

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 2/9] drm/bridge: icn6211: 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.

Fixes: 8dde6f7452a1 ("drm: bridge: icn6211: Add I2C configuration support")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/chipone-icn6211.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
index 82d23e4df09e..ff3284b6b1a3 100644
--- a/drivers/gpu/drm/bridge/chipone-icn6211.c
+++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
@@ -563,10 +563,8 @@ static int chipone_dsi_host_attach(struct chipone *icn)

host = of_find_mipi_dsi_host_by_node(host_node);
of_node_put(host_node);
- if (!host) {
- dev_err(dev, "failed to find dsi host\n");
- return -EPROBE_DEFER;
- }
+ if (!host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");

dsi = mipi_dsi_device_register_full(host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:50:25

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 3/9] drm/bridge: lt8912b: 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.

Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/lontium-lt8912b.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index 4b2ae27f0a57..1a9defa15663 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -494,10 +494,8 @@ static int lt8912_attach_dsi(struct lt8912 *lt)
};

host = of_find_mipi_dsi_host_by_node(lt->host_node);
- if (!host) {
- dev_err(dev, "failed to find dsi host\n");
- return -EPROBE_DEFER;
- }
+ if (!host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:50:36

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 4/9] drm/bridge: lt9611: 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.

Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/lontium-lt9611.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
index a9c7e2b07ea1..b99fe87ec738 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
@@ -761,10 +761,8 @@ static struct mipi_dsi_device *lt9611_attach_dsi(struct lt9611 *lt9611,
int ret;

host = of_find_mipi_dsi_host_by_node(dsi_node);
- if (!host) {
- dev_err(lt9611->dev, "failed to find dsi host\n");
- return ERR_PTR(-EPROBE_DEFER);
- }
+ if (!host)
+ return ERR_PTR(dev_err_probe(lt9611->dev, -EPROBE_DEFER, "failed to find dsi host\n"));

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:50:46

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 5/9] drm/bridge: lt9611uxc: 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.

Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index f4f593ad8f79..ab702471f3ab 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -266,10 +266,8 @@ static struct mipi_dsi_device *lt9611uxc_attach_dsi(struct lt9611uxc *lt9611uxc,
int ret;

host = of_find_mipi_dsi_host_by_node(dsi_node);
- if (!host) {
- dev_err(dev, "failed to find dsi host\n");
- return ERR_PTR(-EPROBE_DEFER);
- }
+ if (!host)
+ return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n"));

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:50:57

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 6/9] drm/bridge: tc358775: 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.

Fixes: b26975593b17 ("display/drm/bridge: TC358775 DSI/LVDS driver")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/tc358775.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/tc358775.c b/drivers/gpu/drm/bridge/tc358775.c
index 90a89d70d832..fea4f00a20f8 100644
--- a/drivers/gpu/drm/bridge/tc358775.c
+++ b/drivers/gpu/drm/bridge/tc358775.c
@@ -610,10 +610,8 @@ static int tc_attach_host(struct tc_data *tc)
};

host = of_find_mipi_dsi_host_by_node(tc->host_node);
- if (!host) {
- dev_err(dev, "failed to find dsi host\n");
- return -EPROBE_DEFER;
- }
+ if (!host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
if (IS_ERR(dsi)) {

--
2.44.0


2024-04-15 21:51:09

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 7/9] 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 <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/bridge/ti-dlpc3433.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-dlpc3433.c b/drivers/gpu/drm/bridge/ti-dlpc3433.c
index ca3348109bcd..6b559e071301 100644
--- a/drivers/gpu/drm/bridge/ti-dlpc3433.c
+++ b/drivers/gpu/drm/bridge/ti-dlpc3433.c
@@ -319,12 +319,11 @@ static int dlpc_host_attach(struct dlpc *dlpc)
.channel = 0,
.node = NULL,
};
+ int ret;

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

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

- return devm_mipi_dsi_attach(dev, dlpc->dsi);
+ ret = devm_mipi_dsi_attach(dev, dlpc->dsi);
+ if (ret)
+ DRM_DEV_ERROR(dev, "failed to attach dsi host\n");
+
+ return ret;
}

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

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

return 0;


--
2.44.0


2024-04-15 21:51:20

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 8/9] drm/panel: novatek-nt35950: 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.

Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels")
Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 648ce9201426..028fdac293f7 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -556,10 +556,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
}
dsi_r_host = of_find_mipi_dsi_host_by_node(dsi_r);
of_node_put(dsi_r);
- if (!dsi_r_host) {
- dev_err(dev, "Cannot get secondary DSI host\n");
- return -EPROBE_DEFER;
- }
+ if (!dsi_r_host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n");

nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
if (!nt->dsi[1]) {

--
2.44.0


2024-04-15 21:51:45

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH v3 9/9] drm/panel: truly-nt35597: 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.

Suggested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---
drivers/gpu/drm/panel/panel-truly-nt35597.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
index b73448cf349d..d447db912a61 100644
--- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
+++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
@@ -550,10 +550,8 @@ static int truly_nt35597_probe(struct mipi_dsi_device *dsi)

dsi1_host = of_find_mipi_dsi_host_by_node(dsi1);
of_node_put(dsi1);
- if (!dsi1_host) {
- dev_err(dev, "failed to find dsi host\n");
- return -EPROBE_DEFER;
- }
+ if (!dsi1_host)
+ return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");

/* register the second DSI device */
dsi1_device = mipi_dsi_device_register_full(dsi1_host, &info);

--
2.44.0


2024-04-16 01:19:28

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v3 4/9] drm/bridge: lt9611: Don't log an error when DSI host can't be found

On Mon, Apr 15, 2024 at 05:49:32PM -0400, N?colas F. R. A. Prado wrote:
> 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.
>
> Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
> Suggested-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> ---
> drivers/gpu/drm/bridge/lontium-lt9611.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Dmitry Baryshkov <[email protected]>

--
With best wishes
Dmitry

2024-04-16 01:30:27

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH v3 5/9] drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found

On Mon, Apr 15, 2024 at 05:49:33PM -0400, N?colas F. R. A. Prado wrote:
> 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.
>
> Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge")
> Suggested-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> ---
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <[email protected]>


--
With best wishes
Dmitry

2024-04-16 13:27:59

by Robert Foss

[permalink] [raw]
Subject: Re: [PATCH v3 0/9] drm: Switch from dev_err to dev_err_probe for missing DSI host error path

On Mon, 15 Apr 2024 17:49:28 -0400, Nícolas F. R. A. Prado wrote:
> This series changes every occurrence of the following pattern:
>
> dsi_host = of_find_mipi_dsi_host_by_node(dsi);
> if (!dsi_host) {
> dev_err(dev, "failed to find dsi host\n");
> return -EPROBE_DEFER;
> }
>
> [...]

Applied, thanks!

[1/9] drm/bridge: anx7625: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=ef4a9204d594
[2/9] drm/bridge: icn6211: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=275fafe58faa
[3/9] drm/bridge: lt8912b: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=b3b4695ff47c
[4/9] drm/bridge: lt9611: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=cd0a2c6a081f
[5/9] drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=6d9e877cde7e
[6/9] drm/bridge: tc358775: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=272377aa0e3d
[7/9] drm/bridge: dpc3433: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=24f4f575214d
[8/9] drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=5ff5505b9a2d
[9/9] drm/panel: truly-nt35597: Don't log an error when DSI host can't be found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c1e4d3a6de48



Rob


2024-04-16 17:43:47

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v3 8/9] drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found

On 15/04/2024 23:49, Nícolas F. R. A. Prado wrote:
> 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.
>
> Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels")
> Suggested-by: AngeloGioacchino Del Regno <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
> ---
> drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> index 648ce9201426..028fdac293f7 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> @@ -556,10 +556,8 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
> }
> dsi_r_host = of_find_mipi_dsi_host_by_node(dsi_r);
> of_node_put(dsi_r);
> - if (!dsi_r_host) {
> - dev_err(dev, "Cannot get secondary DSI host\n");
> - return -EPROBE_DEFER;
> - }
> + if (!dsi_r_host)
> + return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n");
>
> nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
> if (!nt->dsi[1]) {
>

Reviewed-by: Neil Armstrong <[email protected]>