Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308937
b: refs/heads/master
c: bf05929
h: refs/heads/master
i:
  308935: 511eca9
v: v3
  • Loading branch information
Inki Dae authored and Linus Torvalds committed May 29, 2012
1 parent 4b1bb02 commit b321c35
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa523a82ee1be3f50560338e06151918fd8613e7
refs/heads/master: bf05929f41d6c3c79ec1961d90d808a634f09dd9
21 changes: 15 additions & 6 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ struct fb_cursor_user {
#define FB_EVENT_FB_UNBIND 0x0E
/* CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */
#define FB_EVENT_REMAP_ALL_CONSOLE 0x0F
/* A hardware display blank early change occured */
#define FB_EARLY_EVENT_BLANK 0x10
/* A hardware display blank revert early change occured */
#define FB_R_EARLY_EVENT_BLANK 0x11

struct fb_event {
struct fb_info *info;
Expand Down

0 comments on commit b321c35

Please sign in to comment.