Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8fa1d61 authored by David Francis's avatar David Francis Committed by Alistair Delva
Browse files

BACKPORT: drm/dp_mst: Parse FEC capability on MST ports



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

Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarDavid Francis <David.Francis@amd.com>
Signed-off-by: default avatarMikita Lipski <mikita.lipski@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a3c2b0ffc007e5d98f5313ed951fff092535fb6d)
Bug: 152417756
Signed-off-by: default avatarAlistair Delva <adelva@google.com>
Change-Id: Ie5b5d16aec40b36e58fda0d1a8aa58aa85fdd984
parent 8ee63850
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -488,6 +488,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;
@@ -1680,6 +1681,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;
		}
	}

+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ struct drm_dp_mst_port {
	 * audio-capable.
	 */
	bool has_audio;

	bool fec_capable;
};

/**
@@ -291,6 +293,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;
};