~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/mga/server/mga.h

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * MGA Millennium (MGA2064W) functions
3
 
 *
4
 
 * Copyright 1996 The XFree86 Project, Inc.
5
 
 *
6
 
 * Authors
7
 
 *              Dirk Hohndel
8
 
 *                      hohndel@XFree86.Org
9
 
 *              David Dawes
10
 
 *                      dawes@XFree86.Org
11
 
 */
12
 
 
13
 
#ifndef MGA_H
14
 
#define MGA_H
15
 
 
16
 
 
17
 
#include "xf86drm.h"
18
 
#include "linux/types.h"
19
 
 
20
 
 
21
 
#define PCI_CHIP_MGA2085                0x0518
22
 
#define PCI_CHIP_MGA2064                0x0519
23
 
#define PCI_CHIP_MGA1064                0x051A
24
 
#define PCI_CHIP_MGA2164                0x051B
25
 
#define PCI_CHIP_MGA2164_AGP            0x051F
26
 
#define PCI_CHIP_MGAG200_PCI            0x0520
27
 
#define PCI_CHIP_MGAG200                0x0521
28
 
#define PCI_CHIP_MGAG400                0x0525
29
 
#define PCI_CHIP_MGAG550                0x2527
30
 
#define PCI_CHIP_MGAG100_PCI            0x1000
31
 
#define PCI_CHIP_MGAG100                0x1001
32
 
 
33
 
 
34
 
#  define MMIO_IN8(base, offset) \
35
 
        *(volatile unsigned char *)(((unsigned char*)(base)) + (offset))
36
 
#  define MMIO_IN16(base, offset) \
37
 
        *(volatile unsigned short *)(void *)(((unsigned char*)(base)) + (offset))
38
 
#  define MMIO_IN32(base, offset) \
39
 
        *(volatile unsigned int *)(void *)(((unsigned char*)(base)) + (offset))
40
 
#  define MMIO_OUT8(base, offset, val) \
41
 
        *(volatile unsigned char *)(((unsigned char*)(base)) + (offset)) = (val)
42
 
#  define MMIO_OUT16(base, offset, val) \
43
 
        *(volatile unsigned short *)(void *)(((unsigned char*)(base)) + (offset)) = (val)
44
 
#  define MMIO_OUT32(base, offset, val) \
45
 
        *(volatile unsigned int *)(void *)(((unsigned char*)(base)) + (offset)) = (val)
46
 
 
47
 
#define INREG8(addr) MMIO_IN8(pMga->IOBase, addr)
48
 
#define INREG16(addr) MMIO_IN16(pMga->IOBase, addr)
49
 
#define INREG(addr) MMIO_IN32(pMga->IOBase, addr)
50
 
#define OUTREG8(addr, val) MMIO_OUT8(pMga->IOBase, addr, val)
51
 
#define OUTREG16(addr, val) MMIO_OUT16(pMga->IOBase, addr, val)
52
 
#define OUTREG(addr, val) MMIO_OUT32(pMga->IOBase, addr, val)
53
 
 
54
 
#define MGAIOMAPSIZE            0x00004000
55
 
 
56
 
 
57
 
typedef struct {
58
 
  int               Chipset;          /**< \brief Chipset number */
59
 
 
60
 
  int               irq;              /**< \brief IRQ number */
61
 
 
62
 
 
63
 
  int               frontOffset;      /**< \brief Front color buffer offset */
64
 
  int               frontPitch;       /**< \brief Front color buffer pitch */
65
 
  int               backOffset;       /**< \brief Back color buffer offset */
66
 
  int               backPitch;        /**< \brief Back color buffer pitch */
67
 
  int               depthOffset;      /**< \brief Depth buffer offset */
68
 
  int               depthPitch;       /**< \brief Depth buffer pitch */
69
 
  int               textureOffset;    /**< \brief Texture area offset */
70
 
  int               textureSize;      /**< \brief Texture area size */
71
 
  int               logTextureGranularity;
72
 
 
73
 
  /**
74
 
   * \name AGP
75
 
   */
76
 
  /*@{*/
77
 
  drmSize           agpSize;          /**< \brief AGP map size */
78
 
  int               agpMode;          /**< \brief AGP mode */
79
 
  /*@}*/
80
 
 
81
 
  drmRegion         agp;
82
 
 
83
 
  /* PCI mappings */
84
 
  drmRegion         registers;
85
 
  drmRegion         status;
86
 
 
87
 
  /* AGP mappings */
88
 
  drmRegion         warp;
89
 
  drmRegion         primary;
90
 
  drmRegion         buffers;
91
 
  drmRegion         agpTextures;
92
 
 
93
 
  drmBufMapPtr      drmBuffers;
94
 
 
95
 
  unsigned long     IOAddress;
96
 
  unsigned char    *IOBase;
97
 
  int               HasSDRAM;
98
 
 
99
 
  __u32             reg_ien;
100
 
} MGARec, *MGAPtr;
101
 
 
102
 
 
103
 
 
104
 
#define MGA_FRONT       0x1
105
 
#define MGA_BACK        0x2
106
 
#define MGA_DEPTH       0x4
107
 
 
108
 
#define MGA_AGP_1X_MODE         0x01
109
 
#define MGA_AGP_2X_MODE         0x02
110
 
#define MGA_AGP_4X_MODE         0x04
111
 
#define MGA_AGP_MODE_MASK       0x07
112
 
 
113
 
 
114
 
#endif