diff options
| author | Imre Deak <[email protected]> | 2024-04-16 22:10:08 +0000 |
|---|---|---|
| committer | Imre Deak <[email protected]> | 2024-04-19 14:20:53 +0000 |
| commit | 93cb4094a7fd30a6e20b9781aafb94e3fffbe59a (patch) | |
| tree | 81963df673d375a406411b487bd7eff902cfa947 /drivers/gpu/drm/display/drm_dp_mst_topology.c | |
| parent | drm/dp_mst: Factor out drm_dp_mst_port_is_logical() (diff) | |
| download | kernel-93cb4094a7fd30a6e20b9781aafb94e3fffbe59a.tar.gz kernel-93cb4094a7fd30a6e20b9781aafb94e3fffbe59a.zip | |
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]
Diffstat (limited to 'drivers/gpu/drm/display/drm_dp_mst_topology.c')
| -rw-r--r-- | drivers/gpu/drm/display/drm_dp_mst_topology.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c index 46b99d5fe008..3577786b5db2 100644 --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c @@ -6011,6 +6011,22 @@ static bool drm_dp_mst_is_virtual_dpcd(struct drm_dp_mst_port *port) } /** + * drm_dp_mst_aux_for_parent() - Get the AUX device for an MST port's parent + * @port: MST port whose parent's AUX device is returned + * + * Return the AUX device for @port's parent or NULL if port's parent is the + * root port. + */ +struct drm_dp_aux *drm_dp_mst_aux_for_parent(struct drm_dp_mst_port *port) +{ + if (!port->parent || !port->parent->port_parent) + return NULL; + + return &port->parent->port_parent->aux; +} +EXPORT_SYMBOL(drm_dp_mst_aux_for_parent); + +/** * drm_dp_mst_dsc_aux_for_port() - Find the correct aux for DSC * @port: The port to check. A leaf of the MST tree with an attached display. * |
