Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* [PATCH 2.6.19 2/6] tgafb: Fix copying overlapping areas
@ 2006-12-13 17:10 macro
  0 siblings, 0 replies; only message in thread
From: macro @ 2006-12-13 17:10 UTC (permalink / raw)


 The direction of copying in the copyarea functions is selected 
incorrectly, resulting in corruption.  This is a fix.

Signed-off-by: Maciej W. Rozycki <macro at linux-mips.org>
---

 It looks like these functions are not used by the console code as image 
blitting is preferred for scrolling and hence the bug has escaped 
unnoticed for so long.  Still it is not an excuse for these functions to 
be wrong.

 Please apply.

  Maciej

patch-mips-2.6.18-20060920-tgafb-copyarea-1
diff -up --recursive --new-file linux-mips-2.6.18-20060920.macro/drivers/video/tgafb.c linux-mips-2.6.18-20060920/drivers/video/tgafb.c
--- linux-mips-2.6.18-20060920.macro/drivers/video/tgafb.c	2006-09-20 20:50:52.000000000 +0000
+++ linux-mips-2.6.18-20060920/drivers/video/tgafb.c	2006-12-12 05:15:28.000000000 +0000
@@ -919,7 +919,7 @@ copyarea_line_8bpp(struct fb_info *info,
 
 	n64 = (height * width) / 64;
 
-	if (dy < sy) {
+	if (sy < dy) {
 		spos = (sy + height) * width;
 		dpos = (dy + height) * width;
 
@@ -967,7 +967,7 @@ copyarea_line_32bpp(struct fb_info *info
 
 	n16 = (height * width) / 16;
 
-	if (dy < sy) {
+	if (sy < dy) {
 		src = tga_fb + (sy + height) * width * 4;
 		dst = tga_fb + (dy + height) * width * 4;
 



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-13 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13 17:10 [PATCH 2.6.19 2/6] tgafb: Fix copying overlapping areas macro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox