Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Arrange to use the right RAMDAC cookie at console...
details: https://anonhg.NetBSD.org/src/rev/2a8a0399caf8
branches: trunk
changeset: 487846:2a8a0399caf8
user: nathanw <nathanw%NetBSD.org@localhost>
date: Tue Jun 13 17:21:06 2000 +0000
description:
Arrange to use the right RAMDAC cookie at console initialization time.
[I thought I committed this months ago....]
diffstat:
sys/dev/ic/bt463.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diffs (51 lines):
diff -r 103f356035da -r 2a8a0399caf8 sys/dev/ic/bt463.c
--- a/sys/dev/ic/bt463.c Tue Jun 13 17:18:26 2000 +0000
+++ b/sys/dev/ic/bt463.c Tue Jun 13 17:21:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bt463.c,v 1.1 2000/04/02 18:57:36 nathanw Exp $ */
+/* $NetBSD: bt463.c,v 1.2 2000/06/13 17:21:06 nathanw Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -155,6 +155,14 @@
int window_type[16]; /* 16 24-bit window type table entries */
};
+/* When we're doing console initialization, there's no
+ * way to get our cookie back to the video card's softc
+ * before we call sched_update. So we stash it here,
+ * and bt463_update will look for it here first.
+ */
+static struct bt463data *console_data;
+
+
#define BTWREG(data, addr, val) do { bt463_wraddr((data), (addr)); \
(data)->ramdac_wr((data)->cookie, BT463_REG_IREG_DATA, (val)); } while (0)
#define BTWNREG(data, val) (data)->ramdac_wr((data)->cookie, \
@@ -228,7 +236,12 @@
data->ramdac_sched_update = sched_update;
data->ramdac_wr = wr;
data->ramdac_rd = rd;
+ /* Set up console_data so that when bt463_update is called back,
+ * it can use the right information.
+ */
+ console_data = data;
bt463_init((struct ramdac_cookie *)data);
+ console_data = NULL;
}
void
@@ -551,6 +564,13 @@
struct bt463data *data = (struct bt463data *)p;
int i, v;
+ if (console_data != NULL) {
+ /* The cookie passed in from sched_update is incorrect. Use the
+ * right one.
+ */
+ data = console_data;
+ }
+
v = data->changed;
/* The Bt463 won't accept window type data except during a blanking
Home |
Main Index |
Thread Index |
Old Index