linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kern <alex.kern@gmx.de>
To: Linux-fbdev-devel@lists.sourceforge.net
Subject: Fwd: [PATCH 2.5.59] fix for fbcon.c
Date: Sun, 19 Jan 2003 19:56:33 +0100	[thread overview]
Message-ID: <200301191956.33826.alex.kern@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]



----------  Weitergeleitete Nachricht  ----------

Subject: [PATCH 2.5.59] fix for fbcon.c
Date: Sun, 19 Jan 2003 19:36:12 +0100
From: Alexander Kern <alex.kern@gmx.de>
To: fb-devel@lists.sourceforge.net

Hello,

hier is a fix needed by 1400x1050 resolution. fbcon_resize() without fis set
resolution to 1400x1040 and confusing LCD vertical stretching.

Regards
Alex

PS: I have retest both kernel versions, here is a result.

COMPAQ ARMADA E500, ATI (Mach64) Rage 3D Mobility P/M
15" with native 1400x1050 pixel

                        2.4.21-pre3                              2.5.59
640x400        perfect(LOGO)                        perfect
640x480        perfect(LOGO)                        perfect
800x600        perfect                                      perfect
1024x768      h. overlapping(LOGO)          h. overlapping
1152x864      h. overlapping                        h. overlapping
1280x1024    h. overlapping                        h. overlapping
1400x1050    perfect                                   perfect (with this
 fix)

LOGO by 640x4?0 means strange blue pixels as mirror of pinguin
LOGO by 1024x768 means shift to top, pinguin head is unvisible
h. overlapping means mostly stretching issue.

-------------------------------------------------------


[-- Attachment #2: fbcon.diff --]
[-- Type: text/x-diff, Size: 997 bytes --]

--- linux-2.5.orig/drivers/video/console/fbcon.c	2003-01-17 16:13:53.000000000 +0100
+++ linux/drivers/video/console/fbcon.c	2003-01-19 19:17:23.000000000 +0100
@@ -1876,17 +1876,23 @@
 	struct display *p = &fb_display[vc->vc_num];
 	struct fb_info *info = p->fb_info;
 	struct fb_var_screeninfo var = info->var;
-	int err;
+	int err; int x_diff, y_diff;
 
 	var.xres = width * vc->vc_font.width;
 	var.yres = height * vc->vc_font.height;
 	var.activate = FB_ACTIVATE_NOW;
-
+	x_diff = info->var.xres - var.xres;
+	y_diff = info->var.yres - var.yres;
+	if(x_diff < 0 || x_diff > vc->vc_font.width ||
+	  (y_diff < 0 || y_diff > vc->vc_font.height)) {
+		DPRINTK("resize now %ix%i\n", var.xres, var.yres);
 	err = fb_set_var(&var, info);
 	return  (err || var.xres != info->var.xres ||
-		 var.yres != info->var.yres) ?
-		-EINVAL : 0;
-	  
+			var.yres != info->var.yres) ? -EINVAL : 0;
+	} else {
+		DPRINTK("prevent resize\n");
+		return 0;
+	}
 }
 
 static int fbcon_switch(struct vc_data *vc)

             reply	other threads:[~2003-01-19 18:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-19 18:56 Alexander Kern [this message]
2003-01-20  8:45 ` Fwd: [PATCH 2.5.59] fix for fbcon.c Antonino Daplas
2003-01-22 17:45   ` Alexander Kern
2003-02-17 11:33   ` 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=200301191956.33826.alex.kern@gmx.de \
    --to=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).