From: Antonino Daplas <adaplas@pol.net>
To: Antonino Daplas <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BK updates]
Date: 09 Mar 2003 06:02:57 +0800 [thread overview]
Message-ID: <1047160856.1211.72.camel@localhost.localdomain> (raw)
In-Reply-To: <1047087608.2389.31.camel@localhost.localdomain>
On Sat, 2003-03-08 at 09:46, Antonino Daplas wrote:
> On Sat, 2003-03-08 at 08:26, James Simmons wrote:
> >
> > Hi folks!!!
> >
> > More updates. Lots of fixes in drivers and in the upper layers. Its
> > starting to really shape up. You can get the standard diff at
> >
>
> James,
>
> The ff. code is not totally correct:
>
James, can you apply this? Code logic is retained, it just simplifies
the calculations, removed unnecessary conditionals, and used
info->var.yres instead of var.yres.
Tony
diff -Naur linux-2.5.64-fbdev/drivers/video/console/fbcon.c linux-2.5.64/drivers/video/console/fbcon.c
--- linux-2.5.64-fbdev/drivers/video/console/fbcon.c 2003-03-08 21:33:25.000000000 +0000
+++ linux-2.5.64/drivers/video/console/fbcon.c 2003-03-08 21:47:26.000000000 +0000
@@ -1044,9 +1044,7 @@
vc->vc_rows = nr_rows;
}
p->vrows = info->var.yres_virtual / vc->vc_font.height;
- if(info->var.yres > (vc->vc_font.height * (vc->vc_rows + 1))) {
- p->vrows -= (info->var.yres - (vc->vc_font.height * vc->vc_rows)) / vc->vc_font.height;
- }
+ p->vrows -= info->var.yres/vc->vc_font.height - vc->vc_rows;
if ((info->var.yres % vc->vc_font.height) &&
(info->var.yres_virtual % vc->vc_font.height <
info->var.yres % vc->vc_font.height))
@@ -1825,9 +1823,8 @@
var.activate = FB_ACTIVATE_NOW;
fb_set_var(&var, info);
}
- p->vrows = var.yres_virtual/fh;
- if(var.yres > (fh * (height + 1)))
- p->vrows -= (var.yres - (fh * height)) / fh;
+ p->vrows = info->var.yres_virtual/fh;
+ p->vrows -= (info->var.yres + (fh - 1))/fh - height;
return 0;
}
@@ -2099,11 +2096,7 @@
/* reset wrap/pan */
info->var.xoffset = info->var.yoffset = p->yscroll = 0;
p->vrows = info->var.yres_virtual / h;
-
-#if 0 /* INCOMPLETE - let the console gurus handle this */
- if(info->var.yres > (h * (vc->vc_rows + 1))
- p->vrows -= (info->var.yres - (h * vc->vc_rows)) / h;
-#endif
+ p->vrows -= info->var.yres/h - vc->vc_rows;
if ((info->var.yres % h)
&& (info->var.yres_virtual % h < info->var.yres % h))
p->vrows--;
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
next prev parent reply other threads:[~2003-03-08 22:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-08 0:26 [BK updates] James Simmons
2003-03-08 1:46 ` Antonino Daplas
2003-03-08 22:02 ` Antonino Daplas [this message]
2003-03-08 14:40 ` Geert Uytterhoeven
2003-03-08 15:11 ` James Simmons
2003-03-14 21:48 ` [PATCH] small fix for aty128fb support on ia64 Jesse Barnes
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=1047160856.1211.72.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).