Files
linux/drivers/video
Mikulas Patocka 00a9d699bc framebuffer: fix cfb_copyarea
The function cfb_copyarea is buggy when the copy operation is not aligned on
long boundary (4 bytes on 32-bit machines, 8 bytes on 64-bit machines).

How to reproduce:
- use x86-64 machine
- use a framebuffer driver without acceleration (for example uvesafb)
- set the framebuffer to 8-bit depth
	(for example fbset -a 1024x768-60 -depth 8)
- load a font with character width that is not a multiple of 8 pixels
	note: the console-tools package cannot load a font that has
	width different from 8 pixels. You need to install the packages
	"kbd" and "console-terminus" and use the program "setfont" to
	set font width (for example: setfont Uni2-Terminus20x10)
- move some text left and right on the bash command line and you get a
	screen corruption

To expose more bugs, put this line to the end of uvesafb_init_info:
info->flags |= FBINFO_HWACCEL_COPYAREA | FBINFO_READS_FAST;
- Now framebuffer console will use cfb_copyarea for console scrolling.
You get a screen corruption when console is scrolled.

This patch is a rewrite of cfb_copyarea. It fixes the bugs, with this
patch, console scrolling in 8-bit depth with a font width that is not a
multiple of 8 pixels works fine.

The cfb_copyarea code was very buggy and it looks like it was written
and never tried with non-8-pixel font.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2014-02-11 15:01:04 +02:00
..
2013-10-29 12:53:07 +02:00
2014-01-17 10:57:50 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-12-04 10:48:12 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2014-02-11 15:01:04 +02:00
2013-10-30 13:34:52 +02:00
2013-10-30 13:34:52 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-02-22 23:31:31 -05:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-03-20 16:26:32 +01:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-09 12:52:50 +03:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-09-20 12:22:03 +03:00
2013-10-30 13:34:52 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-09-20 12:22:02 +03:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-09-20 12:23:21 +03:00
2013-10-30 13:34:52 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-30 13:34:52 +02:00
2013-10-29 12:53:07 +02:00
2013-12-19 15:10:49 +01:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00
2013-10-29 12:53:07 +02:00