long timeout = MAX_SCHEDULE_TIMEOUT;
unsigned long target_rate = 0;
unsigned long s = sys_status;
+ bool auto_self_refresh = false;
char *mode = NULL;
dprintk(DEBUG_VERBOSE, "sys_status %02lx\n", sys_status);
if (ddr.suspend_rate && (s & SYS_STATUS_SUSPEND)) {
if (ddr.suspend_rate > target_rate) {
target_rate = ddr.suspend_rate;
+ auto_self_refresh = true;
mode = "suspend";
}
}
if (ddr.performance_rate && (s & SYS_STATUS_PERFORMANCE)) {
if (ddr.performance_rate > target_rate) {
target_rate = ddr.performance_rate;
+ auto_self_refresh = false;
mode = "performance";
}
}
(s & SYS_STATUS_LCDC0) && (s & SYS_STATUS_LCDC1)) {
if (ddr.dualview_rate > target_rate) {
target_rate = ddr.dualview_rate;
+ auto_self_refresh = false;
mode = "dual-view";
}
}
(s & SYS_STATUS_HDMI)) {
if (ddr.hdmi_rate > target_rate) {
target_rate = ddr.hdmi_rate;
+ auto_self_refresh = false;
mode = "hdmi";
}
}
if (ddr.video_4k_rate && (s & SYS_STATUS_VIDEO_4K)) {
if (ddr.video_4k_rate > target_rate) {
target_rate = ddr.video_4k_rate;
+ auto_self_refresh = false;
mode = "video_4k";
}
}
if (ddr.video_1080p_rate && (s & SYS_STATUS_VIDEO_1080P)) {
if (ddr.video_1080p_rate > target_rate) {
target_rate = ddr.video_1080p_rate;
+ auto_self_refresh = false;
mode = "video_1080p";
}
}
if (ddr.isp_rate && (s & SYS_STATUS_ISP)) {
if (ddr.isp_rate > target_rate) {
target_rate = ddr.isp_rate;
+ auto_self_refresh = false;
mode = "isp";
}
}
if (target_rate > 0) {
- ddrfreq_mode(false, target_rate, mode);
+ ddrfreq_mode(auto_self_refresh, target_rate, mode);
} else {
if (ddr.auto_freq) {
ddr_auto_freq();