{
struct fb_event *event = data;
int blank_mode = *((int *)event->data);
+ static bool enable = false;
if (action == FB_EARLY_EVENT_BLANK) {
switch (blank_mode) {
case FB_BLANK_UNBLANK:
- clk_prepare_enable(clk_get_sys(NULL, "clk_cpll"));
- clk_prepare_enable(clk_get_sys(NULL, "clk_npll"));
+ if (!enable) {
+ clk_prepare_enable(clk_get_sys(NULL, "clk_cpll"));
+ clk_prepare_enable(clk_get_sys(NULL, "clk_npll"));
+ enable = true;
+ }
break;
default:
break;
} else if (action == FB_EVENT_BLANK) {
switch (blank_mode) {
case FB_BLANK_POWERDOWN:
- clk_disable_unprepare(clk_get_sys(NULL, "clk_cpll"));
- clk_disable_unprepare(clk_get_sys(NULL, "clk_npll"));
+ if (enable) {
+ clk_disable_unprepare(clk_get_sys(NULL, "clk_cpll"));
+ clk_disable_unprepare(clk_get_sys(NULL, "clk_npll"));
+ enable = false;
+ }
break;
default:
break;