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

« back to all changes in this revision

Viewing changes to src/gallium/winsys/drm/nouveau/xorg/nouveau_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
 
 *
29
 
 */
30
 
 
31
 
#include "../../../../state_trackers/xorg/xorg_winsys.h"
32
 
 
33
 
static void nouveau_xorg_identify(int flags);
34
 
static Bool nouveau_xorg_pci_probe(DriverPtr driver, int entity_num,
35
 
                                   struct pci_device *device,
36
 
                                   intptr_t match_data);
37
 
 
38
 
static const struct pci_id_match nouveau_xorg_device_match[] = {
39
 
    { 0x10de, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
40
 
      0x00030000, 0x00ffffff, 0 },
41
 
    { 0x12d2, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
42
 
      0x00030000, 0x00ffffff, 0 },
43
 
    {0, 0, 0},
44
 
};
45
 
 
46
 
static SymTabRec nouveau_xorg_chipsets[] = {
47
 
    {PCI_MATCH_ANY, "NVIDIA Graphics Device"},
48
 
    {-1, NULL}
49
 
};
50
 
 
51
 
static PciChipsets nouveau_xorg_pci_devices[] = {
52
 
    {PCI_MATCH_ANY, PCI_MATCH_ANY, NULL},
53
 
    {-1, -1, NULL}
54
 
};
55
 
 
56
 
static XF86ModuleVersionInfo nouveau_xorg_version = {
57
 
    "modesetting",
58
 
    MODULEVENDORSTRING,
59
 
    MODINFOSTRING1,
60
 
    MODINFOSTRING2,
61
 
    XORG_VERSION_CURRENT,
62
 
    0, 1, 0, /* major, minor, patch */
63
 
    ABI_CLASS_VIDEODRV,
64
 
    ABI_VIDEODRV_VERSION,
65
 
    MOD_CLASS_VIDEODRV,
66
 
    {0, 0, 0, 0}
67
 
};
68
 
 
69
 
/*
70
 
 * Xorg driver exported structures
71
 
 */
72
 
 
73
 
_X_EXPORT DriverRec modesetting = {
74
 
    1,
75
 
    "modesetting",
76
 
    nouveau_xorg_identify,
77
 
    NULL,
78
 
    xorg_tracker_available_options,
79
 
    NULL,
80
 
    0,
81
 
    NULL,
82
 
    nouveau_xorg_device_match,
83
 
    nouveau_xorg_pci_probe
84
 
};
85
 
 
86
 
static MODULESETUPPROTO(nouveau_xorg_setup);
87
 
 
88
 
_X_EXPORT XF86ModuleData modesettingModuleData = {
89
 
    &nouveau_xorg_version,
90
 
    nouveau_xorg_setup,
91
 
    NULL
92
 
};
93
 
 
94
 
/*
95
 
 * Xorg driver functions
96
 
 */
97
 
 
98
 
static pointer
99
 
nouveau_xorg_setup(pointer module, pointer opts, int *errmaj, int *errmin)
100
 
{
101
 
    static Bool setupDone = 0;
102
 
 
103
 
    /* This module should be loaded only once, but check to be sure.
104
 
     */
105
 
    if (!setupDone) {
106
 
        setupDone = 1;
107
 
        xf86AddDriver(&modesetting, module, HaveDriverFuncs);
108
 
 
109
 
        /*
110
 
         * The return value must be non-NULL on success even though there
111
 
         * is no TearDownProc.
112
 
         */
113
 
        return (pointer) 1;
114
 
    } else {
115
 
        if (errmaj)
116
 
            *errmaj = LDR_ONCEONLY;
117
 
        return NULL;
118
 
    }
119
 
}
120
 
 
121
 
static void
122
 
nouveau_xorg_identify(int flags)
123
 
{
124
 
    xf86PrintChipsets("modesetting", "Driver for Modesetting Kernel Drivers",
125
 
                      nouveau_xorg_chipsets);
126
 
}
127
 
 
128
 
static Bool
129
 
nouveau_xorg_pci_probe(DriverPtr driver,
130
 
          int entity_num, struct pci_device *device, intptr_t match_data)
131
 
{
132
 
    ScrnInfoPtr scrn = NULL;
133
 
    EntityInfoPtr entity;
134
 
 
135
 
    scrn = xf86ConfigPciEntity(scrn, 0, entity_num, nouveau_xorg_pci_devices,
136
 
                               NULL, NULL, NULL, NULL, NULL);
137
 
    if (scrn != NULL) {
138
 
        scrn->driverVersion = 1;
139
 
        scrn->driverName = "i915";
140
 
        scrn->name = "modesetting";
141
 
        scrn->Probe = NULL;
142
 
 
143
 
        entity = xf86GetEntityInfo(entity_num);
144
 
 
145
 
        /* Use all the functions from the xorg tracker */
146
 
        xorg_tracker_set_functions(scrn);
147
 
    }
148
 
    return scrn != NULL;
149
 
}