summaryrefslogtreecommitdiff
path: root/hw/kdrive/pm2/pm2stub.c
diff options
context:
space:
mode:
authorCarlos Romero <kcrashcore@bellsouth.net>2004-05-24 19:31:41 +0000
committerCarlos Romero <kcrashcore@bellsouth.net>2004-05-24 19:31:41 +0000
commit32d0920ef9ec3c5e61089b88dedc82ffab294276 (patch)
tree8dbad4dd1f4a0eeff6110ac3892542b966fec4ba /hw/kdrive/pm2/pm2stub.c
parent5b2211ec3545f1634f807daf84b6c4bc2c0fdecf (diff)
Initial import of Permedia2 driver
Diffstat (limited to 'hw/kdrive/pm2/pm2stub.c')
-rw-r--r--hw/kdrive/pm2/pm2stub.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/hw/kdrive/pm2/pm2stub.c b/hw/kdrive/pm2/pm2stub.c
new file mode 100644
index 000000000..f125466b4
--- /dev/null
+++ b/hw/kdrive/pm2/pm2stub.c
@@ -0,0 +1,54 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "kdrive.h"
+
+#include "pm2.h"
+
+static const int PM2Cards[]={ PCI_CHIP_3DLABS_PERMEDIA2, PCI_CHIP_3DLABS_PERMEDIA2V };
+
+
+#define numPM2Cards (sizeof(PM2Cards) / sizeof(PM2Cards[0]))
+
+void
+InitCard (char *name)
+{
+ KdCardAttr attr;
+ int i;
+
+ Bool LinuxFindPci(CARD16, CARD16, CARD32, KdCardAttr *);
+
+ for (i = 0; i < numPM2Cards; i++)
+ if (LinuxFindPci (0x3d3d, PM2Cards[i], 0, &attr))
+ KdCardInfoAdd (&PM2Funcs, &attr, (void *) PM2Cards[i]);
+}
+
+
+void
+InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
+{
+ KdInitOutput (pScreenInfo, argc, argv);
+}
+
+void
+InitInput (int argc, char **argv)
+{
+ KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
+}
+
+void
+ddxUseMsg (void)
+{
+ KdUseMsg();
+ vesaUseMsg();
+}
+
+int
+ddxProcessArgument (int argc, char **argv, int i)
+{
+ int ret;
+
+ if (!(ret = vesaProcessArgument (argc, argv, i)))
+ ret = KdProcessArgument(argc, argv, i);
+ return ret;
+}