~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to hw/kdrive/neomagic/backend.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Generic card driving functions.
 
3
 * Essentially, cascades calls to fbdev and vesa to initialize cards that
 
4
 * do not have hardware-specific routines yet. Copied from the ati driver.
 
5
 *
 
6
 * Copyright (c) 2004 Brent Cook <busterb@mail.utexas.edu>
 
7
 *
 
8
 * This code is licensed under the GPL.  See the file COPYING in the root
 
9
 * directory of the sources for details.
 
10
 */
 
11
 
 
12
#ifndef _BACKEND_H_
 
13
#define _BACKEND_H_
 
14
#include "kdrive.h"
 
15
 
 
16
#ifdef KDRIVEFBDEV
 
17
#include <fbdev.h>
 
18
#endif
 
19
#ifdef KDRIVEVESA
 
20
#include <vesa.h>
 
21
#endif
 
22
 
 
23
typedef enum _BackendType {VESA, FBDEV} BackendType;
 
24
 
 
25
typedef struct _BackendInfo {
 
26
    // backend info
 
27
    BackendType type;
 
28
 
 
29
    // backend internal structures
 
30
    union {
 
31
#ifdef KDRIVEFBDEV
 
32
        FbdevPriv fbdev;
 
33
#endif
 
34
#ifdef KDRIVEVESA
 
35
        VesaCardPrivRec vesa;
 
36
#endif
 
37
    } priv;
 
38
 
 
39
    // pointers to helper functions for this backend
 
40
    void (*cardfini)(KdCardInfo *);
 
41
    void (*scrfini)(KdScreenInfo *);
 
42
    Bool (*initScreen)(ScreenPtr);
 
43
    Bool (*finishInitScreen)(ScreenPtr pScreen);
 
44
    Bool (*createRes)(ScreenPtr);
 
45
    void (*preserve)(KdCardInfo *);
 
46
    void (*restore)(KdCardInfo *);
 
47
    Bool (*dpms)(ScreenPtr, int);
 
48
    Bool (*enable)(ScreenPtr);
 
49
    void (*disable)(ScreenPtr);
 
50
    void (*getColors)(ScreenPtr, int, int, xColorItem *);
 
51
    void (*putColors)(ScreenPtr, int, int, xColorItem *);
 
52
} BackendInfo;
 
53
 
 
54
typedef union _BackendScreen {
 
55
#ifdef KDRIVEFBDEV
 
56
    FbdevScrPriv fbdev;
 
57
#endif
 
58
#ifdef KDRIVEVESA
 
59
    VesaScreenPrivRec vesa;
 
60
#endif
 
61
} BackendScreen;
 
62
 
 
63
Bool
 
64
backendInitialize(KdCardInfo *card, BackendInfo *backend);
 
65
 
 
66
Bool
 
67
backendScreenInitialize(KdScreenInfo *screen, BackendScreen *backendScreen,
 
68
                        BackendInfo *backendCard);
 
69
 
 
70
#endif