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

Commit e6bd2d9f authored by Saikumar Kurapati's avatar Saikumar Kurapati
Browse files

Merge remote-tracking branch 'quic/dev/msm-4.14-display' into msm-4.14.c4



* quic/dev/msm-4.14-display:
  drm/msm: allow sde_atrace to show up on different process
  drm/msm: enable counter trace
  dts: sa8195: fix display can't work in DP_MST mode
  drm/msm/sde: cleanup writeback phys_enc structures during wb disable
  drm/msm/dsi-staging: Add a new bridge DTS property support
  drm/msm/sde: fix unpaired sde trace
  drm/msm/sde: ensure LUTDMA is complete when auto-refresh enable
  drm/msm/dp: add checks to prevent buffer overflows

Change-Id: I7231a1b15fa5ebaba6437ce3b9130cad2c82fb6b
Signed-off-by: default avatarSaikumar Kurapati <saikk@codeaurora.org>
parents 7229f014 c9152156
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -302,5 +302,9 @@
};

&mdss_mdp {
	qcom,sde-ctl-display-pref = "primary", "none", "none",
				"none", "none";
	qcom,sde-mixer-display-pref = "primary", "none", "none",
				"none", "none", "none";
	connectors = <&dsi_dp1 &dsi_dp2 &sde_dp &sde_wb>;
};
+16 −2
Original line number Diff line number Diff line
@@ -200,8 +200,7 @@ static ssize_t dp_debug_write_dpcd(struct file *file,
		goto bail;

	size = min_t(size_t, count, SZ_2K);

	if (size <= char_to_nib)
	if (size < 4)
		goto bail;

	buf = kzalloc(size, GFP_KERNEL);
@@ -231,6 +230,8 @@ static ssize_t dp_debug_write_dpcd(struct file *file,
	}

	size -= 4;
	if (size == 0)
		goto bail;

	dpcd_size = size / char_to_nib;
	data_len = dpcd_size;
@@ -316,6 +317,7 @@ static ssize_t dp_debug_read_dpcd(struct file *file,
			debug->aux->dpcd_updated(debug->aux);
	}

	len = min_t(size_t, count, len);
	if (!copy_to_user(user_buff, buf, len))
		*ppos += len;

@@ -647,6 +649,7 @@ static ssize_t dp_debug_max_pclk_khz_read(struct file *file,
			debug->dp_debug.max_pclk_khz,
			debug->parser->max_pclk_khz);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		return -EFAULT;
@@ -808,6 +811,7 @@ static ssize_t dp_debug_read_connected(struct file *file,

	len += snprintf(buf, SZ_8, "%d\n", debug->hpd->hpd_high);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len))
		return -EFAULT;

@@ -858,6 +862,7 @@ static ssize_t dp_debug_read_hdcp(struct file *file,

	len = sizeof(debug->dp_debug.hdcp_status);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, debug->dp_debug.hdcp_status, len))
		return -EFAULT;

@@ -921,6 +926,7 @@ static ssize_t dp_debug_read_edid_modes(struct file *file,
	}
	mutex_unlock(&connector->dev->mode_config.mutex);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		rc = -EFAULT;
@@ -996,6 +1002,7 @@ static ssize_t dp_debug_read_edid_modes_mst(struct file *file,
	}
	mutex_unlock(&connector->dev->mode_config.mutex);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		rc = -EFAULT;
@@ -1036,6 +1043,7 @@ static ssize_t dp_debug_read_mst_con_id(struct file *file,
	ret = snprintf(buf, max_size, "%u\n", debug->mst_con_id);
	len += ret;

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		rc = -EFAULT;
@@ -1099,6 +1107,7 @@ static ssize_t dp_debug_read_mst_conn_info(struct file *file,
	}
	mutex_unlock(&debug->dp_debug.dp_mst_connector_list.lock);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		rc = -EFAULT;
@@ -1188,6 +1197,7 @@ static ssize_t dp_debug_read_info(struct file *file, char __user *user_buff,
	if (dp_debug_check_buffer_overflow(rc, &max_size, &len))
		goto error;

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len))
		goto error;

@@ -1220,6 +1230,7 @@ static ssize_t dp_debug_bw_code_read(struct file *file,
	len += snprintf(buf + len, (SZ_4K - len),
			"max_bw_code = %d\n", debug->panel->max_bw_code);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		return -EFAULT;
@@ -1245,6 +1256,7 @@ static ssize_t dp_debug_tpg_read(struct file *file,

	len += snprintf(buf, SZ_8, "%d\n", debug->dp_debug.tpg_state);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len))
		return -EFAULT;

@@ -1435,6 +1447,7 @@ static ssize_t dp_debug_read_hdr(struct file *file,
			goto error;
	}

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len)) {
		kfree(buf);
		rc = -EFAULT;
@@ -1612,6 +1625,7 @@ static ssize_t dp_debug_read_dump(struct file *file,
	print_hex_dump(KERN_DEBUG, prefix, DUMP_PREFIX_NONE,
		16, 4, buf, len, false);

	len = min_t(size_t, count, len);
	if (copy_to_user(user_buff, buf, len))
		return -EFAULT;

+3 −3
Original line number Diff line number Diff line
@@ -186,14 +186,15 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
		return;
	}

	SDE_ATRACE_BEGIN("dsi_bridge_pre_enable");
	SDE_ATRACE_BEGIN("dsi_display_prepare");
	rc = dsi_display_prepare(c_bridge->display);
	if (rc) {
		pr_err("[%d] DSI display prepare failed, rc=%d\n",
		       c_bridge->id, rc);
		SDE_ATRACE_END("dsi_bridge_pre_enable");
		SDE_ATRACE_END("dsi_display_prepare");
		return;
	}
	SDE_ATRACE_END("dsi_display_prepare");

	SDE_ATRACE_BEGIN("dsi_display_enable");
	rc = dsi_display_enable(c_bridge->display);
@@ -203,7 +204,6 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
		(void)dsi_display_unprepare(c_bridge->display);
	}
	SDE_ATRACE_END("dsi_display_enable");
	SDE_ATRACE_END("dsi_bridge_pre_enable");

	rc = dsi_display_splash_res_cleanup(c_bridge->display);
	if (rc)
+23 −3
Original line number Diff line number Diff line
@@ -371,6 +371,24 @@ static int _sde_encoder_get_mode_info(struct drm_encoder *drm_enc,
	return sde_connector_get_mode_info(conn_state, mode_info);
}

static bool _sde_encoder_is_autorefresh_enabled(
		struct sde_encoder_virt *sde_enc)
{
	struct drm_connector *drm_conn;

	if (!sde_enc->cur_master ||
		!(sde_enc->disp_info.capabilities & MSM_DISPLAY_CAP_CMD_MODE))
		return false;

	drm_conn = sde_enc->cur_master->connector;

	if (!drm_conn || !drm_conn->state)
		return false;

	return sde_connector_get_property(drm_conn->state,
			CONNECTOR_PROP_AUTOREFRESH) ? true : false;
}

static bool _sde_encoder_is_dsc_enabled(struct drm_encoder *drm_enc)
{
	struct msm_compression_info *comp_info;
@@ -3865,7 +3883,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc)
	u32 pending_kickoff_cnt;
	struct msm_drm_private *priv = NULL;
	struct sde_kms *sde_kms = NULL;
	bool is_vid_mode = false;
	bool is_regdma_blocking = false, is_vid_mode = false;

	if (!sde_enc) {
		SDE_ERROR("invalid encoder\n");
@@ -3874,6 +3892,8 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc)

	is_vid_mode = sde_enc->disp_info.capabilities &
					MSM_DISPLAY_CAP_VID_MODE;
	is_regdma_blocking = (is_vid_mode ||
			_sde_encoder_is_autorefresh_enabled(sde_enc));

	/* don't perform flush/start operations for slave encoders */
	for (i = 0; i < sde_enc->num_phys_encs; i++) {
@@ -3902,7 +3922,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc)
		if (!phys->ops.needs_single_flush ||
				!phys->ops.needs_single_flush(phys)) {
			if (ctl->ops.reg_dma_flush)
				ctl->ops.reg_dma_flush(ctl, is_vid_mode);
				ctl->ops.reg_dma_flush(ctl, is_regdma_blocking);
			_sde_encoder_trigger_flush(&sde_enc->base, phys, 0x0);
		} else if (ctl->ops.get_pending_flush) {
			ctl->ops.get_pending_flush(ctl, &pending_flush);
@@ -3913,7 +3933,7 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc)
	if (pending_flush.pending_flush_mask && sde_enc->cur_master) {
		ctl = sde_enc->cur_master->hw_ctl;
		if (ctl->ops.reg_dma_flush)
			ctl->ops.reg_dma_flush(ctl, is_vid_mode);
			ctl->ops.reg_dma_flush(ctl, is_regdma_blocking);
		_sde_encoder_trigger_flush(&sde_enc->base, sde_enc->cur_master,
						&pending_flush);
	}
+2 −0
Original line number Diff line number Diff line
@@ -1594,6 +1594,8 @@ static void sde_encoder_phys_wb_disable(struct sde_encoder_phys *phys_enc)
exit:
	phys_enc->enable_state = SDE_ENC_DISABLED;
	wb_enc->crtc = NULL;
	phys_enc->hw_cdm = NULL;
	phys_enc->hw_ctl = NULL;
}

/**
Loading