diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-02-12 03:54:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:41 -0500 |
commit | 36f71405e63f3d1e4c2a8dd98523820bbca8e078 (patch) | |
tree | 10037edbfbdc7246cdc8038735de6fa624f7ae39 /drivers/video/tgafb.c | |
parent | ee9a25e5df81f4392439055c28989dfd4b18d894 (diff) |
[PATCH] tgafb: fix copying overlapping areas
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@linux-mips.org>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/tgafb.c')
-rw-r--r-- | drivers/video/tgafb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index 0a00a6cc7c2b..9c23a783e713 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c | |||
@@ -885,7 +885,7 @@ copyarea_line_8bpp(struct fb_info *info, u32 dy, u32 sy, | |||
885 | 885 | ||
886 | n64 = (height * width) / 64; | 886 | n64 = (height * width) / 64; |
887 | 887 | ||
888 | if (dy < sy) { | 888 | if (sy < dy) { |
889 | spos = (sy + height) * width; | 889 | spos = (sy + height) * width; |
890 | dpos = (dy + height) * width; | 890 | dpos = (dy + height) * width; |
891 | 891 | ||
@@ -933,7 +933,7 @@ copyarea_line_32bpp(struct fb_info *info, u32 dy, u32 sy, | |||
933 | 933 | ||
934 | n16 = (height * width) / 16; | 934 | n16 = (height * width) / 16; |
935 | 935 | ||
936 | if (dy < sy) { | 936 | if (sy < dy) { |
937 | src = tga_fb + (sy + height) * width * 4; | 937 | src = tga_fb + (sy + height) * width * 4; |
938 | dst = tga_fb + (dy + height) * width * 4; | 938 | dst = tga_fb + (dy + height) * width * 4; |
939 | 939 | ||