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

Commit 402ff345 authored by Dhaval Patel's avatar Dhaval Patel
Browse files

msm: mdss: avoid panel status check when panel is off



Sending BTA or other panel check status commands to the
panel, when panel is off might lead to abnormal
behavior. Since client can poll for the panel status
anytime, add necessary checks to avoid sending commands
when panel is off.

Change-Id: I95acc3df464d0a4640b79963b5701fcde79646d5
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 83ff89ab
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -560,10 +560,14 @@ static ssize_t mdss_fb_get_panel_status(struct device *dev,
	int ret;
	int panel_status;

	if (mdss_panel_is_power_off(mfd->panel_power_state)) {
		ret = scnprintf(buf, PAGE_SIZE, "panel_status=%s\n", "suspend");
	} else {
		panel_status = mdss_fb_send_panel_event(mfd,
				MDSS_EVENT_DSI_PANEL_STATUS, NULL);
		ret = scnprintf(buf, PAGE_SIZE, "panel_status=%s\n",
			panel_status > 0 ? "alive" : "dead");
	}

	return ret;
}