[PATCH v4 13/17] drm/bridge: analogix_dp: Convert &analogix_dp_device.aux into a pointer
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Mon Dec 30 13:35:33 UTC 2024
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 at rock-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
More information about the dri-devel
mailing list