[PATCH] ATI Rage 128 Pro (aty128fb) acceleration fix
DORMANTno replies
From: Sergey Vlasov <hidden>
Date: 2002-08-19 16:29:21
Hello!
I have found a problem with the aty128fb framebuffer driver. I am using
kernel 2.4.18 (precisely,
ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Master/2.0/SRPMS.Master/kernel24-2.4.18-alt6master.src.rpm,
uniprocessor config) with the ATI Rage 128 Pro (32M) video card. aty128fb
is loaded as a module in the startup scripts without any module options,
then it is configured by fbset (though the problem is visible even in the
default 640x480 mode).
In this configuration sometimes there is garbage on the screen (parts of
characters, usually in place of spaces). The effect is visible in mutt
(when sorting by threads and there are many long threads) and in aptitude
(pull down the menu and press Left and Right to move between different
submenus).
I looked into aty128fb.c and found two possible problems:
1. The driver does not wrap display_switch.{clear,revc} in all color
depths, therefore some video memory access might be overlapping with the
accelerator.
2. The accelerated bmove function always uses left-to-right and
top-to-bottom direction, without checking the actual direction of move.
When doing overlapped copies, this causes corruption. (The "insert
characters" control code, which causes part of the line to be shifted
right, triggers the problem.)
I have made a patch against the driver sources included in
kernel24-2.4.18-alt6master to fix the problems. (The patch also applies
cleanly to the latest 2.4.x aty128fb as seen at
http://ppc.bkbits.net:8080/linux_2_4/anno/drivers/video/aty128fb.c@1.9?nav=index.html|src/.|src/drivers|src/drivers/video).
On my system, with the Rage128 Pro card, the fixed driver looks stable.
Note about the patch: the first two hunks fix aty128_rectcopy() (problem
#2), the rest add wrappers for *_clear and *_revc (problem #1).
--
Sergey Vlasov Attachments
- (unnamed) [application/pgp-signature] 232 bytes