While it's normal for these events to happen after the other one,
with AOD or poorly made kernel source, we can receive the same event
consequently.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
switch (*blank) {
case FB_BLANK_POWERDOWN:
+ if (trigger_rapid_gc)
+ return NOTIFY_OK;
trigger_rapid_gc = true;
queue_work(system_power_efficient_wq, &rapid_gc_fb_worker);
break;
case FB_BLANK_UNBLANK:
+ if (!trigger_rapid_gc)
+ return NOTIFY_OK;
trigger_rapid_gc = false;
queue_work(system_power_efficient_wq, &rapid_gc_fb_worker);
break;