From: Jagan Teki <jagan@amarulasolutions.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Inki Dae <inki.dae@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Tim Harvey <tharvey@gateworks.com>,
Adam Ford <aford173@gmail.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Marek Vasut <marex@denx.de>,
Matteo Lisi <matteo.lisi@engicam.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
NXP Linux Team <linux-imx@nxp.com>,
linux-amarula <linux-amarula@amarulasolutions.com>,
Linus Walleij <linus.walleij@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH v13 02/18] drm: bridge: panel: Support nodrm case for drmm_panel_bridge_add
Date: Mon, 27 Feb 2023 17:58:03 +0530 [thread overview]
Message-ID: <CAMty3ZDt64C0dv2=wVcaCLdZVFU2u6D4EKswuoqEjvByKyMseg@mail.gmail.com> (raw)
In-Reply-To: <20230227121149.c3ibajgog3i2s2ek@houat>
On Mon, Feb 27, 2023 at 5:41 PM Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Feb 27, 2023 at 05:09:09PM +0530, Jagan Teki wrote:
> > drmm_panel_bridge_add DRM-managed action helper is useful for the bridge
> > which automatically removes the bridge when drm pointer is cleaned.
> >
> > Supporting the same on non-component bridges like host DSI bridge requires
> > a drm pointer which is indeed available only when a panel-bridge is found.
> >
> > For these use cases, the caller would call the drmm_panel_bridge_add by
> > passing NULL to drm pointer.
> >
> > So, assign the bridge->dev to drm pointer for those cases.
> >
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v13:
> > - new patch
> >
> > Note: use case on
> > "[PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper"
> >
> > drivers/gpu/drm/bridge/panel.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
> > index d4b112911a99..45a0c6671000 100644
> > --- a/drivers/gpu/drm/bridge/panel.c
> > +++ b/drivers/gpu/drm/bridge/panel.c
> > @@ -402,6 +402,13 @@ struct drm_bridge *drmm_panel_bridge_add(struct drm_device *drm,
> > if (IS_ERR(bridge))
> > return bridge;
> >
> > + /*
> > + * For non-component bridges, like host DSI bridge the DRM pointer
> > + * can be available only when a panel-bridge is found.
> > + */
> > + if (!drm)
> > + drm = bridge->dev;
> > +
>
> Why can't the caller use bridge->dev?
The first step of drmm_panel_bridge_add is to find the panel-bridge,
so we can only get bridge->dev after this step. The caller doesn't
know anything about the panel bridge it just sends a panel pointer to
find the panel-bridge and then assigns bridge->dev to drm for DRM
action.
Please check this patch about the caller,
https://patchwork.kernel.org/project/dri-devel/patch/20230227113925.875425-5-jagan@amarulasolutions.com/
>
> Also, where did the devm_drm_of_dsi_get_bridge go? I thought you were
> going to convert it to a drm-managed version?
Look like your suggestion to can't use devm_drm_of_dsi_get_bridge and
call the DRM-action from the driver, that is the reason I have removed
this and done the same as your previous inputs.
https://lore.kernel.org/all/20230203110437.otzl2azscbujigv6@houat/
Jagan.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-27 12:29 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 11:39 [PATCH v13 00/18] drm: Add Samsung MIPI DSIM bridge Jagan Teki
2023-02-27 11:39 ` [PATCH v13 01/18] drm: of: Lookup if child node has DSI panel or bridge Jagan Teki
2023-02-27 11:39 ` [PATCH v13 02/18] drm: bridge: panel: Support nodrm case for drmm_panel_bridge_add Jagan Teki
2023-02-27 12:11 ` Maxime Ripard
2023-02-27 12:28 ` Jagan Teki [this message]
2023-02-27 17:14 ` Maxime Ripard
2023-02-27 13:39 ` Jagan Teki
2023-02-27 11:39 ` [PATCH v13 03/18] drm: exynos: dsi: Drop explicit call to bridge detach Jagan Teki
2023-02-27 11:39 ` [PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper Jagan Teki
2023-02-27 18:55 ` Marek Vasut
2023-02-27 19:01 ` Jagan Teki
2023-02-27 19:08 ` Marek Vasut
2023-02-27 19:15 ` Jagan Teki
2023-02-27 19:24 ` Marek Vasut
2023-02-27 19:34 ` Jagan Teki
2023-02-27 19:41 ` Marek Vasut
2023-02-27 19:49 ` Jagan Teki
2023-02-27 19:52 ` Jagan Teki
2023-02-27 20:10 ` Marek Vasut
2023-02-27 20:38 ` Jagan Teki
2023-02-28 12:04 ` Maxime Ripard
2023-02-28 14:39 ` Jagan Teki
2023-02-28 14:56 ` Maxime Ripard
2023-02-28 15:09 ` Jagan Teki
2023-02-28 12:10 ` Maxime Ripard
2023-02-28 12:34 ` Jagan Teki
2023-02-28 14:35 ` Maxime Ripard
2023-02-28 14:50 ` Jagan Teki
2023-02-27 11:39 ` [PATCH v13 05/18] drm: exynos: dsi: Mark PHY as optional Jagan Teki
2023-02-27 11:39 ` [PATCH v13 06/18] drm: exynos: dsi: Add platform PLL_P (PMS_P) offset Jagan Teki
2023-02-27 11:39 ` [PATCH v13 07/18] drm: exynos: dsi: Introduce hw_type platform data Jagan Teki
2023-02-27 11:39 ` [PATCH v13 08/18] drm: exynos: dsi: Handle proper host initialization Jagan Teki
2023-02-27 11:39 ` [PATCH v13 09/18] drm: exynos: dsi: Add atomic check Jagan Teki
2023-02-27 11:39 ` [PATCH v13 10/18] drm: exynos: dsi: Add input_bus_flags Jagan Teki
2023-02-27 11:39 ` [PATCH v13 11/18] drm: exynos: dsi: Add atomic_get_input_bus_fmts Jagan Teki
2023-02-27 14:12 ` Marek Vasut
2023-02-27 11:39 ` [PATCH v13 12/18] drm: exynos: dsi: Consolidate component and bridge Jagan Teki
2023-02-27 14:08 ` Marek Vasut
2023-02-27 11:39 ` [PATCH v13 13/18] drm: exynos: dsi: Add host helper for te_irq_handler Jagan Teki
2023-02-27 14:10 ` Marek Vasut
2023-02-27 11:39 ` [PATCH v13 15/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support Jagan Teki
2023-02-27 11:39 ` [PATCH v13 16/18] drm: bridge: samsung-dsim: Add " Jagan Teki
2023-02-27 11:39 ` [PATCH v13 17/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Jagan Teki
2023-02-27 11:39 ` [PATCH v13 18/18] drm: bridge: samsung-dsim: Add " Jagan Teki
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='CAMty3ZDt64C0dv2=wVcaCLdZVFU2u6D4EKswuoqEjvByKyMseg@mail.gmail.com' \
--to=jagan@amarulasolutions.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=matteo.lisi@engicam.com \
--cc=maxime@cerno.tech \
--cc=sw0312.kim@samsung.com \
--cc=tharvey@gateworks.com \
/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).