~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/gallium/winsys/drm/radeon/xorg/radeon_xorg.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
3
 
 * All Rights Reserved.
4
 
 *
5
 
 * Permission is hereby granted, free of charge, to any person obtaining a
6
 
 * copy of this software and associated documentation files (the
7
 
 * "Software"), to deal in the Software without restriction, including
8
 
 * without limitation the rights to use, copy, modify, merge, publish,
9
 
 * distribute, sub license, and/or sell copies of the Software, and to
10
 
 * permit persons to whom the Software is furnished to do so, subject to
11
 
 * the following conditions:
12
 
 *
13
 
 * The above copyright notice and this permission notice (including the
14
 
 * next paragraph) shall be included in all copies or substantial portions
15
 
 * of the Software.
16
 
 *
17
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20
 
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
21
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
 
 *
25
 
 *
26
 
 * Author: Alan Hourihane <alanh@tungstengraphics.com>
27
 
 * Author: Jakob Bornecrantz <wallbraker@gmail.com>
28
 
 * Author: Corbin Simpson <MostAwesomedude@gmail.com>
29
 
 *
30
 
 */
31
 
 
32
 
#include "../../../../state_trackers/xorg/xorg_winsys.h"
33
 
 
34
 
static void radeon_xorg_identify(int flags);
35
 
static Bool radeon_xorg_pci_probe(DriverPtr driver,
36
 
                                 int entity_num,
37
 
                                 struct pci_device *device,
38
 
                                 intptr_t match_data);
39
 
 
40
 
static const struct pci_id_match radeon_xorg_device_match[] = {
41
 
    {0x1002, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
42
 
    {0, 0, 0},
43
 
};
44
 
 
45
 
static SymTabRec radeon_xorg_chipsets[] = {
46
 
    {PCI_MATCH_ANY, "ATI/AMD Radeon Graphics Chipset"},
47
 
    {-1, NULL}
48
 
};
49
 
 
50
 
static PciChipsets radeon_xorg_pci_devices[] = {
51
 
    {PCI_MATCH_ANY, PCI_MATCH_ANY, NULL},
52
 
    {-1, -1, NULL}
53
 
};
54
 
 
55
 
static XF86ModuleVersionInfo radeon_xorg_version = {
56
 
    "radeong",
57
 
    MODULEVENDORSTRING,
58
 
    MODINFOSTRING1,
59
 
    MODINFOSTRING2,
60
 
    XORG_VERSION_CURRENT,
61
 
    0, 1, 0, /* major, minor, patch */
62
 
    ABI_CLASS_VIDEODRV,
63
 
    ABI_VIDEODRV_VERSION,
64
 
    MOD_CLASS_VIDEODRV,
65
 
    {0, 0, 0, 0}
66
 
};
67
 
 
68
 
/*
69
 
 * Xorg driver exported structures
70
 
 */
71
 
 
72
 
_X_EXPORT DriverRec radeong = {
73
 
    1,
74
 
    "radeong",
75
 
    radeon_xorg_identify,
76
 
    NULL,
77
 
    xorg_tracker_available_options,
78
 
    NULL,
79
 
    0,
80
 
    NULL,
81
 
    radeon_xorg_device_match,
82
 
    radeon_xorg_pci_probe
83
 
};
84
 
 
85
 
static MODULESETUPPROTO(radeon_xorg_setup);
86
 
 
87
 
_X_EXPORT XF86ModuleData radeongModuleData = {
88
 
    &radeon_xorg_version,
89
 
    radeon_xorg_setup,
90
 
    NULL
91
 
};
92
 
 
93
 
/*
94
 
 * Xorg driver functions
95
 
 */
96
 
 
97
 
static pointer
98
 
radeon_xorg_setup(pointer module, pointer opts, int *errmaj, int *errmin)
99
 
{
100
 
    static Bool setupDone = 0;
101
 
 
102
 
    /* This module should be loaded only once, but check to be sure.
103
 
     */
104
 
    if (!setupDone) {
105
 
        setupDone = 1;
106
 
        xf86AddDriver(&radeong, module, HaveDriverFuncs);
107
 
 
108
 
        /*
109
 
         * The return value must be non-NULL on success even though there
110
 
         * is no TearDownProc.
111
 
         */
112
 
        return (pointer) 1;
113
 
    } else {
114
 
        if (errmaj)
115
 
            *errmaj = LDR_ONCEONLY;
116
 
        return NULL;
117
 
    }
118
 
}
119
 
 
120
 
static void
121
 
radeon_xorg_identify(int flags)
122
 
{
123
 
    xf86PrintChipsets("radeong", "Driver for Radeon Gallium with KMS",
124
 
                      radeon_xorg_chipsets);
125
 
}
126
 
 
127
 
static Bool
128
 
radeon_xorg_pci_probe(DriverPtr driver,
129
 
          int entity_num, struct pci_device *device, intptr_t match_data)
130
 
{
131
 
    ScrnInfoPtr scrn = NULL;
132
 
    EntityInfoPtr entity;
133
 
 
134
 
    scrn = xf86ConfigPciEntity(scrn, 0, entity_num, radeon_xorg_pci_devices,
135
 
                               NULL, NULL, NULL, NULL, NULL);
136
 
    if (scrn != NULL) {
137
 
        scrn->driverVersion = 1;
138
 
        scrn->driverName = "radeong";
139
 
        scrn->name = "radeong";
140
 
        scrn->Probe = NULL;
141
 
 
142
 
        entity = xf86GetEntityInfo(entity_num);
143
 
 
144
 
        /* Use all the functions from the xorg tracker */
145
 
        xorg_tracker_set_functions(scrn);
146
 
    }
147
 
    return scrn != NULL;
148
 
}