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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170324142242.svlpr2hzcodou2vz@art_vandelay>
Date:   Fri, 24 Mar 2017 10:22:42 -0400
From:   Sean Paul <seanpaul@...omium.org>
To:     Rob Herring <robh@...nel.org>
Cc:     David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Sean Paul <seanpaul@...omium.org>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Archit Taneja <architt@...eaurora.org>,
        Jingoo Han <jingoohan1@...il.com>,
        Inki Dae <inki.dae@...sung.com>,
        Joonyoung Shim <jy0922.shim@...sung.com>,
        Seung-Woo Kim <sw0312.kim@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Javier Martinez Canillas <javier@....samsung.com>,
        Stefan Agner <stefan@...er.ch>,
        Alison Wang <alison.wang@...escale.com>,
        Xinliang Liu <z.liuxinliang@...ilicon.com>,
        Rongrong Zou <zourongrong@...il.com>,
        Xinwei Kong <kong.kongxinwei@...ilicon.com>,
        Chen Feng <puck.chen@...ilicon.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        CK Hu <ck.hu@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Marek Vasut <marex@...x.de>,
        Mark Yao <mark.yao@...k-chips.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Maxime Ripard <maxime.ripard@...e-electrons.com>,
        Chen-Yu Tsai <wens@...e.org>,
        Liviu Dudau <liviu.dudau@....com>,
        Mali DP Maintainers <malidp@...s.arm.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Carlo Caione <carlo@...one.org>,
        Kevin Hilman <khilman@...libre.com>,
        Rob Clark <robdclark@...il.com>, Jyri Sarha <jsarha@...com>,
        Tomi Valkeinen <tomi.valkeinen@...com>,
        Eric Anholt <eric@...olt.net>,
        Russell King <rmk+kernel@...linux.org.uk>
Subject: Re: [PATCH v3 4/5] drm: convert drivers to use
 drm_of_find_panel_or_bridge

On Wed, Mar 22, 2017 at 08:26:07AM -0500, Rob Herring wrote:
> Similar to the previous commit, convert drivers open coding OF graph
> parsing to use drm_of_find_panel_or_bridge instead.
> 
> This changes some error messages to debug messages (in the graph core).
> Graph connections are often "no connects" depending on the particular
> board, so we want to avoid spurious messages. Plus the kernel is not a
> DT validator.
> 
> Signed-off-by: Rob Herring <robh@...nel.org>
> Reviewed-by: Archit Taneja <architt@...eaurora.org>
> ---
> v3:
> - rebase to v4.11-rc2
> - rework atmel to support 1 to N connections
> 
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 73 ++++++-------------
>  drivers/gpu/drm/bridge/nxp-ptn3460.c             | 16 ++---
>  drivers/gpu/drm/bridge/parade-ps8622.c           | 16 ++---
>  drivers/gpu/drm/bridge/tc358767.c                | 27 +------
>  drivers/gpu/drm/exynos/exynos_dp.c               | 35 ++++-----
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c        | 39 +++-------
>  drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c     | 27 ++-----
>  drivers/gpu/drm/imx/imx-ldb.c                    | 27 ++-----
>  drivers/gpu/drm/imx/parallel-display.c           | 36 ++--------
>  drivers/gpu/drm/mediatek/mtk_dsi.c               | 23 ++----
>  drivers/gpu/drm/mxsfb/mxsfb_out.c                | 40 ++---------
>  drivers/gpu/drm/rockchip/analogix_dp-rockchip.c  | 26 ++-----
>  drivers/gpu/drm/sun4i/sun4i_rgb.c                | 11 +--
>  drivers/gpu/drm/sun4i/sun4i_tcon.c               | 90 ++----------------------
>  14 files changed, 92 insertions(+), 394 deletions(-)
>
<snip>

> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> index c3651456c963..511d68e22452 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
> @@ -15,6 +15,7 @@
>  #include <drm/drmP.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_crtc_helper.h>
> +#include <drm/drm_of.h>
>  #include <drm/drm_panel.h>
> 
>  #include "fsl_dcu_drm_drv.h"
> @@ -141,28 +142,6 @@ static int fsl_dcu_attach_panel(struct fsl_dcu_drm_device *fsl_dev,
>  	return ret;
>  }
> 
> -static int fsl_dcu_attach_endpoint(struct fsl_dcu_drm_device *fsl_dev,
> -				   const struct of_endpoint *ep)
> -{
> -	struct drm_bridge *bridge;
> -	struct device_node *np;
> -
> -	np = of_graph_get_remote_port_parent(ep->local_node);
> -
> -	fsl_dev->connector.panel = of_drm_find_panel(np);
> -	if (fsl_dev->connector.panel) {
> -		of_node_put(np);
> -		return fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel);
> -	}
> -
> -	bridge = of_drm_find_bridge(np);
> -	of_node_put(np);
> -	if (!bridge)
> -		return -ENODEV;
> -
> -	return drm_bridge_attach(&fsl_dev->encoder, bridge, NULL);
> -}
> -
>  int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev)
>  {
>  	struct of_endpoint ep;
> @@ -179,14 +158,14 @@ int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev)
>  		return fsl_dcu_attach_panel(fsl_dev, fsl_dev->connector.panel);
>  	}
> 
> -	ep_node = of_graph_get_next_endpoint(fsl_dev->np, NULL);
> -	if (!ep_node)
> -		return -ENODEV;
> -
> -	ret = of_graph_parse_endpoint(ep_node, &ep);
> -	of_node_put(ep_node);
> +	ret = drm_of_find_panel_or_bridge(fsl_dev->np, 0, 0, &panel, &bridge);

Hi Rob,
Apologies for the delay, I've been dealing with overhead the past few days. I ran across
this compile error when build testing your set.


../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c: In function
‘fsl_dcu_create_outputs’:
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:161:56: error: ‘panel’ undeclared
(first use in this function)
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:161:56: note: each undeclared
identifier is reported only once for each function it appears in
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:161:64: error: ‘bridge’ undeclared
(first use in this function)
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:148:22: warning: unused variable
‘ep_node’ [-Wunused-variable]
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:147:21: warning: unused variable
‘ep’ [-Wunused-variable]
../drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:171:1: warning: control reaches end
of non-void function [-Wreturn-type]
make[5]: *** [drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.o] Error 1
make[4]: *** [drivers/gpu/drm/fsl-dcu] Error 2
make[4]: *** Waiting for unfinished jobs....


The defconfigs we use can be found here:
https://cgit.freedesktop.org/drm/drm-tip/tree/?h=rerere-cache

Sean


>  	if (ret)
> -		return -ENODEV;
> +		return ret;
> 
> -	return fsl_dcu_attach_endpoint(fsl_dev, &ep);
> +	if (panel) {
> +		fsl_dev->connector.panel = panel;
> +		return fsl_dcu_attach_panel(fsl_dev, panel);
> +	}
> +
> +	return drm_bridge_attach(&fsl_dev->encoder, bridge, NULL);

<snip>

> --
> 2.10.1
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ