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: <9c291445-ae15-2ff5-4d24-489a2128b9ba@st.com>
Date:   Wed, 10 Jun 2020 12:21:32 +0000
From:   Yannick FERTRE <yannick.fertre@...com>
To:     Adrian Ratiu <adrian.ratiu@...labora.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-rockchip@...ts.infradead.org" 
        <linux-rockchip@...ts.infradead.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "Heiko Stuebner" <heiko@...ech.de>,
        Philippe CORNU <philippe.cornu@...com>,
        "Jernej Skrabec" <jernej.skrabec@...l.net>,
        Andrzej Hajda <a.hajda@...sung.com>,
        "Jonas Karlman" <jonas@...boo.se>,
        "linux-imx@....com" <linux-imx@....com>,
        "kernel@...labora.com" <kernel@...labora.com>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>
Subject: Re: [PATCH v9 04/11] drm: bridge: dw_mipi_dsi: remove bind/unbind API

Hi Adrian,

thanks for the pach: tested on stm32mp1.

Tested-by: Yannick Fertré <yannick.fertre@...com>

On 6/9/20 7:49 PM, Adrian Ratiu wrote:
> The DW mipi-dsi bind/unbind API was only used to attach the bridge to
> the encoder in the Rockchip driver, but with the addition of i.MX6 it
> gets more complicated because the i.MX6 part of the bridge is another
> bridge in itself which needs to daisy chain to the dw-mipi-dsi core.
>
> So, instead of extending this API to allow daisy-chaining bridges and
> risk having trouble with multiple connectors added by various bridges
> just delete it and let the DW core bridge be accesed by SoC-specific
> parts via the of_drm_find_bridge() API.
>
> This just fixes the Rockchip driver for the bind() deprecation, it
> doesn't convert it to a proper bridge daisy-chain with simple encoder
> and bridge .attach call-backs, that refactoring work should be done
> separately (and the i.MX6 driver can be used as reference).
>
> Suggested-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Adrian Ratiu <adrian.ratiu@...labora.com>
> ---
> New in v9.
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 22 -------------------
>   .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   |  7 +++---
>   2 files changed, 3 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index 16fd87055e7b7..70df0578cbe7b 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -1453,28 +1453,6 @@ void dw_mipi_dsi_remove(struct dw_mipi_dsi *dsi)
>   }
>   EXPORT_SYMBOL_GPL(dw_mipi_dsi_remove);
>   
> -/*
> - * Bind/unbind API, used from platforms based on the component framework.
> - */
> -int dw_mipi_dsi_bind(struct dw_mipi_dsi *dsi, struct drm_encoder *encoder)
> -{
> -	int ret;
> -
> -	ret = drm_bridge_attach(encoder, &dsi->bridge, NULL, 0);
> -	if (ret) {
> -		DRM_ERROR("Failed to initialize bridge with drm\n");
> -		return ret;
> -	}
> -
> -	return ret;
> -}
> -EXPORT_SYMBOL_GPL(dw_mipi_dsi_bind);
> -
> -void dw_mipi_dsi_unbind(struct dw_mipi_dsi *dsi)
> -{
> -}
> -EXPORT_SYMBOL_GPL(dw_mipi_dsi_unbind);
> -
>   MODULE_AUTHOR("Chris Zhong <zyw@...k-chips.com>");
>   MODULE_AUTHOR("Philippe Cornu <philippe.cornu@...com>");
>   MODULE_DESCRIPTION("DW MIPI DSI host controller driver");
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> index 3feff0c45b3f7..86f87c7ea03cf 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
> @@ -876,6 +876,7 @@ static int dw_mipi_dsi_rockchip_bind(struct device *dev,
>   {
>   	struct dw_mipi_dsi_rockchip *dsi = dev_get_drvdata(dev);
>   	struct drm_device *drm_dev = data;
> +	struct drm_bridge *dw_bridge = of_drm_find_bridge(dev->of_node);
>   	struct device *second;
>   	bool master1, master2;
>   	int ret;
> @@ -929,9 +930,9 @@ static int dw_mipi_dsi_rockchip_bind(struct device *dev,
>   		return ret;
>   	}
>   
> -	ret = dw_mipi_dsi_bind(dsi->dmd, &dsi->encoder);
> +	ret = drm_bridge_attach(&dsi->encoder, dw_bridge, NULL, 0);
>   	if (ret) {
> -		DRM_DEV_ERROR(dev, "Failed to bind: %d\n", ret);
> +		DRM_DEV_ERROR(dev, "Failed to attach DW DSI bridge: %d\n", ret);
>   		return ret;
>   	}
>   
> @@ -947,8 +948,6 @@ static void dw_mipi_dsi_rockchip_unbind(struct device *dev,
>   	if (dsi->is_slave)
>   		return;
>   
> -	dw_mipi_dsi_unbind(dsi->dmd);
> -
>   	clk_disable_unprepare(dsi->pllref_clk);
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ