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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOw6vb+tZuZf6dT+2MVOXCcUzooX4BXo5NzdDg1iLe0wMzRggA@mail.gmail.com>
Date:	Wed, 29 Jun 2016 09:55:02 -0400
From:	Sean Paul <seanpaul@...omium.org>
To:	Yakir Yang <ykk@...k-chips.com>
Cc:	Mark Yao <yzq@...k-chips.com>, Inki Dae <inki.dae@...sung.com>,
	Jingoo Han <jingoohan1@...il.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Javier Martinez Canillas <javier@....samsung.com>,
	Stéphane Marchesin <marcheu@...omium.org>,
	Tomasz Figa <tfiga@...omium.org>,
	David Airlie <airlied@...ux.ie>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Thierry Reding <treding@...dia.com>,
	Douglas Anderson <dianders@...omium.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Emil Velikov <emil.l.velikov@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v4 05/11] drm/rockchip: analogix_dp: make panel detect to
 an optional action

On Wed, Jun 29, 2016 at 5:15 AM, Yakir Yang <ykk@...k-chips.com> wrote:
> Some boards don't need to declare a panel device node, like the
> display interface is DP monitors, so it's necessary to make the
> panel detect to an optional action.
>
> Signed-off-by: Yakir Yang <ykk@...k-chips.com>
> Acked-by: Mark Yao <mark.yao@...k-chips.com>
> Reviewed-by: Tomasz Figa <tomasz.figa@...omium.com>


Reviewed-by: Sean Paul <seanpaul@...omium.org>

> ---
> Changes in v4:
> - Move of_node_put(panel_node) directly below of_drm_find_panel (Sean)
> - Add reviewed flag from Tomasz
>
> Changes in v3:
> - Add the acked flag from Mark.
>
>  drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 47 +++++++++++--------------
>  1 file changed, 21 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index 8557a08..0755573 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -329,38 +329,33 @@ static int rockchip_dp_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
>         struct device_node *panel_node, *port, *endpoint;
> +       struct drm_panel *panel = NULL;
>         struct rockchip_dp_device *dp;
> -       struct drm_panel *panel;
>
>         port = of_graph_get_port_by_id(dev->of_node, 1);
> -       if (!port) {
> -               dev_err(dev, "can't find output port\n");
> -               return -EINVAL;
> -       }
> -
> -       endpoint = of_get_child_by_name(port, "endpoint");
> -       of_node_put(port);
> -       if (!endpoint) {
> -               dev_err(dev, "no output endpoint found\n");
> -               return -EINVAL;
> -       }
> -
> -       panel_node = of_graph_get_remote_port_parent(endpoint);
> -       of_node_put(endpoint);
> -       if (!panel_node) {
> -               dev_err(dev, "no output node found\n");
> -               return -EINVAL;
> -       }
> -
> -       panel = of_drm_find_panel(panel_node);
> -       if (!panel) {
> -               DRM_ERROR("failed to find panel\n");
> +       if (port) {
> +               endpoint = of_get_child_by_name(port, "endpoint");
> +               of_node_put(port);
> +               if (!endpoint) {
> +                       dev_err(dev, "no output endpoint found\n");
> +                       return -EINVAL;
> +               }
> +
> +               panel_node = of_graph_get_remote_port_parent(endpoint);
> +               of_node_put(endpoint);
> +               if (!panel_node) {
> +                       dev_err(dev, "no output node found\n");
> +                       return -EINVAL;
> +               }
> +
> +               panel = of_drm_find_panel(panel_node);
>                 of_node_put(panel_node);
> -               return -EPROBE_DEFER;
> +               if (!panel) {
> +                       DRM_ERROR("failed to find panel\n");
> +                       return -EPROBE_DEFER;
> +               }
>         }
>
> -       of_node_put(panel_node);
> -
>         dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
>         if (!dp)
>                 return -ENOMEM;
> --
> 1.9.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ