summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-07-16 02:50:37 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-07-16 02:50:37 +0000
commitfee03799b95240471d9007e4ccd2d6aad73c6450 (patch)
tree74e9a5f99b510f99950ecdfc0713ffec8ebf321c /include
parente17d5d293c793bf9ba97c6fde9f07debba4dda38 (diff)
o Implement /dev/graphics virtualizable access to
registers. The actual context switch code is not yet there. But the rest of the magic (mapping/unmapping the registers on demand is already in). o Interface for allowing binary-only console modules added. o My RRM bits, nothing really interesting now. For now, I am assuming in the code that there will be a minor per real graphics device, and that the X server will go and open /dev/graphicsN instead of opening /dev/graphics and using the gfx_attach_board->board variable. The interface the X server uses is not clear. I believe it will be pretty easy to provide the stripped down shmiq interface. Not only that, but we can even provide the same ABI (yes, ABI) for SGI shmiq input modules (yep, looks pretty easy once you have an strace that shows this information). Now, the only thing missing is figuring what is wrong my current conception of the use of shmiq. I just can't get it.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/gfx.h24
-rw-r--r--include/asm-mips/pgtable.h3
2 files changed, 23 insertions, 4 deletions
diff --git a/include/asm-mips/gfx.h b/include/asm-mips/gfx.h
index f183d5b3b..b5d8c7ac9 100644
--- a/include/asm-mips/gfx.h
+++ b/include/asm-mips/gfx.h
@@ -1,12 +1,21 @@
/*
- * SGI GFX interface
+ * This is the user-visible SGI GFX interface.
+ *
+ * This must be used verbatim into the GNU libc. It does not include
+ * any kernel-only bits on it.
+ *
+ * miguel@nuclecu.unam.mx
*/
-/* Applications depend on these defines/ioctls */
-
+/* The iocls, yes, they do not make sense, but such is life */
#define GFX_BASE 100
#define GFX_GETNUM_BOARDS (GFX_BASE + 1)
#define GFX_GETBOARD_INFO (GFX_BASE + 2)
+#define GFX_ATTACH_BOARD (GFX_BASE + 3)
+#define GFX_DETACH_BOARD (GFX_BASE + 4)
+#define GFX_IS_MANAGED (GFX_BASE + 5)
+
+#define GFX_MAPALL (GFX_BASE + 10)
#define GFX_INFO_NAME_SIZE 16
#define GFX_INFO_LABEL_SIZE 16
@@ -24,3 +33,12 @@ struct gfx_getboardinfo_args {
unsigned int len; /* buffer size of buf */
};
+struct gfx_attach_board_args {
+ unsigned int board; /* board number, starting from zero */
+ void *vaddr; /* address where the board registers should be mapped */
+};
+
+#ifdef __KERNEL__
+/* umap.c */
+extern void remove_mapping (struct task_struct *, unsigned long, unsigned long);
+#endif
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index badd188c2..ebeb6e67c 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -123,7 +123,8 @@ extern void (*flush_tlb_page)(struct vm_area_struct *vma, unsigned long page);
_CACHE_CACHABLE_NONCOHERENT)
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
_CACHE_CACHABLE_NONCOHERENT)
-
+#define PAGE_USERIO __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
+ _CACHE_UNCACHED)
/*
* MIPS can't do page protection for execute, and considers that the same like
* read. Also, write permissions imply read permissions. This is the closest