summaryrefslogtreecommitdiff
path: root/sys/dev/ic/stireg.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-01-28 17:37:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-01-28 17:37:41 +0000
commit8b9efb273c5ec82bdb0a1aff73776f3f649e7481 (patch)
tree1a40168eef8abde59c1b23bcd3eb1404caeadfb9 /sys/dev/ic/stireg.h
parenta83fc87b13095d2ab8b05bb05e8bff472c6f91cd (diff)
If the rom contains a monitor table, look for an entry matching our
display resolution, and if one is found, pick the built-in font it points to, instead of the first font from the list. If the index is wrong and the font list is shorter, revert to the previous behaviour of using the first ROM font. This fixes the font discrepency on my B132L (INTERNAL_EG_1280) where PDC would use the 10x20 font, which is third in the list, and OpenBSD would use the 8x16 font instead. Tested on byte- and word- roms, gsc and pci cards.
Diffstat (limited to 'sys/dev/ic/stireg.h')
-rw-r--r--sys/dev/ic/stireg.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/dev/ic/stireg.h b/sys/dev/ic/stireg.h
index e9c83b7eced..da06995fb3e 100644
--- a/sys/dev/ic/stireg.h
+++ b/sys/dev/ic/stireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stireg.h,v 1.12 2008/09/01 17:30:56 deraadt Exp $ */
+/* $OpenBSD: stireg.h,v 1.13 2009/01/28 17:37:40 miod Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -127,8 +127,7 @@ struct sti_dd {
u_int32_t dd_reglst; /* 0x1c device region list */
u_int16_t dd_maxreent; /* 0x20 max reent storage */
u_int16_t dd_maxtimo; /* 0x22 max execution timeout .1 sec */
- u_int32_t dd_montbl; /* 0x24 mon table address, array of
- names num of dd_nmon */
+ u_int32_t dd_montbl; /* 0x24 monitor table address */
u_int32_t dd_udaddr; /* 0x28 user data address */
u_int32_t dd_stimemreq; /* 0x2c sti memory request */
u_int32_t dd_udsize; /* 0x30 user data size */
@@ -194,6 +193,22 @@ struct sti_fontcfg {
u_int8_t uoffset;
} __packed;
+typedef struct sti_mon {
+ u_int32_t width: 12;
+ u_int32_t height: 12;
+ u_int32_t hz: 7; /* low 7 bits of refresh rate */
+ u_int32_t flat: 1; /* flatpanel */
+ u_int32_t vesa: 1; /* vesa mode */
+ u_int32_t grey: 1; /* greyscale */
+ u_int32_t dblbuf: 1; /* double buffered */
+ u_int32_t user: 1; /* user-defined mode */
+ u_int32_t stereo: 1; /* stereo display */
+ u_int32_t sam: 1; /* ? */
+ u_int32_t : 15;
+ u_int32_t hz_upper: 3; /* upper 3 bits of refresh rate */
+ u_int32_t font: 8; /* rom font index */
+} __packed *sti_mon_t;
+
typedef struct sti_ecfg {
u_int8_t current_monitor;
u_int8_t uf_boot;