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

Commit d5c54353 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Id72d529e,I6ccd1a96,I125004c7,Icebe7fa2 into dev/msm-4.14-display

* changes:
  drm/msm/sde: deprecate force panel dead from connector
  drm/msm/dsi-staging: add software simulation of esd failure
  ARM: dts: msm: enable ulps for various displays on SM8150
  drm/msm/dsi-staging: avoid ulps entry while esd recovery is pending
parents f26e3995 b3935a9a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -480,6 +480,7 @@
};

&dsi_dual_nt35597_truly_cmd {
	qcom,ulps-enabled;
	qcom,esd-check-enabled;
	qcom,mdss-dsi-panel-status-check-mode = "reg_read";
	qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a];
@@ -557,6 +558,7 @@
};

&dsi_sharp_4k_dsc_cmd {
	qcom,ulps-enabled;
	qcom,esd-check-enabled;
	qcom,mdss-dsi-panel-status-check-mode = "reg_read";
	qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0c];
@@ -586,6 +588,7 @@
};

&dsi_nt35695b_truly_fhd_cmd {
	qcom,ulps-enabled;
	qcom,mdss-dsi-display-timings {
		timing@0 {
			qcom,mdss-dsi-panel-phy-timings = [00 1e 08 07 24 22
@@ -644,6 +647,7 @@
};

&dsi_sim_cmd {
	qcom,ulps-enabled;
	qcom,mdss-dsi-display-timings {
		timing@0{
			qcom,mdss-dsi-panel-phy-timings = [00 1c 08 07 23 22 07
@@ -678,6 +682,7 @@
};

&dsi_dual_sim_cmd {
	qcom,ulps-enabled;
	qcom,mdss-dsi-display-timings {
		timing@0{
			qcom,mdss-dsi-panel-phy-timings = [00 24 09 09 26 24 09
@@ -702,6 +707,7 @@
};

&dsi_sim_dsc_375_cmd {
	qcom,ulps-enabled;
	qcom,mdss-dsi-display-timings {
		timing@0 { /* 1080p */
			qcom,mdss-dsi-panel-phy-timings = [00 1c 08 07 23 22 07
@@ -721,6 +727,7 @@
};

&dsi_dual_sim_dsc_375_cmd {
	qcom,ulps-enabled;
	qcom,mdss-dsi-display-timings {
		timing@0 { /* qhd */
			qcom,mdss-dsi-panel-phy-timings = [00 1c 08 07 23 22 07
+25 −7
Original line number Diff line number Diff line
@@ -728,20 +728,25 @@ int dsi_display_check_status(struct drm_connector *connector, void *display,

	if (!panel->panel_initialized) {
		pr_debug("Panel not initialized\n");
		dsi_panel_release_panel_lock(panel);
		return rc;
		goto release_panel_lock;
	}

	/* Prevent another ESD check,when ESD recovery is underway */
	if (atomic_read(&panel->esd_recovery_pending)) {
		dsi_panel_release_panel_lock(panel);
		return rc;
	if (atomic_read(&panel->esd_recovery_pending))
		goto release_panel_lock;

	status_mode = panel->esd_config.status_mode;

	if (status_mode == ESD_MODE_SW_SIM_SUCCESS)
		goto release_panel_lock;

	if (status_mode == ESD_MODE_SW_SIM_FAILURE) {
		rc = -EINVAL;
		goto release_panel_lock;
	}

	if (te_check_override && gpio_is_valid(dsi_display->disp_te_gpio))
		status_mode = ESD_MODE_PANEL_TE;
	else
		status_mode = panel->esd_config.status_mode;

	dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
		DSI_ALL_CLKS, DSI_CLK_ON);
@@ -774,6 +779,8 @@ int dsi_display_check_status(struct drm_connector *connector, void *display,

	dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
		DSI_ALL_CLKS, DSI_CLK_OFF);

release_panel_lock:
	dsi_panel_release_panel_lock(panel);

	return rc;
@@ -1266,6 +1273,12 @@ static ssize_t debugfs_alter_esd_check_mode(struct file *file,
			dsi_display_change_te_irq_status(display, false);
	}

	if (!strcmp(buf, "esd_sw_sim_success\n"))
		esd_config->status_mode = ESD_MODE_SW_SIM_SUCCESS;

	if (!strcmp(buf, "esd_sw_sim_failure\n"))
		esd_config->status_mode = ESD_MODE_SW_SIM_FAILURE;

	rc = len;
error:
	kfree(buf);
@@ -1500,6 +1513,11 @@ static int dsi_display_is_ulps_req_valid(struct dsi_display *display,

	pr_debug("checking ulps req validity\n");

	if (atomic_read(&display->panel->esd_recovery_pending)) {
		pr_debug("%s: ESD recovery sequence underway\n", __func__);
		return false;
	}

	if (!dsi_panel_ulps_feature_enabled(display->panel) &&
			!display->panel->ulps_suspend_enabled) {
		pr_debug("%s: ULPS feature is not enabled\n", __func__);
+2 −0
Original line number Diff line number Diff line
@@ -125,6 +125,8 @@ enum esd_check_status_mode {
	ESD_MODE_REG_READ,
	ESD_MODE_SW_BTA,
	ESD_MODE_PANEL_TE,
	ESD_MODE_SW_SIM_SUCCESS,
	ESD_MODE_SW_SIM_FAILURE,
	ESD_MODE_MAX
};

+0 −10
Original line number Diff line number Diff line
@@ -1591,9 +1591,6 @@ static int sde_connector_init_debugfs(struct drm_connector *connector)
	sde_connector_get_info(connector, &info);
	if (sde_connector->ops.check_status &&
		(info.capabilities & MSM_DISPLAY_ESD_ENABLED)) {
		debugfs_create_u32("force_panel_dead", 0600,
				connector->debugfs_entry,
				&sde_connector->force_panel_dead);
		debugfs_create_u32("esd_status_interval", 0600,
				connector->debugfs_entry,
				&sde_connector->esd_status_interval);
@@ -1859,12 +1856,6 @@ static void sde_connector_check_status_work(struct work_struct *work)
	rc = conn->ops.check_status(&conn->base, conn->display, false);
	mutex_unlock(&conn->lock);

	if (conn->force_panel_dead) {
		conn->force_panel_dead--;
		if (!conn->force_panel_dead)
			goto status_dead;
	}

	if (rc > 0) {
		u32 interval;

@@ -1879,7 +1870,6 @@ static void sde_connector_check_status_work(struct work_struct *work)
		return;
	}

status_dead:
	_sde_connector_report_panel_dead(conn);
}

+0 −2
Original line number Diff line number Diff line
@@ -367,7 +367,6 @@ struct sde_connector_evt {
 * @event_lock: Lock object for event_table
 * @bl_device: backlight device node
 * @status_work: work object to perform status checks
 * @force_panel_dead: variable to trigger forced ESD recovery
 * @esd_status_interval: variable to change ESD check interval in millisec
 * @panel_dead: Flag to indicate if panel has gone bad
 * @esd_status_check: Flag to indicate if ESD thread is scheduled or not
@@ -414,7 +413,6 @@ struct sde_connector {

	struct backlight_device *bl_device;
	struct delayed_work status_work;
	u32 force_panel_dead;
	u32 esd_status_interval;
	bool panel_dead;
	bool esd_status_check;