From: Lyude Paul <lyude@redhat.com>
To: Wayne Lin <Wayne.Lin@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: jerry.zuo@amd.com, Nicholas.Kazlauskas@amd.com
Subject: Re: [PATCH 1/2] drm/dp_mst: Add a function to determine the mst end device
Date: Tue, 14 Jan 2020 16:15:48 -0500 [thread overview]
Message-ID: <e9312adec3c177cd70a4c65d60bbc291ac9d8fb6.camel@redhat.com> (raw)
In-Reply-To: <20200108084416.6296-2-Wayne.Lin@amd.com>
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.
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@amd.com>
> ---
> 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-01-14 21:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 8:44 [PATCH 0/2] Take SST-only branch device into account Wayne Lin
2020-01-08 8:44 ` [PATCH 1/2] drm/dp_mst: Add a function to determine the mst end device Wayne Lin
2020-01-14 21:15 ` Lyude Paul [this message]
2020-01-15 2:40 ` Lin, Wayne
2020-01-08 8:44 ` [PATCH 2/2] drm/dp_mst: Handle SST-only branch device case Wayne Lin
2020-01-14 21:18 ` Lyude Paul
2020-01-15 2:43 ` Lin, Wayne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9312adec3c177cd70a4c65d60bbc291ac9d8fb6.camel@redhat.com \
--to=lyude@redhat.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=Wayne.Lin@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jerry.zuo@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).