~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/kdrive/neomagic/neomagicstub.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
Import upstream version 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * Copyright © 2004 Franco Catrin
 
4
 *
 
5
 * Permission to use, copy, modify, distribute, and sell this software and its
 
6
 * documentation for any purpose is hereby granted without fee, provided that
 
7
 * the above copyright notice appear in all copies and that both that
 
8
 * copyright notice and this permission notice appear in supporting
 
9
 * documentation, and that the name of Franco Catrin not be used in
 
10
 * advertising or publicity pertaining to distribution of the software without
 
11
 * specific, written prior permission.  Franco Catrin makes no
 
12
 * representations about the suitability of this software for any purpose.  It
 
13
 * is provided "as is" without express or implied warranty.
 
14
 *
 
15
 * FRANCO CATRIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
16
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
17
 * EVENT SHALL FRANCO CATRIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
18
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
19
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 
20
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
21
 * PERFORMANCE OF THIS SOFTWARE.
 
22
 */
 
23
 
 
24
#ifdef HAVE_CONFIG_H
 
25
#include <kdrive-config.h>
 
26
#endif
 
27
#include "neomagic.h"
 
28
 
 
29
extern struct NeoChipInfo neoChips[];
 
30
 
 
31
void
 
32
InitCard (char *name)
 
33
{
 
34
    KdCardAttr attr;
 
35
    struct NeoChipInfo *chip;
 
36
 
 
37
    for (chip = neoChips; chip->name != NULL; ++chip) {
 
38
        int j = 0;
 
39
        while (LinuxFindPci(chip->vendor, chip->device, j++, &attr)) {
 
40
            KdCardInfoAdd(&neoFuncs, &attr, 0);
 
41
        }
 
42
    }
 
43
}
 
44
 
 
45
void
 
46
InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
 
47
{
 
48
    KdInitOutput (pScreenInfo, argc, argv);
 
49
}
 
50
 
 
51
void
 
52
InitInput (int argc, char **argv)
 
53
{
 
54
    KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
 
55
#ifdef TOUCHSCREEN
 
56
    KdAddMouseDriver (&TsFuncs);
 
57
#endif
 
58
}
 
59
 
 
60
void
 
61
ddxUseMsg (void)
 
62
{
 
63
    KdUseMsg();
 
64
    vesaUseMsg();
 
65
}
 
66
 
 
67
int
 
68
ddxProcessArgument (int argc, char **argv, int i)
 
69
{
 
70
    int ret;
 
71
 
 
72
    if (!(ret = vesaProcessArgument (argc, argv, i)))
 
73
    ret = KdProcessArgument(argc, argv, i);
 
74
    return ret;
 
75
}