Skip to content

Commit 93cb409

Browse files
committed
drm/dp_mst: Add drm_dp_mst_aux_for_parent()
Add a function to get the AUX device of the parent of an MST port, used by a follow-up i915 patch in the patchset. v2: Move drm_dp_mst_aux_for_parent() forward declaration to this patch (Ankit) Cc: Lyude Paul <[email protected]> Cc: [email protected] Reviewed-by: Ankit Nautiyal <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ca5d9d7 commit 93cb409

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6010,6 +6010,22 @@ static bool drm_dp_mst_is_virtual_dpcd(struct drm_dp_mst_port *port)
60106010
return false;
60116011
}
60126012

6013+
/**
6014+
* drm_dp_mst_aux_for_parent() - Get the AUX device for an MST port's parent
6015+
* @port: MST port whose parent's AUX device is returned
6016+
*
6017+
* Return the AUX device for @port's parent or NULL if port's parent is the
6018+
* root port.
6019+
*/
6020+
struct drm_dp_aux *drm_dp_mst_aux_for_parent(struct drm_dp_mst_port *port)
6021+
{
6022+
if (!port->parent || !port->parent->port_parent)
6023+
return NULL;
6024+
6025+
return &port->parent->port_parent->aux;
6026+
}
6027+
EXPORT_SYMBOL(drm_dp_mst_aux_for_parent);
6028+
60136029
/**
60146030
* drm_dp_mst_dsc_aux_for_port() - Find the correct aux for DSC
60156031
* @port: The port to check. A leaf of the MST tree with an attached display.

include/drm/display/drm_dp_mst_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,7 @@ bool drm_dp_mst_port_is_logical(struct drm_dp_mst_port *port)
955955
return port->port_num >= DP_MST_LOGICAL_PORT_0;
956956
}
957957

958+
struct drm_dp_aux *drm_dp_mst_aux_for_parent(struct drm_dp_mst_port *port);
958959
struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port);
959960

960961
static inline struct drm_dp_mst_topology_state *

0 commit comments

Comments
 (0)