* [PATCH 34/41] fbdev: Save the activate field before calling fb_check_var()
@ 2007-04-25 7:14 Antonino A. Daplas
0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2007-04-25 7:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Fbdev development list
Some drivers may reset the var->activate field on fb_check_var(). This can
lead to undefined behavior. For example, doing fbset -a <option> with vga16fb
will only modify the active console instead of modifying all.
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
---
drivers/video/fbmem.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index c4ce3e4..cd14079 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -803,6 +803,8 @@ fb_set_var(struct fb_info *info, struct
if ((var->activate & FB_ACTIVATE_FORCE) ||
memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) {
+ u32 activate = var->activate;
+
if (!info->fbops->fb_check_var) {
*var = info->var;
return 0;
@@ -831,7 +833,7 @@ fb_set_var(struct fb_info *info, struct
if (!err && (flags & FBINFO_MISC_USEREVENT)) {
struct fb_event event;
- int evnt = (var->activate & FB_ACTIVATE_ALL) ?
+ int evnt = (activate & FB_ACTIVATE_ALL) ?
FB_EVENT_MODE_CHANGE_ALL :
FB_EVENT_MODE_CHANGE;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-25 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25 7:14 [PATCH 34/41] fbdev: Save the activate field before calling fb_check_var() Antonino A. Daplas
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).