Thread (36 messages) 36 messages, 4 authors, 2025-01-07

Re: [PATCH v4 13/17] drm/bridge: analogix_dp: Convert &analogix_dp_device.aux into a pointer

From: Dmitry Baryshkov <hidden>
Date: 2024-12-30 13:35:39
Also in: dri-devel, linux-devicetree, linux-phy, linux-rockchip, lkml

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 <redacted>
---
 .../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(-)
[...]
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help