[AMD Public Use] > -----Original Message----- > From: Lyude Paul <lyude@xxxxxxxxxx> > Sent: Wednesday, January 15, 2020 5:16 AM > To: Lin, Wayne <Wayne.Lin@xxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx; > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Kazlauskas, Nicholas <Nicholas.Kazlauskas@xxxxxxx>; Wentland, Harry > <Harry.Wentland@xxxxxxx>; Zuo, Jerry <Jerry.Zuo@xxxxxxx> > Subject: Re: [PATCH 1/2] drm/dp_mst: Add a function to determine the mst end > device > > This patch series looks awesome so far, thank you for the great work! This > patch looks great, I think we should just squash it into the next patch though > since we don't use this function until then. > Thanks for your time. I will squash it in the new version. > On Wed, 2020-01-08 at 16:44 +0800, Wayne Lin wrote: > > [Why] > > For later usage convenience, add the function > > drm_dp_mst_is_dp_mst_end_device() to decide whether a peer device > > connected to a DFP is mst end device. Which also indicates if the peer > > device is capable of handling message or not. > > > > Signed-off-by: Wayne Lin <Wayne.Lin@xxxxxxx> > > --- > > drivers/gpu/drm/drm_dp_mst_topology.c | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c > > b/drivers/gpu/drm/drm_dp_mst_topology.c > > index eebf325d7f48..8f54b241db08 100644 > > --- a/drivers/gpu/drm/drm_dp_mst_topology.c > > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c > > @@ -1918,6 +1918,22 @@ static u8 drm_dp_calculate_rad(struct > > drm_dp_mst_port *port, > > return parent_lct + 1; > > } > > > > +static bool drm_dp_mst_is_dp_mst_end_device(u8 pdt, bool mcs) { > > + switch (pdt) { > > + case DP_PEER_DEVICE_DP_LEGACY_CONV: > > + case DP_PEER_DEVICE_SST_SINK: > > + return true; > > + case DP_PEER_DEVICE_MST_BRANCHING: > > + /* For sst branch device */ > > + if (!mcs) > > + return true; > > + > > + return false; > > + } > > + return true; > > +} > > + > > static int drm_dp_port_set_pdt(struct drm_dp_mst_port *port, u8 > > new_pdt) { > > struct drm_dp_mst_topology_mgr *mgr = port->mgr; > -- > Cheers, > Lyude Paul -- Best regards, Wayne Lin _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx