From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
David Airlie <airlied@linux.ie>,
linux-kernel <linux-kernel@vger.kernel.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Daniel Vetter <daniel@ffwll.ch>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/mediatek: mtk_dpi: Create connector for bridges
Date: Thu, 14 Jan 2021 07:48:53 +0800 [thread overview]
Message-ID: <CAAOTY_8eEgems8T-KJim--t5wCiPV8mEsqW3=HJa7tgEFuoezA@mail.gmail.com> (raw)
In-Reply-To: <CAAOTY__+FHHd6Coa9HDvS_e7Q7dD3gZm7FBbhymOR2w2-i8i4w@mail.gmail.com>
Hi, Hsin-Yi:
Chun-Kuang Hu <chunkuang.hu@kernel.org> 於 2020年12月11日 週五 下午10:04寫道:
>
> Hi, Hsin-Yi:
>
> Hsin-Yi Wang <hsinyi@chromium.org> 於 2020年12月3日 週四 下午4:24寫道:
> >
> > Similar to a9d9fea74be2 ("drm/mediatek: mtk_dsi: Create connector for bridges"):
> >
> > Use the drm_bridge_connector helper to create a connector for pipelines
> > that use drm_bridge. This allows splitting connector operations across
> > multiple bridges when necessary, instead of having the last bridge in
> > the chain creating the connector and handling all connector operations
> > internally.
>
> Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
>
> >
> > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > ---
> > drivers/gpu/drm/mediatek/mtk_dpi.c | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > index 52f11a63a330..189377e342fa 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > @@ -20,6 +20,7 @@
> >
> > #include <drm/drm_atomic_helper.h>
> > #include <drm/drm_bridge.h>
> > +#include <drm/drm_bridge_connector.h>
> > #include <drm/drm_crtc.h>
> > #include <drm/drm_of.h>
> > #include <drm/drm_simple_kms_helper.h>
> > @@ -66,6 +67,7 @@ struct mtk_dpi {
> > struct drm_encoder encoder;
> > struct drm_bridge bridge;
> > struct drm_bridge *next_bridge;
> > + struct drm_connector *connector;
> > void __iomem *regs;
> > struct device *dev;
> > struct clk *engine_clk;
> > @@ -603,12 +605,21 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)
> >
> > dpi->encoder.possible_crtcs = mtk_drm_find_possible_crtc_by_comp(drm_dev, dpi->ddp_comp);
> >
> > - ret = drm_bridge_attach(&dpi->encoder, &dpi->bridge, NULL, 0);
> > + ret = drm_bridge_attach(&dpi->encoder, &dpi->bridge, NULL,
> > + DRM_BRIDGE_ATTACH_NO_CONNECTOR);
> > if (ret) {
> > dev_err(dev, "Failed to attach bridge: %d\n", ret);
> > goto err_cleanup;
> > }
> >
> > + dpi->connector = drm_bridge_connector_init(drm_dev, &dpi->encoder);
> > + if (IS_ERR(dpi->connector)) {
> > + dev_err(dev, "Unable to create bridge connector\n");
> > + ret = PTR_ERR(dpi->connector);
> > + goto err_cleanup;
> > + }
> > + drm_connector_attach_encoder(dpi->connector, &dpi->encoder);
> > +
> > dpi->bit_num = MTK_DPI_OUT_BIT_NUM_8BITS;
> > dpi->channel_swap = MTK_DPI_OUT_CHANNEL_SWAP_RGB;
> > dpi->yc_map = MTK_DPI_OUT_YC_MAP_RGB;
> > --
> > 2.29.2.576.ga3fc446d84-goog
> >
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
prev parent reply other threads:[~2021-01-13 23:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 8:24 [PATCH] drm/mediatek: mtk_dpi: Create connector for bridges Hsin-Yi Wang
2020-12-11 14:04 ` Chun-Kuang Hu
2021-01-13 23:48 ` Chun-Kuang Hu [this message]
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='CAAOTY_8eEgems8T-KJim--t5wCiPV8mEsqW3=HJa7tgEFuoezA@mail.gmail.com' \
--to=chunkuang.hu@kernel.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=enric.balletbo@collabora.com \
--cc=hsinyi@chromium.org \
--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=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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).