First import
[xorg_rtime.git] / xorg-server-1.4 / hw / kdrive / mach64 / mach64stub.c
blob5895a3cb7c7517c6ae262d1050ac59bed72f05ac
1 /*
2 * Copyright 1999 SuSE, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of SuSE not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. SuSE makes no representations about the
11 * suitability of this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
14 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
16 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * Author: Keith Packard, SuSE, Inc.
24 #ifdef HAVE_CONFIG_H
25 #include <kdrive-config.h>
26 #endif
27 #include "mach64.h"
28 #include <klinux.h>
30 void
31 InitCard (char *name)
33 KdCardAttr attr;
35 if (LinuxFindPci (0x1002, 0x4750, 0, &attr))
36 KdCardInfoAdd (&mach64Funcs, &attr, 0);
37 else if (LinuxFindPci (0x1002, 0x4c42, 0, &attr))
38 KdCardInfoAdd (&mach64Funcs, &attr, 0);
39 else if (LinuxFindPci (0x1002, 0x4c46, 0, &attr))
40 KdCardInfoAdd (&mach64Funcs, &attr, 0);
41 else if (LinuxFindPci (0x1002, 0x4c49, 0, &attr))
42 KdCardInfoAdd (&mach64Funcs, &attr, 0);
43 else if (LinuxFindPci (0x1002, 0x4c4d, 0, &attr))
44 KdCardInfoAdd (&mach64Funcs, &attr, 0);
47 void
48 InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
50 KdInitOutput (pScreenInfo, argc, argv);
53 void
54 InitInput (int argc, char **argv)
56 KdOsAddInputDrivers ();
57 KdInitInput ();
60 void
61 ddxUseMsg (void)
63 KdUseMsg();
64 vesaUseMsg();
67 int
68 ddxProcessArgument (int argc, char **argv, int i)
70 int ret;
72 if (!(ret = vesaProcessArgument (argc, argv, i)))
73 ret = KdProcessArgument(argc, argv, i);
74 return ret;