* Re: [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
2023-03-22 14:38 [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found Francesco Dolcini
@ 2023-03-22 14:42 ` Andrzej Hajda
2023-03-22 15:22 ` Laurent Pinchart
2023-03-22 17:03 ` Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2023-03-22 14:42 UTC (permalink / raw)
To: Francesco Dolcini, Adrien Grassein, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
Daniel Vetter, dri-devel
Cc: Matheus Castello, linux-kernel, stable, Francesco Dolcini
On 22.03.2023 15:38, Francesco Dolcini wrote:
> From: Matheus Castello <matheus.castello@toradex.com>
>
> Returns EPROBE_DEFER when of_drm_find_bridge() fails, this is consistent
> with what all the other DRM bridge drivers are doing and this is
> required since the bridge might not be there when the driver is probed
> and this should not be a fatal failure.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
> Signed-off-by: Matheus Castello <matheus.castello@toradex.com>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> v2: use dev_err_probe() instead of dev_dbg() (Laurent)
> ---
> drivers/gpu/drm/bridge/lontium-lt8912b.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> index 2019a8167d69..b40baced1331 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> @@ -676,8 +676,8 @@ static int lt8912_parse_dt(struct lt8912 *lt)
>
> lt->hdmi_port = of_drm_find_bridge(port_node);
> if (!lt->hdmi_port) {
> - dev_err(lt->dev, "%s: Failed to get hdmi port\n", __func__);
> - ret = -ENODEV;
> + ret = -EPROBE_DEFER;
> + dev_err_probe(lt->dev, ret, "%s: Failed to get hdmi port\n", __func__);
> goto err_free_host_node;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
2023-03-22 14:38 [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found Francesco Dolcini
2023-03-22 14:42 ` Andrzej Hajda
@ 2023-03-22 15:22 ` Laurent Pinchart
2023-03-22 17:03 ` Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2023-03-22 15:22 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Adrien Grassein, Andrzej Hajda, Neil Armstrong, Robert Foss,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
dri-devel, Matheus Castello, linux-kernel, stable,
Francesco Dolcini
Hi Francesco,
Thank you for the patch.
On Wed, Mar 22, 2023 at 03:38:21PM +0100, Francesco Dolcini wrote:
> From: Matheus Castello <matheus.castello@toradex.com>
>
> Returns EPROBE_DEFER when of_drm_find_bridge() fails, this is consistent
> with what all the other DRM bridge drivers are doing and this is
> required since the bridge might not be there when the driver is probed
> and this should not be a fatal failure.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
> Signed-off-by: Matheus Castello <matheus.castello@toradex.com>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> v2: use dev_err_probe() instead of dev_dbg() (Laurent)
> ---
> drivers/gpu/drm/bridge/lontium-lt8912b.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> index 2019a8167d69..b40baced1331 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
> @@ -676,8 +676,8 @@ static int lt8912_parse_dt(struct lt8912 *lt)
>
> lt->hdmi_port = of_drm_find_bridge(port_node);
> if (!lt->hdmi_port) {
> - dev_err(lt->dev, "%s: Failed to get hdmi port\n", __func__);
> - ret = -ENODEV;
> + ret = -EPROBE_DEFER;
> + dev_err_probe(lt->dev, ret, "%s: Failed to get hdmi port\n", __func__);
> goto err_free_host_node;
> }
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
2023-03-22 14:38 [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found Francesco Dolcini
2023-03-22 14:42 ` Andrzej Hajda
2023-03-22 15:22 ` Laurent Pinchart
@ 2023-03-22 17:03 ` Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2023-03-22 17:03 UTC (permalink / raw)
To: Adrien Grassein, Andrzej Hajda, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
dri-devel, Francesco Dolcini
Cc: Matheus Castello, linux-kernel, stable, Francesco Dolcini
Hi,
On Wed, 22 Mar 2023 15:38:21 +0100, Francesco Dolcini wrote:
> Returns EPROBE_DEFER when of_drm_find_bridge() fails, this is consistent
> with what all the other DRM bridge drivers are doing and this is
> required since the bridge might not be there when the driver is probed
> and this should not be a fatal failure.
>
>
Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-fixes)
[1/1] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1a70ca89d59c7c8af006d29b965a95ede0abb0da
--
Neil
^ permalink raw reply [flat|nested] 4+ messages in thread