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

Commit c0b81060 authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru
Browse files

msm: mdss: remove usage of DSI ctrl mutex during ESD/suspend path



The MDP control path mutex takes care of synchronizing display
suspend path and ESD thread to avoid race conditions. The DSI
OFF path is also taken care of under the MDP control path mutex.
Hence, avoid the usage of DSI ctrl mutex in ESD thread.

Change-Id: I523130bac65f9c4b736e19eb5888c83b9542ed27
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent 241c08df
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -128,11 +128,9 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
	if (mipi->mode == DSI_CMD_MODE)
		mutex_lock(&mdp5_data->ov_lock);
	mutex_lock(&ctl->offlock);
	mutex_lock(&ctrl_pdata->mutex);

	if (mdss_panel_is_power_off(pstatus_data->mfd->panel_power_state) ||
			pstatus_data->mfd->shutdown_pending) {
		mutex_unlock(&ctrl_pdata->mutex);
		mutex_unlock(&ctl->offlock);
		if (mipi->mode == DSI_CMD_MODE)
			mutex_unlock(&mdp5_data->ov_lock);
@@ -160,7 +158,6 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
	ret = ctrl_pdata->check_status(ctrl_pdata);
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);

	mutex_unlock(&ctrl_pdata->mutex);
	mutex_unlock(&ctl->offlock);
	if (mipi->mode == DSI_CMD_MODE)
		mutex_unlock(&mdp5_data->ov_lock);
+0 −2
Original line number Diff line number Diff line
@@ -1094,7 +1094,6 @@ static int mdss_dsi_off(struct mdss_panel_data *pdata, int power_state)
	ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata,
				panel_data);

	mutex_lock(&ctrl_pdata->mutex);
	panel_info = &ctrl_pdata->panel_data.panel_info;

	pr_debug("%s+: ctrl=%p ndx=%d power_state=%d\n",
@@ -1152,7 +1151,6 @@ panel_power_ctrl:
	/* Initialize Max Packet size for DCS reads */
	ctrl_pdata->cur_max_pkt_size = 0;
end:
	mutex_unlock(&ctrl_pdata->mutex);
	pr_debug("%s-:\n", __func__);

	return ret;