Message ID | 20240320201152.3487892-10-imre.deak@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/11] drm/i915/dp: Fix DSC line buffer depth programming | expand |
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@redhat.com> > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Imre Deak <imre.deak@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.
On Wed, Mar 27, 2024 at 02:30:53PM +0530, Nautiyal, Ankit K wrote: > > 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@redhat.com> > > Cc: dri-devel@lists.freedesktop.org > > Signed-off-by: Imre Deak <imre.deak@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. Yes thanks, the header change should've been in this patch, will move it here (while applying the patches if nothing else comes up). > 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.
On 3/27/2024 7:55 PM, Imre Deak wrote: > On Wed, Mar 27, 2024 at 02:30:53PM +0530, Nautiyal, Ankit K wrote: >> 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@redhat.com> >>> Cc: dri-devel@lists.freedesktop.org >>> Signed-off-by: Imre Deak <imre.deak@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. > Yes thanks, the header change should've been in this patch, will move it here > (while applying the patches if nothing else comes up). With the above fixed, this is: Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> >> 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.
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); + /** * 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.
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@redhat.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Imre Deak <imre.deak@intel.com> --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)