summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2013-01-13 22:58:08 +0100
committerMarek Olšák <maraeo@gmail.com>2013-01-14 03:11:41 +0100
commit4d6faf51755d2f8492a1b46e9b5d03ff7e8f4871 (patch)
tree25ae14338664f7c05d110ed49a6269f413b4e6e5
parent6acef6c5f779ed0ba390f556479c428a36d70edb (diff)
r300g: kill the X.Org state tracker target
This won't ever be made default and we don't need it anyway. We should also consider doing this for other drivers.
-rw-r--r--configure.ac3
-rw-r--r--src/gallium/targets/xorg-r300/Makefile.am71
-rw-r--r--src/gallium/targets/xorg-r300/target.c26
-rw-r--r--src/gallium/targets/xorg-r300/xorg.c148
4 files changed, 1 insertions, 247 deletions
diff --git a/configure.ac b/configure.ac
index bde5b057818..5072ee007ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1830,7 +1830,7 @@ if test "x$with_gallium_drivers" != x; then
1830 PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) 1830 PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
1831 gallium_require_llvm "Gallium R300" 1831 gallium_require_llvm "Gallium R300"
1832 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" 1832 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
1833 gallium_check_st "radeon/drm" "dri-r300" "xorg-r300" "" "xvmc-r300" "vdpau-r300" 1833 gallium_check_st "radeon/drm" "dri-r300" "" "" "xvmc-r300" "vdpau-r300"
1834 ;; 1834 ;;
1835 xr600) 1835 xr600)
1836 HAVE_GALLIUM_R600=yes 1836 HAVE_GALLIUM_R600=yes
@@ -2057,7 +2057,6 @@ AC_CONFIG_FILES([Makefile
2057 src/gallium/targets/xa-vmwgfx/xatracker.pc 2057 src/gallium/targets/xa-vmwgfx/xatracker.pc
2058 src/gallium/targets/xorg-i915/Makefile 2058 src/gallium/targets/xorg-i915/Makefile
2059 src/gallium/targets/xorg-nouveau/Makefile 2059 src/gallium/targets/xorg-nouveau/Makefile
2060 src/gallium/targets/xorg-r300/Makefile
2061 src/gallium/targets/xorg-r600/Makefile 2060 src/gallium/targets/xorg-r600/Makefile
2062 src/gallium/targets/xorg-radeonsi/Makefile 2061 src/gallium/targets/xorg-radeonsi/Makefile
2063 src/gallium/targets/xvmc-nouveau/Makefile 2062 src/gallium/targets/xvmc-nouveau/Makefile
diff --git a/src/gallium/targets/xorg-r300/Makefile.am b/src/gallium/targets/xorg-r300/Makefile.am
deleted file mode 100644
index e7d01958800..00000000000
--- a/src/gallium/targets/xorg-r300/Makefile.am
+++ /dev/null
@@ -1,71 +0,0 @@
1# Copyright © 2012 Intel Corporation
2#
3# Permission is hereby granted, free of charge, to any person obtaining a
4# copy of this software and associated documentation files (the "Software"),
5# to deal in the Software without restriction, including without limitation
6# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7# and/or sell copies of the Software, and to permit persons to whom the
8# Software is furnished to do so, subject to the following conditions:
9#
10# The above copyright notice and this permission notice (including the next
11# paragraph) shall be included in all copies or substantial portions of the
12# Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21# DEALINGS IN THE SOFTWARE.
22
23include $(top_srcdir)/src/gallium/Automake.inc
24
25AM_CFLAGS = \
26 $(GALLIUM_CFLAGS) \
27 $(PTHREAD_CFLAGS) \
28 $(XORG_CFLAGS)
29AM_CPPFLAGS = \
30 -I$(top_srcdir)/src/gallium/drivers \
31 -I$(top_srcdir)/src/gallium/winsys \
32 -DHAVE_CONFIG_H \
33 -DGALLIUM_RBUG \
34 -DGALLIUM_TRACE \
35 -DGALLIUM_GALAHAD
36
37xorgdir = $(XORG_DRIVER_INSTALL_DIR)
38xorg_LTLIBRARIES = r300_drv.la
39
40nodist_EXTRA_r300_drv_la_SOURCES = dummy.cpp
41r300_drv_la_SOURCES = \
42 target.c \
43 xorg.c
44
45r300_drv_la_LDFLAGS = -module -avoid-version -shared -no-undefined
46
47r300_drv_la_LIBADD = \
48 $(top_builddir)/src/gallium/auxiliary/libgallium.la \
49 $(top_builddir)/src/gallium/state_trackers/xorg/libxorgtracker.la \
50 $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
51 $(top_builddir)/src/gallium/drivers/r300/libr300-helper.la \
52 $(top_builddir)/src/gallium/drivers/r300/libr300.la \
53 $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
54 $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
55 $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
56 $(GALLIUM_DRI_LIB_DEPS) \
57 $(LIBDRM_XORG_LIBS) \
58 $(LIBKMS_XORG_LIBS) \
59 $(RADEON_LIBS)
60
61if HAVE_MESA_LLVM
62AM_CFLAGS += $(LLVM_CFLAGS)
63r300_drv_la_LDFLAGS += $(LLVM_LDFLAGS)
64r300_drv_la_LIBADD += $(LLVM_LIBS)
65endif
66
67# Provide compatibility with scripts for the old Mesa build system for
68# a while by putting a link to the driver into /lib of the build tree.
69all-local: r300_drv.la
70 $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
71 ln -f .libs/r300_drv.so $(top_builddir)/$(LIB_DIR)/gallium/r300_drv.so
diff --git a/src/gallium/targets/xorg-r300/target.c b/src/gallium/targets/xorg-r300/target.c
deleted file mode 100644
index a8f8e6e1bd1..00000000000
--- a/src/gallium/targets/xorg-r300/target.c
+++ /dev/null
@@ -1,26 +0,0 @@
1
2#include "target-helpers/inline_debug_helper.h"
3#include "state_tracker/drm_driver.h"
4#include "radeon/drm/radeon_drm_public.h"
5#include "r300/r300_public.h"
6
7static struct pipe_screen *
8create_screen(int fd)
9{
10 struct radeon_winsys *sws;
11 struct pipe_screen *screen;
12
13 sws = radeon_drm_winsys_create(fd);
14 if (!sws)
15 return NULL;
16
17 screen = r300_screen_create(sws);
18 if (!screen)
19 return NULL;
20
21 screen = debug_screen_wrap(screen);
22
23 return screen;
24}
25
26DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
diff --git a/src/gallium/targets/xorg-r300/xorg.c b/src/gallium/targets/xorg-r300/xorg.c
deleted file mode 100644
index 933bfb8a07c..00000000000
--- a/src/gallium/targets/xorg-r300/xorg.c
+++ /dev/null
@@ -1,148 +0,0 @@
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
34static void r300_xorg_identify(int flags);
35static Bool r300_xorg_pci_probe(DriverPtr driver,
36 int entity_num,
37 struct pci_device *device,
38 intptr_t match_data);
39
40static const struct pci_id_match r300_xorg_device_match[] = {
41 {0x1002, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
42 {0, 0, 0},
43};
44
45static SymTabRec r300_xorg_chipsets[] = {
46 {PCI_MATCH_ANY, "ATI R300 Graphics Chipset"},
47 {-1, NULL}
48};
49
50static PciChipsets r300_xorg_pci_devices[] = {
51 {PCI_MATCH_ANY, PCI_MATCH_ANY, NULL},
52 {-1, -1, NULL}
53};
54
55static XF86ModuleVersionInfo r300_xorg_version = {
56 "r300",
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 r300_driver = {
73 1,
74 "r300",
75 r300_xorg_identify,
76 NULL,
77 xorg_tracker_available_options,
78 NULL,
79 0,
80 NULL,
81 r300_xorg_device_match,
82 r300_xorg_pci_probe
83};
84
85static MODULESETUPPROTO(r300_xorg_setup);
86
87_X_EXPORT XF86ModuleData r300ModuleData = {
88 &r300_xorg_version,
89 r300_xorg_setup,
90 NULL
91};
92
93/*
94 * Xorg driver functions
95 */
96
97static pointer
98r300_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(&r300_driver, 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
120static void
121r300_xorg_identify(int flags)
122{
123 xf86PrintChipsets("r300", "Driver for Radeon Gallium with KMS",
124 r300_xorg_chipsets);
125}
126
127static Bool
128r300_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, r300_xorg_pci_devices,
135 NULL, NULL, NULL, NULL, NULL);
136 if (scrn != NULL) {
137 scrn->driverVersion = 1;
138 scrn->driverName = "r300";
139 scrn->name = "r300";
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}