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

Commit e38d0f33 authored by Chandan Uddaraju's avatar Chandan Uddaraju
Browse files

mdss: fix dynamic FPS mode switch configuration



For dual DSI panels, DFPS mode switch configuration through
sysfs is not properly enabled for the second DSI interface.
Fix this by initializing the mode switch update variable.

While changing the DFPS mode, idle-time should be disabled
and the device should be configured to default FPS. Add
these checks when DFPS mode switch is initiated.

Change-Id: Ib9e67f20758e2fb1c72a747c31109364db1d1160
Signed-off-by: default avatarChandan Uddaraju <chandanu@codeaurora.org>
parent d871aa00
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -711,9 +711,22 @@ static ssize_t mdss_fb_change_dfps_mode(struct device *dev,
		return len;
	}

	if (mfd->idle_time != 0) {
		pr_err("ERROR: Idle time is not disabled.\n");
		return len;
	}

	if (pinfo->current_fps != pinfo->default_fps) {
		pr_err("ERROR: panel not configured to default fps\n");
		return len;
	}

	pinfo->dynamic_fps = true;
	pinfo->dfps_update = dfps_mode;

	if (pdata->next)
		pdata->next->panel_info.dfps_update = dfps_mode;

	return len;
}