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

Commit 1e2dd125 authored by Shivaraj Shetty's avatar Shivaraj Shetty
Browse files

msm: mdss: Cancel ESD workqueue whenever display off happens



Display can be turned off by using different ioctls. Make sure that
in all the cases ESD workqueue is cancelled.

CRs-Fixed: 626835
Change-Id: Id14992665e4a86941386a8269600d322c3500a70
Signed-off-by: default avatarShivaraj Shetty <shivaraj@codeaurora.org>
parent 8f74c245
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)

	pstatus_data = container_of(to_delayed_work(work),
		struct dsi_status_data, check_status);
	if (!pstatus_data || !(pstatus_data->mfd)) {
		pr_err("%s: mfd not available\n", __func__);
		return;
	}

	pdata = dev_get_platdata(&pstatus_data->mfd->pdev->dev);
	if (!pdata) {
@@ -56,6 +60,11 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
	mdp5_data = mfd_to_mdp5_data(pstatus_data->mfd);
	ctl = mfd_to_ctl(pstatus_data->mfd);

	if (!ctl) {
		pr_err("%s: Display is off\n", __func__);
		return;
	}

	if (ctl->shared_lock)
		mutex_lock(ctl->shared_lock);
	mutex_lock(&mdp5_data->ov_lock);
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,11 @@ void mdp3_check_dsi_ctrl_status(struct work_struct *work,
	pdsi_status = container_of(to_delayed_work(work),
	struct dsi_status_data, check_status);

	if (!pdsi_status || !(pdsi_status->mfd)) {
		pr_err("%s: mfd not available\n", __func__);
		return;
	}

	pdata = dev_get_platdata(&pdsi_status->mfd->pdev->dev);
	if (!pdata) {
		pr_err("%s: Panel data not available\n", __func__);
@@ -56,6 +61,11 @@ void mdp3_check_dsi_ctrl_status(struct work_struct *work,
	}

	mdp3_session = pdsi_status->mfd->mdp.private1;
	if (!mdp3_session) {
		pr_err("%s: Display is off\n", __func__);
		return;
	}

	mutex_lock(&mdp3_session->lock);
	if (!mdp3_session->status) {
		pr_debug("%s: display off already\n", __func__);
+6 −0
Original line number Diff line number Diff line
@@ -106,8 +106,14 @@ static int fb_event_callback(struct notifier_block *self,
				msecs_to_jiffies(interval));
			break;
		case FB_BLANK_POWERDOWN:
		case FB_BLANK_HSYNC_SUSPEND:
		case FB_BLANK_VSYNC_SUSPEND:
		case FB_BLANK_NORMAL:
			cancel_delayed_work(&pdata->check_status);
			break;
		default:
			pr_err("Unknown case in FB_EVENT_BLANK event\n");
			break;
		}
	}
	return 0;