Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638764
| From | Philipp Zabel <p.zabel@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure |
| Date | 2017-05-10 14:00 +0200 |
| Message-ID | <tFyrD-jn-13@gated-at.bofh.it> (permalink) |
| References | <tFyrD-jn-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Leonard,
thank you for the patch. Comment below.
On Wed, 2017-05-10 at 13:57 +0300, Leonard Crestez wrote:
> Not having an endpoint bound in DT should not cause a failure here,
> there are fallbacks. So let's 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@nxp.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?
>
> 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..4c8a521 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 != -ENODEV)
That should be
if (ret && ret != -ENODEV)
as we don't want to return here if a panel or bridge was found.
regards
Philipp
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure Philipp Zabel <p.zabel@pengutronix.de> - 2017-05-10 14:00 +0200
csiph-web