From f7bad5e06ae0f69a5a40dbe0d183b269b1fbde5c Mon Sep 17 00:00:00 2001 From: Chandan Uddaraju Date: Wed, 23 Dec 2015 11:03:49 -0800 Subject: [PATCH] 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: Chandan Uddaraju --- drivers/video/fbdev/msm/mdss_fb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 0e97cdc24b41..d4300338074e 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -712,9 +712,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; }