[PATCH 09/11] drm/dp_mst: Add drm_dp_mst_aux_for_parent()
Nautiyal, Ankit K
ankit.k.nautiyal at intel.com
Wed Mar 27 09:00:53 UTC 2024
On 3/21/2024 1:41 AM, Imre Deak wrote:
> 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.
>
> Cc: Lyude Paul <lyude at redhat.com>
> Cc: dri-devel at lists.freedesktop.org
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 6bd471a2266ce..d70f7de644371 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -6004,6 +6004,22 @@ static bool drm_dp_mst_is_virtual_dpcd(struct drm_dp_mst_port *port)
> return false;
> }
>
> +/**
> + * 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);
As mentioned in previous patch, the declaration of this in the header,
got included in previous patch.
Regards,
Ankit
> +
> /**
> * 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.
More information about the Intel-gfx
mailing list