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

Commit 7c017560 authored by Sankeerth Billakanti's avatar Sankeerth Billakanti
Browse files

drm/msm/dp: Fix for CTS link training failures on sm6150



Link training failures are observed in CTS on changing lane
count. The updated lane count is not getting programmed before
the link training. So, adding changes to program the lane count
before the start of link training sequence.

Change-Id: I133c282fd42a232753a39456598090b6c87c0065
Signed-off-by: default avatarSankeerth Billakanti <sbillaka@codeaurora.org>
parent 8b8c7dbc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -703,7 +703,7 @@ static void dp_catalog_ctrl_state_ctrl(struct dp_catalog_ctrl *ctrl, u32 state)
	wmb();
}

static void dp_catalog_ctrl_config_ctrl(struct dp_catalog_ctrl *ctrl)
static void dp_catalog_ctrl_config_ctrl(struct dp_catalog_ctrl *ctrl, u8 ln_cnt)
{
	struct dp_catalog_private *catalog;
	struct dp_io_data *io_data;
@@ -717,6 +717,11 @@ static void dp_catalog_ctrl_config_ctrl(struct dp_catalog_ctrl *ctrl)
	catalog = dp_catalog_get_priv(ctrl);
	io_data = catalog->io.dp_link;

	cfg = dp_read(catalog->exe_mode, io_data, DP_CONFIGURATION_CTRL);
	cfg &= ~(BIT(4) | BIT(5));
	cfg |= (ln_cnt - 1) << 4;
	dp_write(catalog->exe_mode, io_data, DP_CONFIGURATION_CTRL, cfg);

	cfg = dp_read(catalog->exe_mode, io_data, DP_MAINLINK_CTRL);
	cfg |= 0x02000000;
	dp_write(catalog->exe_mode, io_data, DP_MAINLINK_CTRL, cfg);
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ struct dp_catalog_ctrl {
	u32 isr5;

	void (*state_ctrl)(struct dp_catalog_ctrl *ctrl, u32 state);
	void (*config_ctrl)(struct dp_catalog_ctrl *ctrl);
	void (*config_ctrl)(struct dp_catalog_ctrl *ctrl, u8 ln_cnt);
	void (*lane_mapping)(struct dp_catalog_ctrl *ctrl, bool flipped,
				char *lane_map);
	void (*mainlink_ctrl)(struct dp_catalog_ctrl *ctrl, bool enable);
+2 −1
Original line number Diff line number Diff line
@@ -170,7 +170,8 @@ static void dp_ctrl_configure_source_link_params(struct dp_ctrl_private *ctrl,
		ctrl->catalog->lane_mapping(ctrl->catalog, ctrl->orientation,
						ctrl->parser->l_map);
		ctrl->catalog->mst_config(ctrl->catalog, ctrl->mst_mode);
		ctrl->catalog->config_ctrl(ctrl->catalog);
		ctrl->catalog->config_ctrl(ctrl->catalog,
				ctrl->link->link_params.lane_count);
		ctrl->catalog->mainlink_ctrl(ctrl->catalog, true);
	} else {
		ctrl->catalog->mainlink_ctrl(ctrl->catalog, false);