From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Sylvain Meyer <sylvain.meyer@worldonline.fr>,
Pavel Kysilka <goldenfish@bsys.cz>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH 2/2] intelfb/fbdev: Save info->flags in a local variable
Date: Mon, 15 Aug 2005 21:29:11 +0800 [thread overview]
Message-ID: <430098A7.1080102@gmail.com> (raw)
Reported by: Pavel Kysilka (Bugzilla Bug 5059)
Problem Description:
intelfb driver do not keep resolution set with fbset after switching to anot
console and back.
Steps to reproduce:
initial options: tty1,tty2 - 1024x768-60
1) tty1 - fbset after booting (1024x768-60)
2) tty1 - fbset 800x600-100
tty1: 800x600-100
3) swith to tty2, swith to tty1
tty1: 1024x768-60 (the same resolution as default from kernel booting)
This bug is caused by intelfb unintentionally destroying info->flags in
set_par(). Therefore the flag, FBINFO_MISC_USEREVENT used to notify
fbcon of a mode change was cleared causing the above problem. This bug
though is not intelfb specific, as other drivers may also be affected.
The fix is to save info->flags in a local variable before calling any
of the driver hooks. A more definitive fix (for post 2.6.13) is to
separate info->flags into one that is set by the driver and another that
is set by core fbdev/fbcon.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
fbmem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -643,8 +643,8 @@ fb_pan_display(struct fb_info *info, str
int
fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
{
- int err;
-
+ int err, flags = info->flags;
+
if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
int ret = 0;
@@ -697,7 +697,7 @@ fb_set_var(struct fb_info *info, struct
!list_empty(&info->modelist))
err = fb_add_videomode(&mode, &info->modelist);
- if (!err && info->flags & FBINFO_MISC_USEREVENT) {
+ if (!err && flags & FBINFO_MISC_USEREVENT) {
struct fb_event event;
int evnt = (var->activate & FB_ACTIVATE_ALL) ?
FB_EVENT_MODE_CHANGE_ALL :
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
next reply other threads:[~2005-08-15 13:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 13:29 Antonino A. Daplas [this message]
2005-08-15 16:28 ` [PATCH 2/2] intelfb/fbdev: Save info->flags in a local variable James Simmons
2005-08-15 16:31 ` James Simmons
2005-08-15 16:58 ` Linus Torvalds
2005-08-15 21:51 ` Antonino A. Daplas
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=430098A7.1080102@gmail.com \
--to=adaplas@gmail.com \
--cc=akpm@osdl.org \
--cc=goldenfish@bsys.cz \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=sylvain.meyer@worldonline.fr \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.