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]
Date:   Wed, 1 Jul 2020 13:36:45 +0200
From:   Boris Brezillon <boris.brezillon@...labora.com>
To:     Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc:     linux-kernel@...r.kernel.org,
        Collabora Kernel ML <kernel@...labora.com>,
        narmstrong@...libre.com, a.hajda@...sung.com,
        laurent.pinchart@...asonboard.com, matthias.bgg@...il.com,
        drinkcat@...omium.org, hsinyi@...omium.org,
        Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [RESEND PATCH 1/3] drm/mediatek: mtk_dpi: Rename bridge to
 next_bridge

On Wed, 1 Jul 2020 13:23:03 +0200
Boris Brezillon <boris.brezillon@...labora.com> wrote:

> On Mon, 18 May 2020 19:39:07 +0200
> Enric Balletbo i Serra <enric.balletbo@...labora.com> wrote:
> 
> > This is really a cosmetic change just to make a bit more readable the
> > code after convert the driver to drm_bridge. The bridge variable name
> > will be used by the encoder drm_bridge, and the chained bridge will be
> > named next_bridge.
> > 
> > Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
> > Reviewed-by: Chun-Kuang Hu <chunkuang.hu@...nel.org>
> > ---
> > 
> >  drivers/gpu/drm/mediatek/mtk_dpi.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > index 7fbfa95bab09..7112125dc3d1 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > @@ -61,7 +61,7 @@ enum mtk_dpi_out_color_format {
> >  struct mtk_dpi {
> >  	struct mtk_ddp_comp ddp_comp;
> >  	struct drm_encoder encoder;
> > -	struct drm_bridge *bridge;
> > +	struct drm_bridge *next_bridge;  
> 
> Did you consider moving the drm_of_find_panel_or_bridge() call to
> mtk_dpi_bind() so you can get rid of this field?

Nevermind, you need it in patch 2 for the recursive call to
drm_bridge_attach().

> 
> This makes we realize there's no refcounting on bridges, which means
> the bridge can vanish between the drm_of_find_panel_or_bridge() and
> drm_bridge_attach() calls :-/.
> 
> >  	void __iomem *regs;
> >  	struct device *dev;
> >  	struct clk *engine_clk;
> > @@ -607,7 +607,7 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)
> >  	/* Currently DPI0 is fixed to be driven by OVL1 */
> >  	dpi->encoder.possible_crtcs = BIT(1);
> >  
> > -	ret = drm_bridge_attach(&dpi->encoder, dpi->bridge, NULL, 0);
> > +	ret = drm_bridge_attach(&dpi->encoder, dpi->next_bridge, NULL, 0);
> >  	if (ret) {
> >  		dev_err(dev, "Failed to attach bridge: %d\n", ret);
> >  		goto err_cleanup;
> > @@ -747,11 +747,11 @@ static int mtk_dpi_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
> > -					  NULL, &dpi->bridge);
> > +					  NULL, &dpi->next_bridge);
> >  	if (ret)
> >  		return ret;
> >  
> > -	dev_info(dev, "Found bridge node: %pOF\n", dpi->bridge->of_node);
> > +	dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node);
> >  
> >  	comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DPI);
> >  	if (comp_id < 0) {  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ