summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-01-06 10:13:58 -0500
committerAdam Jackson <ajax@redhat.com>2010-01-06 10:13:58 -0500
commitc5fc24154d10359ea220f75b027b35ab2cc4371a (patch)
treec104ddd3cf2d4680e1b2ed64096577fee1533fc8
parentbe9d21dc92a25319efe924f1297996bb9e15182c (diff)
Add some missing stuff
-rw-r--r--TODO35
-rw-r--r--minitru-int.h41
2 files changed, 76 insertions, 0 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..45132f5
--- /dev/null
+++ b/TODO
@@ -0,0 +1,35 @@
+EDID has (essentially) three statically defined mode lists: Established,
+Established III, and DMT. The DMT list is _almost_ a superset of the other
+two, except.
+
+EST slot 0 is DMT slot 8
+EST slot 1 is DMT slot 7
+EST slot 2 is DMT slot 5
+EST slot 3 is DMT slot 4
+EST slot 5 is DMT slot 3
+EST slot 8 is DMT slot 35
+EST slot 9 is DMT slot 17
+EST slot 10 is DMT slot 16
+EST slot 11 is DMT slot 15
+EST slot 12 is DMT slot 14
+EST slot 14 is DMT slot 10
+EST slot 15 is DMT slot 9
+EST slot 16 is DMT slot 20
+
+EST slots 4, 6, 7, 13 are:
+640x480 @ 67HZ
+720x400 @ 88Hz
+720x400 @ 70Hz
+832x624 @ 75Hz
+
+Everything in EST3 is in DMT, except for slot 35 (1792x1344 @ 85Hz). Strong
+work, VESA.
+
+DisplayID, however, encodes the DMT list indexes directly. So if you built
+a unified list for DMT+EDIDextras and indexed into that, you'd have to do so
+for DisplayID too (probably not 1:1).
+
+This is really pure optimization. Each mode is only 60 (or 64) bytes as it
+is. So you're going from 64 * (17 + 44 + 80) = 9024 for three lists, to
+64 * 85 + (17 + 44 + 80) = 5581 for one master list and three indices.
+Kinda tough to care about one page of .rodata.
diff --git a/minitru-int.h b/minitru-int.h
new file mode 100644
index 0000000..befb01f
--- /dev/null
+++ b/minitru-int.h
@@ -0,0 +1,41 @@
+#ifndef MINITRU_INT_H
+#define MINITRU_INT_H
+
+#include "stdlib.h"
+#include "stdint.h"
+#include "string.h"
+#include "math.h"
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#define hidden __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#define hidden __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+#define hidden
+#endif /* GNUC >= 4 */
+
+struct mt_monitor;
+
+struct mt_backend {
+ uint32_t (*probe)(struct mt_monitor *monitor);
+ struct mt_mode *(*modes)(struct mt_monitor *monitor);
+};
+
+extern hidden struct mt_backend _mt_edid_backend;
+extern hidden struct mt_backend _mt_displayid_backend;
+
+struct mt_monitor {
+ const struct mt_backend *backend;
+ void *block;
+ uint32_t len;
+};
+
+extern hidden struct mt_mode *mt_mode_alloc(void);
+extern struct mt_mode *find_dmt_mode(uint32_t hsize,
+ uint32_t vsize,
+ uint32_t refresh,
+ uint32_t rb);
+
+#include "minitru.h"
+
+#endif