Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65e93e03 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Linus Torvalds
Browse files

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: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 74a933fe
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1095,7 +1095,10 @@ static int tridentfb_set_par(struct fb_info *info)
	vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */
	vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */


	/* divide clock by 2 if 32bpp chain4 mode display and CPU path */
	/* divide clock by 2 if 32bpp chain4 mode display and CPU path */
	write3CE(par, MiscExtFunc, (bpp == 32) ? 0x1A : 0x12);
	tmp = read3CE(par, MiscExtFunc) & 0xF0;
	if (bpp == 32)
		tmp |= 8;
	write3CE(par, MiscExtFunc, tmp | 0x12);
	write3CE(par, 0x5, 0x40);	/* no CGA compat, allow 256 col */
	write3CE(par, 0x5, 0x40);	/* no CGA compat, allow 256 col */
	write3CE(par, 0x6, 0x05);	/* graphics mode */
	write3CE(par, 0x6, 0x05);	/* graphics mode */
	write3CE(par, 0x7, 0x0F);	/* planes? */
	write3CE(par, 0x7, 0x0F);	/* planes? */