Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k Restore video...
details: https://anonhg.NetBSD.org/xsrc/rev/d48e828276da
branches: trunk
changeset: 10614:d48e828276da
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue Nov 03 15:25:21 2020 +0000
description:
Restore video mode properly on exit even on CRT Mode 19 (640x480 31kHz VGA).
diffstat:
external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c | 21 ++++++++++++++++--
1 files changed, 18 insertions(+), 3 deletions(-)
diffs (57 lines):
diff -r e5cb0cd67ba8 -r d48e828276da external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c
--- a/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c Mon Nov 02 06:25:35 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kFb.c Tue Nov 03 15:25:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kFb.c,v 1.4 2020/08/01 20:09:03 tsutsui Exp $ */
+/* $NetBSD: x68kFb.c,v 1.5 2020/11/03 15:25:21 tsutsui Exp $ */
/*-------------------------------------------------------------------------
* Copyright (c) 1996 Yasushi Yamasaki
* All rights reserved.
@@ -30,6 +30,8 @@
DevPrivateKeyRec x68kScreenPrivateKeyRec;
+static int cons_dwidth;
+
/*-------------------------------------------------------------------------
* function "x68kFbCommonOpen"
*
@@ -68,6 +70,7 @@
pPriv->fb = (uint8_t *)((uint32_t)pPriv->reg + gi.gd_regsize);
x68kRegSetup( pPriv );
+ cons_dwidth = gi.gd_dwidth;
return TRUE;
}
@@ -83,7 +86,8 @@
void
x68kFbCommonClose(X68kScreenRec *pPriv)
{
- X68kFbReg graphNone = {
+ static const X68kFbReg graphNone_mode16 = {
+ /* CRT mode 16 (768x512 31.5kHz) */
{ 137,14, 28, 124,
567, 5, 40, 552,
27, 0, 0, 0,
@@ -93,8 +97,19 @@
{ 0x0004, 0x21e4, 0x0020 },
0
};
+ static const X68kFbReg graphNone_mode19 = {
+ /* CRT mode 19 (640x480 31.5kHz VGA mode) */
+ { 99,11, 13, 93,
+ 524, 1, 33, 513,
+ 27, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0x0417, 0, 0, 0, 0 },
+ { 0x0004, 0x21e4, 0x0020 },
+ 0
+ };
/* change video mode */
- pPriv->x68kreg = graphNone;
+ pPriv->x68kreg = (cons_dwidth == 640) ? graphNone_mode19 : graphNone_mode16;
x68kRegSetup(pPriv);
/* unmap and close frame buffer */
Home |
Main Index |
Thread Index |
Old Index