lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <02532be0049e69fe8e9f8da04fbbcf813d250a39.1494419445.git.leonard.crestez@nxp.com>
Date:   Wed, 10 May 2017 16:17:13 +0300
From:   Leonard Crestez <leonard.crestez@....com>
To:     Philipp Zabel <p.zabel@...gutronix.de>,
        Rob Herring <robh@...nel.org>, David Airlie <airlied@...ux.ie>
CC:     Leonard Crestez <leonard.crestez@....com>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Sean Paul <seanpaul@...omium.org>,
        Archit Taneja <architt@...eaurora.org>,
        Liu Ying <gnuiyl@...il.com>,
        Lucas Stach <l.stach@...gutronix.de>,
        Steve Longerbeam <steve_longerbeam@...tor.com>,
        Peter Senna Tschudin <peter.senna@...labora.com>,
        Cristina Ciocan <cristina-mihaela.ciocan@....com>,
        Octavian Purdila <octavian.purdila@....com>,
        <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure

Not having an endpoint bound in DT should not cause a failure here,
there are fallbacks. So explicitly accept a missing endpoint.

This behavior change was introduced by refactoring in drm_of parsing
code and it should not require dts changes.

In particular this fixes imx6qdl-sabreauto boards.

Link: https://lists.freedesktop.org/archives/dri-devel/2017-May/141233.html
Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge")
Signed-off-by: Leonard Crestez <leonard.crestez@....com>

---

This relies on drm_of_find_panel_or_bridge returning -ENODEV
specifically if no remote is found for the endpoint. This behavior can
be seen by looking at the code but is not otherwise obviously
guaranteed.

Perhaps this should be explicitly mentioned in that function's
documentation?

Changes since v1:
* Fix returning if ret is 0.

 drivers/gpu/drm/imx/imx-ldb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 8fb801f..8b05ecb 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -673,7 +673,7 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
 		ret = drm_of_find_panel_or_bridge(child,
 						  imx_ldb->lvds_mux ? 4 : 2, 0,
 						  &channel->panel, &channel->bridge);
-		if (ret)
+		if (ret && ret != -ENODEV)
 			return ret;
 
 		/* panel ddc only if there is no bridge */
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ