Message ID | 20230322143821.109744-1-francesco@dolcini.it |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2382745wrt; Wed, 22 Mar 2023 07:51:03 -0700 (PDT) X-Google-Smtp-Source: AK7set+Z+2+heZuI5dOskAYbEetFsSpqJBjxmD8iqVt6/0EtmGdoDdWJKEAy9kMoAtJRa9/zdb5u X-Received: by 2002:a17:906:6449:b0:8b2:abcd:624 with SMTP id l9-20020a170906644900b008b2abcd0624mr5067220ejn.0.1679496663010; Wed, 22 Mar 2023 07:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679496663; cv=none; d=google.com; s=arc-20160816; b=1AE9OF6G5ZIdSWsDb2jqxYYeBEEC1wSxv525g72iOIBZW8BKhr5qtmTjiBmXPBJqo+ mXr43385TG5BTa/efybfGLqiu4xA6ag+r7TlEcE20lQh+C+JmHcn9eQ+VGzT0b4c/U+O ir9ydMhfZ+3JaI3EzOlcrIjfqxDnjIO9j08qKOsn0UKZSF/jFRFcu7lv5oj6x18+1EzK 96rL26J7p2tM10RnJ9BgUR+TiOmtJr2MIeFTkAy6uLCZKO8O6VZgCVU3cQx2Yolzim7O FWssTCJC+Ehr6z2wCMfB+FFKVbtPM0nIUUmdFlmESx+Bq0brK5CbIuljLx32OIta3Wl7 lm7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gHM58JN59wrUHb43T5Gv/w0smonjecjE2oWyxe4mMoU=; b=BGhVSQW6yDvUtlLREfp3J0IqQB208udpFO6rMW4N35NFhmTZt1dl48WcE62bvHVdRF 5m4zbB6OdiqmqTnCj9HQueJEdPzopZgEKXmtSEIvmYfSJzM7SEPSzAICzOwnO8JFwBEA ExFnm9X1BEhOyh4Cz7CkDOkT+4uPghiwCx1DyC+MMw0obo9PnotjDjsYQZu/ykNxabgd oBeZr31lTh2vPlJp3UlJYL6VLXpzCK8QDbDA4mhsMZCmYYn2+fEMRAAXxmB/naI6bhp+ 3S0R/5z/PI9PxGFl+fgfQUqgaO7k2Wn76S6gQ9Wk892lVVi/rGFB9VxSJHyn5csQkS0K FQ2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a1709062bc200b00931b7f46fd7si14614972ejg.487.2023.03.22.07.50.37; Wed, 22 Mar 2023 07:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbjCVOib (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 22 Mar 2023 10:38:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjCVOia (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Mar 2023 10:38:30 -0400 Received: from mail11.truemail.it (mail11.truemail.it [IPv6:2001:4b7e:0:8::81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA732A141; Wed, 22 Mar 2023 07:38:29 -0700 (PDT) Received: from francesco-nb.toradex.int (31-10-206-125.static.upc.ch [31.10.206.125]) by mail11.truemail.it (Postfix) with ESMTPA id 338BD209B4; Wed, 22 Mar 2023 15:38:27 +0100 (CET) From: Francesco Dolcini <francesco@dolcini.it> To: Adrien Grassein <adrien.grassein@gmail.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org Cc: Matheus Castello <matheus.castello@toradex.com>, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Francesco Dolcini <francesco.dolcini@toradex.com> Subject: [PATCH v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found Date: Wed, 22 Mar 2023 15:38:21 +0100 Message-Id: <20230322143821.109744-1-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761079892623563797?= X-GMAIL-MSGID: =?utf-8?q?1761079892623563797?= |
Series |
[v2] drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found
|
|
Commit Message
Francesco Dolcini
March 22, 2023, 2:38 p.m. UTC
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> --- 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(-)
Comments
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; > } >
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; > } >
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
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; }