All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 08/14] drm/dp-mst: Parse FEC capability on MST ports
Date: Mon, 19 Aug 2019 11:50:32 -0400	[thread overview]
Message-ID: <20190819155038.1771-9-David.Francis@amd.com> (raw)
In-Reply-To: <20190819155038.1771-1-David.Francis-5C7GfCeVMHo@public.gmane.org>

As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating
if FEC can be supported up to that point in the MST network.

The bit is the first byte of the ENUM_PATH_RESOURCES ack reply,
bottom-most bit (refer to section 2.11.9.4 of DP standard,
v1.4)

That value is needed for FEC and DSC support

Store it on drm_dp_mst_port

Signed-off-by: David Francis <David.Francis@amd.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++
 include/drm/drm_dp_mst_helper.h       | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 398e7314ea8b..53a0ad16e37b 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -552,6 +552,7 @@ static bool drm_dp_sideband_parse_enum_path_resources_ack(struct drm_dp_sideband
 {
 	int idx = 1;
 	repmsg->u.path_resources.port_number = (raw->msg[idx] >> 4) & 0xf;
+	repmsg->u.path_resources.fec_capable = raw->msg[idx] & 0x1;
 	idx++;
 	if (idx > raw->curlen)
 		goto fail_len;
@@ -2180,6 +2181,7 @@ static int drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr,
 			DRM_DEBUG_KMS("enum path resources %d: %d %d\n", txmsg->reply.u.path_resources.port_number, txmsg->reply.u.path_resources.full_payload_bw_number,
 			       txmsg->reply.u.path_resources.avail_payload_bw_number);
 			port->available_pbn = txmsg->reply.u.path_resources.avail_payload_bw_number;
+			port->fec_capable = txmsg->reply.u.path_resources.fec_capable;
 		}
 	}
 
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index 2ba6253ea6d3..e1801781fff5 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -108,6 +108,8 @@ struct drm_dp_mst_port {
 	 * audio-capable.
 	 */
 	bool has_audio;
+
+	bool fec_capable;
 };
 
 /**
@@ -312,6 +314,7 @@ struct drm_dp_port_number_req {
 
 struct drm_dp_enum_path_resources_ack_reply {
 	u8 port_number;
+	bool fec_capable;
 	u16 full_payload_bw_number;
 	u16 avail_payload_bw_number;
 };
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-08-19 15:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 15:50 [PATCH 00/14] Display Stream Compression (DSC) for AMD Navi David Francis
2019-08-19 15:50 ` [PATCH 02/14] Revert "drm/amd/display: navi10 bring up skip dsc encoder config" David Francis
     [not found] ` <20190819155038.1771-1-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-19 15:50   ` [PATCH 01/14] Revert "drm/amd/display: skip dsc config for navi10 bring up" David Francis
2019-08-19 15:50   ` [PATCH 03/14] Revert "drm/amd/display: add global master update lock for DCN2" David Francis
2019-08-19 15:50   ` [PATCH 04/14] Revert "drm/amd/display: Fix underscan not using proper scaling" David Francis
2019-08-19 15:50   ` [PATCH 05/14] drm/amd/display: Enable SST DSC in DM David Francis
     [not found]     ` <20190819155038.1771-6-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-19 18:46       ` Mikita Lipski
2019-08-19 15:50   ` [PATCH 06/14] drm/amd/display: Use dc helpers to compute timeslot distribution David Francis
     [not found]     ` <20190819155038.1771-7-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-19 19:21       ` Kazlauskas, Nicholas
2019-08-19 19:35         ` Francis, David
2019-08-19 15:50   ` [PATCH 07/14] drm/amd/display: Initialize DSC PPS variables to 0 David Francis
2019-08-19 19:36     ` Kazlauskas, Nicholas
2019-08-19 15:50   ` David Francis [this message]
2019-08-19 15:50   ` [PATCH 09/14] drm/dp-mst: Export symbols for dpcd read/write David Francis
2019-08-19 15:50   ` [PATCH 10/14] drm/dp-mst: Fill branch->num_ports David Francis
2019-08-19 15:50   ` [PATCH 11/14] drm/amd/display: Validate DSC caps on MST endpoints David Francis
2019-08-19 15:50   ` [PATCH 12/14] drm/amd/display: Write DSC enable to MST DPCD David Francis
2019-08-19 15:50   ` [PATCH 13/14] drm/amd/display: MST DSC compute fair share David Francis
2019-08-19 15:50   ` [PATCH 14/14] drm/amd/display: Trigger modesets on MST DSC connectors David Francis
     [not found]     ` <20190819155038.1771-15-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-19 19:34       ` Kazlauskas, Nicholas
2019-08-19 19:40         ` Francis, David

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=20190819155038.1771-9-David.Francis@amd.com \
    --to=david.francis-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.