aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tridentfb.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-24 00:31:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:35 -0400
commit65e93e038c8a6eb65b6907d6aed22a8ff1029d3a (patch)
tree2ec53ab22bdb8c42b7b463d2676f08de06fcadc1 /drivers/video/tridentfb.c
parent74a933feaf13f705e6c798d87efe6a9d758b3ca0 (diff)
tridentfb: preserve memory type settings
Do not overwrite bits which contain memory type settings. It removes noise pixels ("snow") on Blade3D and 3DImage chips. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/tridentfb.c')
-rw-r--r--drivers/video/tridentfb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 62701c5570fd..26bc4d75d4fd 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -1095,7 +1095,10 @@ static int tridentfb_set_par(struct fb_info *info)
1095 vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */ 1095 vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */
1096 1096
1097 /* divide clock by 2 if 32bpp chain4 mode display and CPU path */ 1097 /* divide clock by 2 if 32bpp chain4 mode display and CPU path */
1098 write3CE(par, MiscExtFunc, (bpp == 32) ? 0x1A : 0x12); 1098 tmp = read3CE(par, MiscExtFunc) & 0xF0;
1099 if (bpp == 32)
1100 tmp |= 8;
1101 write3CE(par, MiscExtFunc, tmp | 0x12);
1099 write3CE(par, 0x5, 0x40); /* no CGA compat, allow 256 col */ 1102 write3CE(par, 0x5, 0x40); /* no CGA compat, allow 256 col */
1100 write3CE(par, 0x6, 0x05); /* graphics mode */ 1103 write3CE(par, 0x6, 0x05); /* graphics mode */
1101 write3CE(par, 0x7, 0x0F); /* planes? */ 1104 write3CE(par, 0x7, 0x0F); /* planes? */