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

« back to all changes in this revision

Viewing changes to hw/kdrive/r128/r128.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
 * $Id$
 
3
 *
 
4
 * Copyright © 2003 Anders Carlsson
 
5
 *
 
6
 * Permission to use, copy, modify, distribute, and sell this software and its
 
7
 * documentation for any purpose is hereby granted without fee, provided that
 
8
 * the above copyright notice appear in all copies and that both that
 
9
 * copyright notice and this permission notice appear in supporting
 
10
 * documentation, and that the name of Anders Carlsson not be used in
 
11
 * advertising or publicity pertaining to distribution of the software without
 
12
 * specific, written prior permission.  Anders Carlsson makes no
 
13
 * representations about the suitability of this software for any purpose.  It
 
14
 * is provided "as is" without express or implied warranty.
 
15
 *
 
16
 * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
18
 * EVENT SHALL ANDERS CARLSSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 
20
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 
21
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
22
 * PERFORMANCE OF THIS SOFTWARE.
 
23
 */
 
24
/* $Header$ */
 
25
 
 
26
#ifndef _R128_H_
 
27
#define _R128_H_
 
28
#include <vesa.h>
 
29
 
 
30
#define R128_REG_BASE(c)            ((c)->attr.address[1])
 
31
#define R128_REG_SIZE(c)            (0x4000)
 
32
 
 
33
#define R128_OUT32(mmio, a, v) (*(VOL32 *) ((mmio) + (a)) = (v))
 
34
#define R128_IN32(mmio, a) (*(VOL32 *) ((mmio) + (a)))
 
35
 
 
36
#define R128_REG_GUI_STAT               0x1740
 
37
#define R128_REG_DEFAULT_OFFSET         0x16e0
 
38
#define R128_REG_DEFAULT_PITCH          0x16e4
 
39
#define R128_REG_DP_GUI_MASTER_CNTL     0x146c
 
40
#define R128_REG_DP_BRUSH_FRGD_CLR      0x147c
 
41
#define R128_REG_DP_WRITE_MASK          0x16cc
 
42
#define R128_REG_DP_CNTL                0x16c0
 
43
#define R128_REG_DST_WIDTH_HEIGHT       0x1598
 
44
#define R128_REG_DST_Y_X                0x1438
 
45
#define R128_REG_PC_NGUI_CTLSTAT        0x0184
 
46
#define R128_REG_DST_HEIGHT_WIDTH       0x143c
 
47
#define R128_REG_SRC_Y_X                0x1434
 
48
#define R128_DEFAULT_SC_BOTTOM_RIGHT    0x16e8
 
49
#define R128_AUX_SC_CNTL                0x1660
 
50
#define R128_SC_TOP_LEFT                0x16ec
 
51
#define R128_SC_BOTTOM_RIGHT            0x16f0
 
52
 
 
53
#define R128_GMC_DST_DATATYPE_SHIFT     8
 
54
#define R128_GMC_CLR_CMP_CNTL_DIS       (1 << 28)
 
55
#define R128_GMC_AUX_CLIP_DIS           (1 << 29)
 
56
#define R128_GMC_BRUSH_SOLID_COLOR      (13 << 4)
 
57
#define R128_GMC_SRC_DATATYPE_COLOR     (3 << 12)
 
58
#define R128_GMC_ROP3_SHIFT             16
 
59
#define R128_DST_X_LEFT_TO_RIGHT        (1 <<  0)
 
60
#define R128_DST_Y_TOP_TO_BOTTOM        (1 <<  1)
 
61
#define R128_GUI_ACTIVE                 (1 << 31)
 
62
#define R128_PC_BUSY                    (1 << 31)
 
63
#define R128_DP_SRC_SOURCE_MEMORY       (2 << 24)
 
64
#define R128_DEFAULT_SC_RIGHT_MAX       (0x1fff <<  0)
 
65
#define R128_DEFAULT_SC_BOTTOM_MAX      (0x1fff << 16)
 
66
 
 
67
typedef volatile CARD8  VOL8;
 
68
typedef volatile CARD16 VOL16;
 
69
typedef volatile CARD32 VOL32;
 
70
                         
 
71
typedef struct _r128CardInfo {
 
72
    VesaCardPrivRec vesa;
 
73
    CARD8 *reg_base;
 
74
    int fifo_size;
 
75
} R128CardInfo;
 
76
 
 
77
#define getR128CardInfo(kd) ((R128CardInfo *) ((kd)->card->driver))
 
78
#define r128CardInfo(kd)        R128CardInfo *r128c = getR128CardInfo(kd)
 
79
 
 
80
typedef struct _r128ScreenInfo {
 
81
    VesaScreenPrivRec vesa;
 
82
    CARD8 *screen;
 
83
    CARD8 *off_screen;
 
84
    int off_screen_size;
 
85
 
 
86
    KaaScreenInfoRec kaa;
 
87
 
 
88
    int pitch;
 
89
    int datatype;
 
90
 
 
91
    int dp_gui_master_cntl;
 
92
} R128ScreenInfo;
 
93
 
 
94
#define getR128ScreenInfo(kd) ((R128ScreenInfo *) ((kd)->screen->driver))
 
95
#define r128ScreenInfo(kd)    R128ScreenInfo *r128s = getR128ScreenInfo(kd)
 
96
 
 
97
Bool
 
98
r128MapReg (KdCardInfo *card, R128CardInfo *r128c);
 
99
 
 
100
void
 
101
r128UnmapReg (KdCardInfo *card, R128CardInfo *r128c);
 
102
 
 
103
void
 
104
r128SetMMIO (KdCardInfo *card, R128CardInfo *r128c);
 
105
 
 
106
void
 
107
r128ResetMMIO (KdCardInfo *card, R128CardInfo *r128c);
 
108
 
 
109
Bool
 
110
r128DrawSetup (ScreenPtr pScreen);
 
111
 
 
112
Bool
 
113
r128DrawInit (ScreenPtr pScreen);
 
114
 
 
115
void
 
116
r128DrawEnable (ScreenPtr pScreen);
 
117
 
 
118
void
 
119
r128DrawDisable (ScreenPtr pScreen);
 
120
 
 
121
void
 
122
r128DrawFini (ScreenPtr pScreen);
 
123
 
 
124
extern KdCardFuncs  r128Funcs;
 
125
 
 
126
#endif /* _R128_H_ */