Subject: port-sparc/2030: cgthree video not enabled if not console
To: None <gnats-bugs@NetBSD.ORG>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: netbsd-bugs
Date: 02/05/1996 12:58:15
>Number: 2030
>Category: port-sparc
>Synopsis: cgthree video not enabled if not console
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 5 07:35:04 1996
>Last-Modified:
>Originator: Juergen Hannken-Illjes
>Organization:
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (W Germany)
>Release: Sun Feb 4 14:41:25 1996<NetBSD-current source date>
>Environment:
System: NetBSD watcher 1.1A NetBSD 1.1A (CUSTOM) #0: Sun Feb 4 14:16:34 MET 1996 hannken@watcher:/usr/src/sys/arch/sparc/compile/CUSTOM sparc
>Description:
I'm running a dual headed Sun. bwtwo is the console. The second adapter is
a cgthree. The cgthree video doesn't get enabled.
At least the cgthree's btreg is followed by sixteen byte registers. The
control register's video-enable-bit must be set on the first open.
The same may hold for other frame buffers using btreg.
>How-To-Repeat:
>Fix:
--- sys/arch/sparc/dev/btreg.h.orig Sat Oct 14 03:19:52 1995
+++ sys/arch/sparc/dev/btreg.h Fri Feb 2 11:16:47 1996
@@ -78,3 +78,7 @@
u_int bt_ctrl; /* control register */
u_int bt_omap; /* overlay (cursor) map register */
+ u_char fb_control; /* fb control register */
+ u_char fb_status; /* fb status register */
};
+
+#define FB_VIDEO_ENABLE 0x40
--- sys/arch/sparc/dev/cgthree.c.orig Mon Dec 11 21:37:46 1995
+++ sys/arch/sparc/dev/cgthree.c Fri Feb 2 11:28:11 1996
@@ -236,8 +236,15 @@
struct proc *p;
{
+ register volatile struct bt_regs *bt;
int unit = minor(dev);
if (unit >= cgthreecd.cd_ndevs || cgthreecd.cd_devs[unit] == NULL)
return (ENXIO);
+
+ /* enable video if currently disabled */
+ bt = ((struct cgthree_softc *) cgthreecd.cd_devs[unit])->sc_bt;
+ if ((bt->fb_control & FB_VIDEO_ENABLE) == 0)
+ bt->fb_control |= FB_VIDEO_ENABLE;
+
return (0);
}
>Audit-Trail:
>Unformatted: