mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
fbdev: add events for early fb event support
Add FB_EARLY_EVENT_BLANK and FB_R_EARLY_EVENT_BLANK event mode supports. first, fb_notifier_call_chain() is called with FB_EARLY_EVENT_BLANK and fb_blank() of specific fb driver is called and then fb_notifier_call_chain() is called with FB_EVENT_BLANK again at fb_blank(). and if fb_blank() was failed then fb_nitifier_call_chain() would be called with FB_R_EARLY_EVENT_BLANK to revert the previous effects. Signed-off-by: Inki Dae <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Acked-by: Florian Tobias Schandinat <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
aa523a82ee
commit
bf05929f41
2 changed files with 19 additions and 6 deletions
|
|
@ -1046,20 +1046,29 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
|
|||
int
|
||||
fb_blank(struct fb_info *info, int blank)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
struct fb_event event;
|
||||
int ret = -EINVAL, early_ret;
|
||||
|
||||
if (blank > FB_BLANK_POWERDOWN)
|
||||
blank = FB_BLANK_POWERDOWN;
|
||||
|
||||
event.info = info;
|
||||
event.data = ␣
|
||||
|
||||
early_ret = fb_notifier_call_chain(FB_EARLY_EVENT_BLANK, &event);
|
||||
|
||||
if (info->fbops->fb_blank)
|
||||
ret = info->fbops->fb_blank(blank, info);
|
||||
|
||||
if (!ret) {
|
||||
struct fb_event event;
|
||||
|
||||
event.info = info;
|
||||
event.data = ␣
|
||||
if (!ret)
|
||||
fb_notifier_call_chain(FB_EVENT_BLANK, &event);
|
||||
else {
|
||||
/*
|
||||
* if fb_blank is failed then revert effects of
|
||||
* the early blank event.
|
||||
*/
|
||||
if (!early_ret)
|
||||
fb_notifier_call_chain(FB_R_EARLY_EVENT_BLANK, &event);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue