~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h,v 1.4 2002/10/30 12:52:13 alanh Exp $ */
 
2
/*
 
3
 * Copyright 2000 ATI Technologies Inc., Markham, Ontario,
 
4
 *                VA Linux Systems Inc., Fremont, California.
 
5
 *
 
6
 * All Rights Reserved.
 
7
 *
 
8
 * Permission is hereby granted, free of charge, to any person obtaining
 
9
 * a copy of this software and associated documentation files (the
 
10
 * "Software"), to deal in the Software without restriction, including
 
11
 * without limitation on the rights to use, copy, modify, merge,
 
12
 * publish, distribute, sublicense, and/or sell copies of the Software,
 
13
 * and to permit persons to whom the Software is furnished to do so,
 
14
 * subject to the following conditions:
 
15
 *
 
16
 * The above copyright notice and this permission notice (including the
 
17
 * next paragraph) shall be included in all copies or substantial
 
18
 * portions of the Software.
 
19
 *
 
20
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 
21
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
22
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
23
 * NON-INFRINGEMENT.  IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR
 
24
 * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 
25
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
26
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
27
 * DEALINGS IN THE SOFTWARE.
 
28
 */
 
29
 
 
30
/*
 
31
 * Authors:
 
32
 *   Kevin E. Martin <martin@xfree86.org>
 
33
 *   Rickard E. Faith <faith@valinux.com>
 
34
 *
 
35
 */
 
36
 
 
37
#ifndef _RADEON_DRI_
 
38
#define _RADEON_DRI_
 
39
 
 
40
#include "xf86drm.h"
 
41
#include "radeon_common.h"
 
42
 
 
43
/* DRI Driver defaults */
 
44
#define RADEON_DEFAULT_CP_PIO_MODE    RADEON_CSQ_PRIPIO_INDPIO
 
45
#define RADEON_DEFAULT_CP_BM_MODE     RADEON_CSQ_PRIBM_INDBM
 
46
#define RADEON_DEFAULT_AGP_MODE       1
 
47
#define RADEON_DEFAULT_AGP_FAST_WRITE 0
 
48
#define RADEON_DEFAULT_AGP_SIZE       8 /* MB (must be 2^n and > 4MB) */
 
49
#define RADEON_DEFAULT_RING_SIZE      1 /* MB (must be page aligned) */
 
50
#define RADEON_DEFAULT_BUFFER_SIZE    2 /* MB (must be page aligned) */
 
51
#define RADEON_DEFAULT_AGP_TEX_SIZE   1 /* MB (must be page aligned) */
 
52
 
 
53
#define RADEON_DEFAULT_CP_TIMEOUT     10000  /* usecs */
 
54
 
 
55
#define RADEON_AGP_MAX_MODE           4
 
56
 
 
57
#define RADEON_CARD_TYPE_RADEON       1
 
58
 
 
59
/* Buffer are aligned on 4096 byte boundaries */
 
60
#define RADEON_BUFFER_ALIGN           0x00000fff
 
61
 
 
62
#define RADEONCP_USE_RING_BUFFER(m)                                     \
 
63
    (((m) == RADEON_CSQ_PRIBM_INDDIS) ||                                \
 
64
     ((m) == RADEON_CSQ_PRIBM_INDBM))
 
65
 
 
66
typedef struct {
 
67
    /* DRI screen private data */
 
68
    int           deviceID;     /* PCI device ID */
 
69
    int           width;        /* Width in pixels of display */
 
70
    int           height;       /* Height in scanlines of display */
 
71
    int           depth;        /* Depth of display (8, 15, 16, 24) */
 
72
    int           bpp;          /* Bit depth of display (8, 16, 24, 32) */
 
73
 
 
74
    int           IsPCI;        /* Current card is a PCI card */
 
75
    int           AGPMode;
 
76
 
 
77
    int           frontOffset;  /* Start of front buffer */
 
78
    int           frontPitch;
 
79
    int           backOffset;   /* Start of shared back buffer */
 
80
    int           backPitch;
 
81
    int           depthOffset;  /* Start of shared depth buffer */
 
82
    int           depthPitch;
 
83
    int           textureOffset;/* Start of texture data in frame buffer */
 
84
    int           textureSize;
 
85
    int           log2TexGran;
 
86
 
 
87
    /* MMIO register data */
 
88
    drmHandle     registerHandle;
 
89
    drmSize       registerSize;
 
90
 
 
91
    /* CP in-memory status information */
 
92
    drmHandle     statusHandle;
 
93
    drmSize       statusSize;
 
94
 
 
95
    /* CP AGP Texture data */
 
96
    drmHandle     agpTexHandle;
 
97
    drmSize       agpTexMapSize;
 
98
    int           log2AGPTexGran;
 
99
    int           agpTexOffset;
 
100
    unsigned int  sarea_priv_offset;
 
101
 
 
102
#ifdef PER_CONTEXT_SAREA
 
103
    drmSize      perctx_sarea_size;
 
104
#endif
 
105
} RADEONDRIRec, *RADEONDRIPtr;
 
106
 
 
107
#endif