[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpo5aE4itm8MTeCpqns5eLuWj0TaZW5qwrw02_Zc73NNiw@mail.gmail.com>
Date: Mon, 6 Jan 2025 14:09:34 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Damon Ding <damon.ding@...k-chips.com>
Cc: heiko@...ech.de, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
rfoss@...nel.org, vkoul@...nel.org, sebastian.reichel@...labora.com,
cristian.ciocaltea@...labora.com, l.stach@...gutronix.de,
andy.yan@...k-chips.com, hjc@...k-chips.com, algea.cao@...k-chips.com,
kever.yang@...k-chips.com, dri-devel@...ts.freedesktop.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org
Subject: Re: [PATCH v4 13/17] drm/bridge: analogix_dp: Convert
&analogix_dp_device.aux into a pointer
On Mon, 6 Jan 2025 at 13:04, Damon Ding <damon.ding@...k-chips.com> wrote:
>
> Hi Dmitry,
>
> On 2024/12/30 21:35, Dmitry Baryshkov wrote:
> > On Thu, Dec 26, 2024 at 02:33:09PM +0800, Damon Ding wrote:
> >> With the previous patch related to the support of getting panel from
> >> the DP AUX bus, the &analogix_dp_device.aux can be obtained from the
> >> &analogix_dp_plat_data.aux.
> >>
> >> Furthermore, the assignment of &analogix_dp_plat_data.connector is
> >> intended to obtain the pointer of struct analogix_dp_device within the
> >> analogix_dpaux_transfer() function.
> >>
> >> Signed-off-by: Damon Ding <damon.ding@...k-chips.com>
> >> ---
> >> .../drm/bridge/analogix/analogix_dp_core.c | 92 ++++++++++---------
> >> .../drm/bridge/analogix/analogix_dp_core.h | 2 +-
> >> .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 2 +-
> >> 3 files changed, 50 insertions(+), 46 deletions(-)
> >>
> >
> > [...]
> >
> >> @@ -1127,6 +1128,7 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge,
> >>
> >> if (!dp->plat_data->skip_connector) {
> >> connector = &dp->connector;
> >> + dp->plat_data->connector = &dp->connector;
> >> connector->polled = DRM_CONNECTOR_POLL_HPD;
> >>
> >> ret = drm_connector_init(dp->drm_dev, connector,
> >> @@ -1535,7 +1537,9 @@ static int analogix_dp_dt_parse_pdata(struct analogix_dp_device *dp)
> >> static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
> >> struct drm_dp_aux_msg *msg)
> >> {
> >> - struct analogix_dp_device *dp = to_dp(aux);
> >> + struct analogix_dp_plat_data *plat_data = to_pdata(aux);
> >> + struct drm_connector *connector = plat_data->connector;
> >> + struct analogix_dp_device *dp = to_dp(connector);
> >
> > I see that Analogix DP driver doesn't support
> > DRM_BRIDGE_ATTACH_NO_CONNECTOR, but at the same time I don't think this
> > is the step in the right direction. Instead please keep the AUX bus on
> > the Analogix side and add an API to go from struct drm_dp_aux to struct
> > analogix_dp_plat_data. Then your done_probing() callback can use that
> > function.
> >
>
> It is truly a more concise way.
>
> In the next version, I will add the following functions on the Analogix
> side in order to get the pointers of struct analogix_dp_plat_data and
> struct drm_dp_aux on the Rockchip side. And the way has already been
> verified.
LGTM, thank you.
>
> struct analogix_dp_plat_data *analogix_dp_aux_to_plat_data(struct
> drm_dp_aux *aux)
> {
> struct analogix_dp_device *dp = to_dp(aux);
>
> return dp->plat_data;
> }
> EXPORT_SYMBOL_GPL(analogix_dp_aux_to_plat_data);
>
> struct drm_dp_aux *analogix_dp_get_aux(struct analogix_dp_device *dp)
> {
> return &dp->aux;
> }
> EXPORT_SYMBOL_GPL(analogix_dp_get_aux);
>
> >> int ret;
> >>
> >> pm_runtime_get_sync(dp->dev);
> >>
> >
>
> Best regards
> Damon
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists