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

Commit 50c32447 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dp: add lane map support for sm8150"

parents b5e501be 3fa23ee5
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -858,6 +858,8 @@ static void dp_catalog_ctrl_lane_mapping(struct dp_catalog_ctrl *ctrl,
{
	struct dp_catalog_private *catalog;
	struct dp_io_data *io_data;
	u8 l_map[4], i;
	u32 lane_map_reg = 0;

	if (!ctrl) {
		pr_err("invalid input\n");
@@ -867,8 +869,14 @@ static void dp_catalog_ctrl_lane_mapping(struct dp_catalog_ctrl *ctrl,
	catalog = dp_catalog_get_priv(ctrl);
	io_data = catalog->io.dp_link;

	for (i = 0; i < DP_MAX_PHY_LN; i++)
		l_map[i] = lane_map[i];

	lane_map_reg = ((l_map[3]&3)<<6)|((l_map[2]&3)<<4)|((l_map[1]&3)<<2)
			|(l_map[0]&3);

	dp_write(catalog->exe_mode, io_data, DP_LOGICAL2PHYSICAL_LANE_MAPPING,
			0xe4);
			lane_map_reg);
}

static void dp_catalog_ctrl_lane_pnswap(struct dp_catalog_ctrl *ctrl,
+6 −0
Original line number Diff line number Diff line
@@ -158,6 +158,12 @@ static int dp_parser_misc(struct dp_parser *parser)
	if (data && (len == DP_MAX_PHY_LN)) {
		for (i = 0; i < len; i++)
			parser->l_map[i] = data[i];
	} else {
		pr_debug("Incorrect mapping, configure default\n");
		parser->l_map[0] = DP_PHY_LN0;
		parser->l_map[1] = DP_PHY_LN1;
		parser->l_map[2] = DP_PHY_LN2;
		parser->l_map[3] = DP_PHY_LN3;
	}

	data = of_get_property(of_node, "qcom,pn-swap-lane-map", &len);