linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-fbdev-devel] [PATCH][FBDEV]: fb_putcs() and fb_setfont() methods
Date: 05 Jan 2003 06:06:21 +0800	[thread overview]
Message-ID: <1041717978.1052.23.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0301042058240.24903-100000@phoenix.infradead.org>

On Sun, 2003-01-05 at 05:07, James Simmons wrote:
> 
> Rejected. I have put thought into it and the whole point was to not allow 

Personally, that's fine by me since I have no need for those 2
extensions.  But please apply the accel_putcs() buffer overrun patch.

BTW, attached is another patch that will change the resolution of the
console via tty ioctl TIOCSWINSZ.  I'm not sure if this is the correct
solution, but it's the only one I can think of without really adding a
lot of extra code.  This is implemented by adding a con_resize() hook to
fbcon, so the window size can be changed such as by using:

stty cols 128 rows 48 (1024x768 with font 8x16)

The new window size should also be preserved per console.  Still, there
are other fb parameters that can screw up the console (such as changing
yres_virtual and bits_per_pixel) but the window size is the most
important.

Tony 

diff -Naur linux-2.5.54/drivers/video/console/fbcon.c linux/drivers/video/console/fbcon.c
--- linux-2.5.54/drivers/video/console/fbcon.c	2003-01-04 21:58:47.000000000 +0000
+++ linux/drivers/video/console/fbcon.c	2003-01-04 21:58:24.000000000 +0000
@@ -1871,6 +1871,25 @@
 }
 

+static int fbcon_resize(struct vc_data *vc, unsigned int width, 
+			unsigned int height)
+{
+	struct display *p = &fb_display[vc->vc_num];
+	struct fb_info *info = p->fb_info;
+	struct fb_var_screeninfo var = info->var;
+	int err;
+
+	var.xres = width * vc->vc_font.width;
+	var.yres = height * vc->vc_font.height;
+	var.activate = FB_ACTIVATE_NOW;
+
+	err = fb_set_var(&var, info);
+	return  (err || var.xres != info->var.xres ||
+		 var.yres != info->var.yres) ?
+		-EINVAL : 0;
+	  
+}
+
 static int fbcon_switch(struct vc_data *vc)
 {
 	int unit = vc->vc_num;
@@ -1920,6 +1939,7 @@
 
 	info->currcon = unit;
 	
+        fbcon_resize(vc, vc->vc_cols, vc->vc_rows);
 	update_var(unit, info);
 	
 	if (vt_cons[unit]->vc_mode == KD_TEXT)
@@ -2537,6 +2557,7 @@
 	.con_invert_region 	= fbcon_invert_region,
 	.con_screen_pos 	= fbcon_screen_pos,
 	.con_getxy 		= fbcon_getxy,
+	.con_resize             = fbcon_resize,
 };
 
 int __init fb_console_init(void)

  reply	other threads:[~2003-01-04 22:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04  9:25 [PATCH][FBDEV]: fb_putcs() and fb_setfont() methods Antonino Daplas
2003-01-04 14:00 ` Jurriaan
2003-01-04 21:08   ` James Simmons
2003-01-04 20:41 ` Petr Vandrovec
2003-01-04 21:12   ` James Simmons
2003-01-04 23:17     ` Petr Vandrovec
2003-01-07 21:46       ` [Linux-fbdev-devel] " James Simmons
2003-01-04 21:07 ` James Simmons
2003-01-04 22:06   ` Antonino Daplas [this message]
2003-01-07 21:43     ` James Simmons
2003-01-04 23:30   ` [Linux-fbdev-devel] " Petr Vandrovec
2003-01-07 21:51     ` James Simmons
2003-01-08 10:47       ` Geert Uytterhoeven
2003-01-08 18:19         ` Antonino Daplas
2003-01-09 18:09           ` [Linux-fbdev-devel] " James Simmons
2003-01-09 20:54             ` Geert Uytterhoeven
2003-01-09 21:25               ` [Linux-fbdev-devel] " James Simmons
2003-01-10 14:36             ` Antonino 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=1041717978.1052.23.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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 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).