Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/dev Pull a fix of Bt458 (8bpp framebuffer) ...



details:   https://anonhg.NetBSD.org/src/rev/870801e2aab4
branches:  trunk
changeset: 325585:870801e2aab4
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Dec 30 13:14:48 2013 +0000

description:
Pull a fix of Bt458 (8bpp framebuffer) initialization from OpenBSD/luna88k.

http://marc.info/?l=openbsd-cvs&m=138838884202196
>> Correct initialization of Bt458, used in LUNA's 8bpp frame buffer.
>>
>> According to the manual, the address register does not automatically
>> increment when we access to the control registers.  Also we disable
>> overlay planes, because we do not use them.

diffstat:

 sys/arch/luna68k/dev/lunafb.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 994a57797e36 -r 870801e2aab4 sys/arch/luna68k/dev/lunafb.c
--- a/sys/arch/luna68k/dev/lunafb.c     Mon Dec 30 08:47:50 2013 +0000
+++ b/sys/arch/luna68k/dev/lunafb.c     Mon Dec 30 13:14:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lunafb.c,v 1.29 2013/12/28 09:17:23 tsutsui Exp $ */
+/* $NetBSD: lunafb.c,v 1.30 2013/12/30 13:14:48 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.29 2013/12/28 09:17:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.30 2013/12/30 13:14:48 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -431,11 +431,16 @@
        } else if (hwplanemask == 0xff) {
                struct bt458 *ndac = (struct bt458 *)OMFB_RAMDAC;
 
+               /* Initialize the Bt458 */
                ndac->bt_addr = 0x04;
                ndac->bt_ctrl = 0xff; /* all planes will be read */
+               ndac->bt_addr = 0x05;
                ndac->bt_ctrl = 0x00; /* all planes have non-blink */
-               ndac->bt_ctrl = 0x43; /* pallete enabled, ovly plane */
+               ndac->bt_addr = 0x06;
+               ndac->bt_ctrl = 0x40; /* pallete enabled, ovly plane disabled */
+               ndac->bt_addr = 0x07;
                ndac->bt_ctrl = 0x00; /* no test mode */
+
                ndac->bt_addr = 0;
                ndac->bt_cmap = dc->dc_cmap.r[0] = 0;
                ndac->bt_cmap = dc->dc_cmap.g[0] = 0;



Home | Main Index | Thread Index | Old Index