Re: [PATCH] drm/exynos: dsi: do not try to find bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Inki,

On Fri, Jun 16, 2017 at 1:50 AM, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
> It doesn't need to try to find a bridge if bridge node doesn't exist.
>
> Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index d404de8..e337cd2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1687,9 +1687,11 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
>                 return ret;
>         }
>
> -       bridge = of_drm_find_bridge(dsi->bridge_node);

This is more of question than comment. I am seeing in some places,
such as mtk_dpi_probe(), of_node_put() is called right after
of_drm_find_bridge() whether or not bridge_node is found.

In this case, of_node_put() is done from exynos_dsi_remove() which looks
correct to me.

However, there is the discrepancy. One of these is incorrect perhaps?
When is the right time to call of_node_put()?

> -       if (bridge)
> -               drm_bridge_attach(encoder, bridge, NULL);
> +       if (dsi->bridge_node) {
> +               bridge = of_drm_find_bridge(dsi->bridge_node);
> +               if (bridge)
> +                       drm_bridge_attach(encoder, bridge, NULL);
> +       }
>
>         return mipi_dsi_host_register(&dsi->dsi_host);
>  }
> --
> 1.9.1

Looks good to me.

Reviewed-by: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx>

thanks,
-- Shuah
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux