Linux-mediatek Archive on lore.kernel.org
 help / color / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	drinkcat@chromium.org, Philipp Zabel <p.zabel@pengutronix.de>,
	narmstrong@baylibre.com, David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	a.hajda@samsung.com, linux-mediatek@lists.infradead.org,
	laurent.pinchart@ideasonboard.com,
	Daniel Vetter <daniel@ffwll.ch>,
	hsinyi@chromium.org, matthias.bgg@gmail.com,
	Collabora Kernel ML <kernel@collabora.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RESEND PATCH 1/3] drm/mediatek: mtk_dpi: Rename bridge to next_bridge
Date: Wed, 1 Jul 2020 13:23:03 +0200
Message-ID: <20200701132303.047ea605@collabora.com> (raw)
In-Reply-To: <20200518173909.2259259-2-enric.balletbo@collabora.com>

On Mon, 18 May 2020 19:39:07 +0200
Enric Balletbo i Serra <enric.balletbo@collabora.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@collabora.com>
> Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.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?

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) {


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 17:39 [RESEND PATCH 0/3] Convert mtk-dpi to drm_bridge API Enric Balletbo i Serra
2020-05-18 17:39 ` [RESEND PATCH 1/3] drm/mediatek: mtk_dpi: Rename bridge to next_bridge Enric Balletbo i Serra
2020-07-01 11:23   ` Boris Brezillon [this message]
2020-07-01 11:36     ` Boris Brezillon
2020-05-18 17:39 ` [RESEND PATCH 2/3] drm/mediatek: mtk_dpi: Convert to bridge driver Enric Balletbo i Serra
2020-07-01 11:51   ` Boris Brezillon
2020-05-18 17:39 ` [RESEND PATCH 3/3] drm/mediatek: mtk_dpi: Use simple encoder Enric Balletbo i Serra
2020-07-01 11:41   ` Boris Brezillon
2020-06-12 15:30 ` [RESEND PATCH 0/3] Convert mtk-dpi to drm_bridge API Enric Balletbo i Serra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200701132303.047ea605@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=chunkuang.hu@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drinkcat@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=hsinyi@chromium.org \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mediatek Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mediatek/0 linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ https://lore.kernel.org/linux-mediatek \
		linux-mediatek@lists.infradead.org
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mediatek


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git