[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e52pbjnusvuoqiyoorjr5msrfmgeqs2jt5sk6zcesvzy7cszzk@fzrtpsjoklgu>
Date: Mon, 30 Dec 2024 15:35:33 +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 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.
> int ret;
>
> pm_runtime_get_sync(dp->dev);
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists