[PATCH 2.6.19 2/6] 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@xxxxxxxxxxxxxx>
---

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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Non-descriptive error message
    ... possibly that the copying disclosed a corruption that was previously ... and make a backup copy of the database so you get multiple ... Open the report in design view, set its HasModule propety to No. Save. ... If it doesn't you have struck a reasonably rare corruption where the 2 ...
    (microsoft.public.access.reports)
  • Re: Word freezes, then crashes
    ... If this is a document corruption, then saving as HTM does usually remove the corruption. ... But it isn't a 100% fix. ... As the Webrider suggests, the ultimate is to make it all plain text and then insert the text file into a new blank document. ... I have never had a problem since I unchecked those boxes, ...
    (microsoft.public.word.application.errors)
  • Re: How many people are using 2.6.16?
    ... as part of the dirty bit cleanups and sanity checkingwe did actually seem to fix a long-standing CIFS corruption. ... We did have one bug report of data corruption in cifs on older kernels copying large files which this resolves, ...
    (Linux-Kernel)
  • Re: oncheck -cI
    ... Over the weekend I tried to dbexport our database and the dbexport ... So IBM's option 1 to fix it went out the window, ... see that the corruption was getting worse as in more rows affected. ... IBM Down Systems Department was able to log on and fix the corrupt ...
    (comp.databases.informix)
  • Re: Does Word SP-3 address the old problem of a build-up of list templates?
    ... document (where the corruption is caused by a buildup of list templates) ... The corruption message is no longer present and the ... However, the fix happens automatically ... has had a corruption message and had checked the no. of list ...
    (microsoft.public.word.numbering)