linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1: 2.6.15-rc6] Fix framebuffer console upside-down ywrap scrolling
@ 2005-12-20  7:18 Knut Petersen
  2005-12-20  7:56 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Knut Petersen @ 2005-12-20  7:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Antonino A. Daplas, linux-fbdev-devel

Whenever ywrap scrolling is selected together with 180 degree
screen rotation, 2.6.15-rc6 and earlier versions are broken. 
fb_pan_display() expects non-negative yoffsets, but
ud_update_start() calls it with yoffsets down to -(yres - font height).
This patch transforms yoffset to the correct range 0 ... vyres-1.

Some obviously unneeded parentheses are removed, too.

Verified with cyblafb, should be applied before 2.6.15-final
because  it does fix the framebuffer rotation code introduced
early in the 2.6.15 release cycle.

Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>

diff -uprN -X linux/Documentation/dontdiff -x '*.bak' -x '*.ctx' linuxorig/drivers/video/console/fbcon_ud.c linux/drivers/video/console/fbcon_ud.c
--- linuxorig/drivers/video/console/fbcon_ud.c	2005-12-15 10:34:06.000000000 +0100
+++ linux/drivers/video/console/fbcon_ud.c	2005-12-20 06:59:19.000000000 +0100
@@ -420,13 +420,15 @@ static void ud_cursor(struct vc_data *vc
 int ud_update_start(struct fb_info *info)
 {
 	struct fbcon_ops *ops = info->fbcon_par;
-	u32 xoffset, yoffset;
+	int xoffset, yoffset;
 	u32 vyres = GETVYRES(ops->p->scrollmode, info);
 	u32 vxres = GETVXRES(ops->p->scrollmode, info);
 	int err;
 
-	xoffset = (vxres - info->var.xres) - ops->var.xoffset;
-	yoffset = (vyres - info->var.yres) - ops->var.yoffset;
+	xoffset = vxres - info->var.xres - ops->var.xoffset;
+	yoffset = vyres - info->var.yres - ops->var.yoffset;
+	if (yoffset < 0)
+		yoffset += vyres;
 	ops->var.xoffset = xoffset;
 	ops->var.yoffset = yoffset;
 	err = fb_pan_display(info, &ops->var);




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1: 2.6.15-rc6] Fix framebuffer console upside-down ywrap scrolling
  2005-12-20  7:18 [PATCH 1/1: 2.6.15-rc6] Fix framebuffer console upside-down ywrap scrolling Knut Petersen
@ 2005-12-20  7:56 ` Antonino A. Daplas
  0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2005-12-20  7:56 UTC (permalink / raw)
  To: Knut Petersen; +Cc: Linus Torvalds, Andrew Morton, linux-fbdev-devel

Knut Petersen wrote:
> Whenever ywrap scrolling is selected together with 180 degree
> screen rotation, 2.6.15-rc6 and earlier versions are broken.
> fb_pan_display() expects non-negative yoffsets, but
> ud_update_start() calls it with yoffsets down to -(yres - font height).
> This patch transforms yoffset to the correct range 0 ... vyres-1.
> 
> Some obviously unneeded parentheses are removed, too.
> 
> Verified with cyblafb, should be applied before 2.6.15-final
> because  it does fix the framebuffer rotation code introduced
> early in the 2.6.15 release cycle.
> 
> Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Acked-by: Antonino Daplas <adaplas@pol.net>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-20  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20  7:18 [PATCH 1/1: 2.6.15-rc6] Fix framebuffer console upside-down ywrap scrolling Knut Petersen
2005-12-20  7:56 ` Antonino A. Daplas

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).