From: Antonino Daplas <adaplas@pol.net>
To: Antonino Daplas <adaplas@pol.net>
Cc: Alexander Kern <alex.kern@gmx.de>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Fwd: [PATCH 2.5.59] fix for fbcon.c
Date: 17 Feb 2003 19:33:58 +0800 [thread overview]
Message-ID: <1045480744.1324.7.camel@localhost.localdomain> (raw)
In-Reply-To: <1043052322.3282.41.camel@localhost.localdomain>
On Mon, 2003-01-20 at 16:45, Antonino Daplas wrote:
> On Mon, 2003-01-20 at 02:56, Alexander Kern wrote:
>
> Yes, that will work, only if all your console have the same window
> size. If the size of one of your console is different, then these tests
> (x_diff > vc->vc_font.width || y_diff > vc->vc_font.height) will become
> true each time you switch consoles, so you'll be back with a yres of
> 1040 instead of 1050. The best solution is for the driver to round up
> to 1050 if 1040 is not acceptable.
>
> Still, its much better than the old one :-). If you don't mind, I'll
> add a few things to your patch:
>
> a. We do not need to activate the hardware immediately if there is a
> chance of failure.
>
> b. The xres/yres returned from fb_set_var() will be acceptable as long
> as the value is within a fontwidth/fontheight. This should fix hardware
> that only has a limited set of video modes.
>
Here's an incremental patch (linux-2.5.61 + James' latest fbdev.diff)
1. adjust display->vrows unconditionally during fbcon_resize(). This
should prevent console corruption when var->yres_virtual was changed
behind the back of the console, ie using fbset.
2. call fbcon_resize() as early as possible during fbcon_switch().
Tony
diff -Naur linux-2.5.61-fbdev/drivers/video/console/fbcon.c linux-2.5.61/drivers/video/console/fbcon.c
--- linux-2.5.61-fbdev/drivers/video/console/fbcon.c 2003-02-16 21:01:01.000000000 +0000
+++ linux-2.5.61/drivers/video/console/fbcon.c 2003-02-16 22:20:31.000000000 +0000
@@ -1879,8 +1879,8 @@
DPRINTK("resize now %ix%i\n", var.xres, var.yres);
var.activate = FB_ACTIVATE_NOW;
fb_set_var(&var, info);
- p->vrows = info->var.yres_virtual/fh;
}
+ p->vrows = info->var.yres_virtual/fh;
return 0;
}
@@ -1915,6 +1915,9 @@
}
if (info)
info->var.yoffset = p->yscroll = 0;
+
+ fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
+
switch (p->scrollmode & __SCROLL_YMASK) {
case __SCROLL_YWRAP:
scrollback_phys_max = p->vrows - vc->vc_rows;
@@ -1933,7 +1936,6 @@
info->currcon = unit;
- fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
update_var(unit, info);
fbcon_set_palette(vc, color_table);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
prev parent reply other threads:[~2003-02-17 11:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-19 18:56 Fwd: [PATCH 2.5.59] fix for fbcon.c Alexander Kern
2003-01-20 8:45 ` Antonino Daplas
2003-01-22 17:45 ` Alexander Kern
2003-02-17 11:33 ` Antonino Daplas [this message]
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=1045480744.1324.7.camel@localhost.localdomain \
--to=adaplas@pol.net \
--cc=alex.kern@gmx.de \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).