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

Commit dd30789a authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

drm/msm/dp: exit super speed mode when sink doesn't support it



Parse the DisplayPort Capability Data (DPCD) to get the number of
lanes  supported by the sink. If sink doesn't support super speed
USB concurrency for which sink amy request 2 lanes, request USB
driver to exit the super speed mode so that DisplayPort driver can
use all the lanes for data.

CRs-Fixed: 2093361
Change-Id: I076d14f4d04165dab8d8ca130ce59cb79acac6b9
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent b6117bd6
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ struct dp_panel_private {
	struct dp_panel dp_panel;
	struct dp_aux *aux;
	struct dp_catalog_panel *catalog;
	bool lane_switch_supported;
	bool aux_cfg_update_done;
};

@@ -66,11 +65,8 @@ static int dp_panel_read_dpcd(struct dp_panel *dp_panel)
		drm_dp_bw_code_to_link_rate(dp_panel->dpcd[DP_MAX_LINK_RATE]);
	pr_debug("link_rate=%d\n", link_info->rate);

	if (panel->lane_switch_supported)
	link_info->num_lanes = dp_panel->dpcd[DP_MAX_LANE_COUNT] &
				DP_MAX_LANE_COUNT_MASK;
	else
		link_info->num_lanes = 2;

	pr_debug("lane_count=%d\n", link_info->num_lanes);

+12 −0
Original line number Diff line number Diff line
@@ -374,6 +374,18 @@ static void dp_usbpd_response_cb(struct usbpd_svid_handler *hdlr, u8 cmd,

		pd->dp_usbpd.orientation = usbpd_get_plug_orientation(pd->pd);

		/*
		 * By default, USB reserves two lanes for Super Speed.
		 * Which means DP has remaining two lanes to operate on.
		 * If multi-function is not supported, request USB to
		 * release the Super Speed lanes so that DP can use
		 * all four lanes in case DPCD indicates support for
		 * four lanes.
		 */
		if (!pd->dp_usbpd.multi_func)
			pd->svid_handler.request_usb_ss_lane(pd->pd,
				&pd->svid_handler);

		if (pd->dp_cb && pd->dp_cb->configure)
			pd->dp_cb->configure(pd->dev);
		break;