diff mbox series

drm/rockchip: lvds: do not print error message when deferring probe

Message ID 20231117-rk-lvds-defer-msg-v1-1-1e6894cf9a74@theobroma-systems.com (mailing list archive)
State New
Headers show
Series drm/rockchip: lvds: do not print error message when deferring probe | expand

Commit Message

Quentin Schulz Nov. 17, 2023, 2:19 p.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

This scary message may happen if the panel or bridge is not probed
before the LVDS controller is, resulting in some head scratching because
the LVDS panel is actually working, since a later try will eventually
find the panel or bridge.

Therefore let's demote this error message into a debug message to not
scare users unnecessarily.

Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS")
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 7475e51b87969e01a6812eac713a1c8310372e8a
change-id: 20231117-rk-lvds-defer-msg-b2944b73d791

Best regards,

Comments

Fabio Estevam Nov. 17, 2023, 7:27 p.m. UTC | #1
Hi Quentin,

On Fri, Nov 17, 2023 at 3:31 PM Quentin Schulz <foss+kernel@0leil.net> wrote:
>
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> This scary message may happen if the panel or bridge is not probed
> before the LVDS controller is, resulting in some head scratching because
> the LVDS panel is actually working, since a later try will eventually
> find the panel or bridge.
>
> Therefore let's demote this error message into a debug message to not
> scare users unnecessarily.
...

> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> index f0f47e9abf5a..52e2ce2a61a8 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
> @@ -577,7 +577,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
>                 ret = -EINVAL;
>                 goto err_put_port;
>         } else if (ret) {
> -               DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
> +               DRM_DEV_DEBUG(dev, "failed to find panel and bridge node\n");
>                 ret = -EPROBE_DEFER;

What about using dev_err_probe() instead?
Quentin Schulz Nov. 20, 2023, 9:29 a.m. UTC | #2
Hi Fabio,

On 11/17/23 20:27, Fabio Estevam wrote:
> Hi Quentin,
> 
> On Fri, Nov 17, 2023 at 3:31 PM Quentin Schulz <foss+kernel@0leil.net> wrote:
>>
>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>
>> This scary message may happen if the panel or bridge is not probed
>> before the LVDS controller is, resulting in some head scratching because
>> the LVDS panel is actually working, since a later try will eventually
>> find the panel or bridge.
>>
>> Therefore let's demote this error message into a debug message to not
>> scare users unnecessarily.
> ...
> 
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
>> index f0f47e9abf5a..52e2ce2a61a8 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
>> @@ -577,7 +577,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,
>>                  ret = -EINVAL;
>>                  goto err_put_port;
>>          } else if (ret) {
>> -               DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
>> +               DRM_DEV_DEBUG(dev, "failed to find panel and bridge node\n");
>>                  ret = -EPROBE_DEFER;
> 
> What about using dev_err_probe() instead?

Either is fine by me, will send a v2 and DRM maintainers can decide for 
themselves before merging :)

Cheers,
Quentin
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index f0f47e9abf5a..52e2ce2a61a8 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -577,7 +577,7 @@  static int rockchip_lvds_bind(struct device *dev, struct device *master,
 		ret = -EINVAL;
 		goto err_put_port;
 	} else if (ret) {
-		DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
+		DRM_DEV_DEBUG(dev, "failed to find panel and bridge node\n");
 		ret = -EPROBE_DEFER;
 		goto err_put_port;
 	}