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

Commit 91dbc16d authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Trigger idle fallback when no update due to touch



Trigger an idle fallback with a reasonable timeout value when
there is no update despite of a touch event and idle_time is 0.
This will reset the refresh rate to minimum fps.

CRs-Fixed: 2003247
Change-Id: I4a2964038f23984bf1ea39c63bf679d80ad12cba
Signed-off-by: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
parent f01c0978
Loading
Loading
Loading
Loading
+14 −3
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -2117,10 +2117,21 @@ static int mdss_mdp_video_early_wake_up(struct mdss_mdp_ctl *ctl)
	 * lot of latency rendering the input events useless in preventing the
	 * lot of latency rendering the input events useless in preventing the
	 * idle time out.
	 * idle time out.
	 */
	 */
	if (ctl->mfd->idle_state == MDSS_FB_IDLE_TIMER_RUNNING) {
	if ((ctl->mfd->idle_state == MDSS_FB_IDLE_TIMER_RUNNING) ||
		if (ctl->mfd->idle_time)
				(ctl->mfd->idle_state == MDSS_FB_IDLE)) {
		/*
		 * Modify the idle time so that an idle fallback can be
		 * triggered for those cases, where we have no update
		 * despite of a touch event and idle time is 0.
		 */
		if (!ctl->mfd->idle_time) {
			ctl->mfd->idle_time = 70;
			schedule_delayed_work(&ctl->mfd->idle_notify_work,
							msecs_to_jiffies(200));
		} else {
			mod_delayed_work(system_wq, &ctl->mfd->idle_notify_work,
			mod_delayed_work(system_wq, &ctl->mfd->idle_notify_work,
					 msecs_to_jiffies(ctl->mfd->idle_time));
					 msecs_to_jiffies(ctl->mfd->idle_time));
		}
		pr_debug("Delayed idle time\n");
		pr_debug("Delayed idle time\n");
	} else {
	} else {
		pr_debug("Nothing to done for this state (%d)\n",
		pr_debug("Nothing to done for this state (%d)\n",