linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Richard Purdie" <rpurdie@rpsys.net>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: adaplas@pol.net, zap@homelink.ru
Subject: fbdev: Add FB_EVENT_BLANK to notify listeners of a blanking status change
Date: Mon, 29 Nov 2004 22:36:59 -0000	[thread overview]
Message-ID: <01f301c4d664$5c950440$0f01a8c0@max> (raw)
In-Reply-To: 200411280914.40352.adaplas@hotpop.com

Add FB_EVENT_BLANK to notify listeners of a blanking status change. This 
allows backlight drivers to be implemented completely separately from any 
framebuffer driver. The new blanking mode is passed in event.data.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>

--- linux-2.6.10-rc2/drivers/video/fbmem.c~fb_blank
+++ linux-2.6.10-rc2/drivers/video/fbmem.c
@@ -744,9 +744,14 @@
 fb_blank(struct fb_info *info, int blank)
 {
  int err = -EINVAL;
+ struct fb_event event;

   if (blank > FB_BLANK_POWERDOWN)
    blank = FB_BLANK_POWERDOWN;
+
+ event.info = info;
+ event.data = &blank;
+ notifier_call_chain(&fb_notifier_list, FB_EVENT_BLANK, &event);

  if (info->fbops->fb_blank)
    err = info->fbops->fb_blank(blank, info);
--- linux-2.6.10-rc2/include/linux/fb.h~fb_blank
+++ linux-2.6.10-rc2/include/linux/fb.h
@@ -488,6 +488,8 @@
 #define FB_EVENT_GET_CONSOLE_MAP        0x06
 /*      set console to framebuffer mapping */
 #define FB_EVENT_SET_CONSOLE_MAP        0x07
+/*      Blanking on the display on this fb_info has changed */
+#define FB_EVENT_BLANK                  0x08


 struct fb_event {
--- linux-2.6.10-rc2/drivers/video/console/fbcon.c~fb_blank
+++ linux-2.6.10-rc2/drivers/video/console/fbcon.c
@@ -2063,8 +2063,7 @@
    fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
    ops->cursor_flash = (!blank);

-   if (info->fbops->fb_blank)
-    ret = info->fbops->fb_blank(blank, info);
+  ret = fb_blank(info, blank);

    if (ret)
     fbcon_generic_blank(vc, info, blank);




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

  reply	other threads:[~2004-11-29 22:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 17:04 Default timings in vga16fb driver Martin Wilck
2004-11-24 16:16 ` Antonino A. Daplas
2004-11-25 14:55   ` Martin Wilck
2004-11-25 19:51     ` Antonino A. Daplas
2004-11-26  9:11       ` Geert Uytterhoeven
2004-11-27 14:53         ` FB_EVENT (blank and unblank?) Richard Purdie
2004-11-27 22:43           ` Antonino A. Daplas
2004-11-27 23:59             ` Richard Purdie
2004-11-28  0:24               ` Antonino A. Daplas
2004-11-28  0:59                 ` Richard Purdie
2004-11-28  1:14                   ` Antonino A. Daplas
2004-11-29 22:36                     ` Richard Purdie [this message]
2004-11-29 23:29                       ` fbdev: Add FB_EVENT_BLANK to notify listeners of a blanking status change Antonino A. Daplas
2004-11-29 10:53     ` cursor color changes ramprasad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01f301c4d664$5c950440$0f01a8c0@max' \
    --to=rpurdie@rpsys.net \
    --cc=adaplas@pol.net \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=zap@homelink.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).