Mesa (master): gallium: Move xorg drivers to targets

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Thu Mar 25 13:50:21 UTC 2010


Module: Mesa
Branch: master
Commit: 43218a45a4cdbe2bc92867dc143f4b0e5fe9ca8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=43218a45a4cdbe2bc92867dc143f4b0e5fe9ca8d

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Wed Mar 24 11:45:30 2010 +0100

gallium: Move xorg drivers to targets

Attached output from git commit:
 rename src/gallium/{winsys/drm/intel/xorg => targets/xorg-i915}/Makefile (95%)
 rename src/gallium/{winsys/drm/intel/xorg => targets/xorg-i915}/intel_xorg.c (98%)
 rename src/gallium/{winsys/drm/i965/xorg => targets/xorg-i965}/Makefile (78%)
 rename src/gallium/{winsys/drm/i965/xorg => targets/xorg-i965}/intel_xorg.c (98%)
 rename src/gallium/{winsys/drm/nouveau/xorg => targets/xorg-nouveau}/Makefile (96%)
 rename src/gallium/{winsys/drm/nouveau/xorg => targets/xorg-nouveau}/nouveau_xorg.c (98%)
 rename src/gallium/{winsys/drm/radeon/xorg => targets/xorg-radeon}/Makefile (73%)
 rename src/gallium/{winsys/drm/radeon/xorg => targets/xorg-radeon}/radeon_xorg.c (98%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/Makefile (97%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/SConscript (100%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_driver.h (100%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_hook.h (100%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_ioctl.c (99%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_screen.c (100%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_video.c (99%)
 rename src/gallium/{winsys/drm/vmware/xorg => targets/xorg-vmwgfx}/vmw_xorg.c (100%)

---

 configure.ac                                       |   12 ++++++++++
 .../drm/intel/xorg => targets/xorg-i915}/Makefile  |    8 +++---
 .../intel/xorg => targets/xorg-i915}/intel_xorg.c  |    2 +-
 .../drm/i965/xorg => targets/xorg-i965}/Makefile   |   20 ++++++-----------
 .../i965/xorg => targets/xorg-i965}/intel_xorg.c   |    2 +-
 .../nouveau/xorg => targets/xorg-nouveau}/Makefile |    7 ++---
 .../xorg => targets/xorg-nouveau}/nouveau_xorg.c   |    2 +-
 .../radeon/xorg => targets/xorg-radeon}/Makefile   |   22 +++++++------------
 .../xorg => targets/xorg-radeon}/radeon_xorg.c     |    2 +-
 .../vmware/xorg => targets/xorg-vmwgfx}/Makefile   |    3 +-
 .../vmware/xorg => targets/xorg-vmwgfx}/SConscript |    0 
 .../xorg => targets/xorg-vmwgfx}/vmw_driver.h      |    0 
 .../vmware/xorg => targets/xorg-vmwgfx}/vmw_hook.h |    0 
 .../xorg => targets/xorg-vmwgfx}/vmw_ioctl.c       |    2 +-
 .../xorg => targets/xorg-vmwgfx}/vmw_screen.c      |    0 
 .../xorg => targets/xorg-vmwgfx}/vmw_video.c       |    2 +-
 .../vmware/xorg => targets/xorg-vmwgfx}/vmw_xorg.c |    0 
 src/gallium/winsys/drm/vmware/SConscript           |    4 ---
 18 files changed, 41 insertions(+), 47 deletions(-)

diff --git a/configure.ac b/configure.ac
index dccff6f..c8f78dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1323,6 +1323,9 @@ if test "x$enable_gallium_svga" = xyes; then
     if test "x$enable_egl" = xyes; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-vmwgfx"
     fi
+    if test "x$HAVE_XORG" = xyes; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xorg-vmwgfx"
+    fi
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
 elif test "x$enable_gallium_svga" = xauto; then
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga"
@@ -1344,6 +1347,9 @@ if test "x$enable_gallium_intel" = xyes; then
     if test "x$enable_egl" = xyes; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-i915 egl-i965"
     fi
+    if test "x$HAVE_XORG" = xyes; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xorg-i915 xorg-i965"
+    fi
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
 elif test "x$enable_gallium_intel" = xauto; then
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965"
@@ -1365,6 +1371,9 @@ if test "x$enable_gallium_radeon" = xyes; then
     if test "x$enable_egl" = xyes; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-radeon"
     fi
+    if test "x$HAVE_XORG" = xyes; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xorg-radeon"
+    fi
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
 elif test "x$enable_gallium_radeon" = xauto; then
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
@@ -1386,6 +1395,9 @@ if test "x$enable_gallium_nouveau" = xyes; then
     if test "x$enable_egl" = xyes; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-nouveau"
     fi
+    if test "x$HAVE_XORG" = xyes; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xorg-nouveau"
+    fi
     GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50"
 fi
 
diff --git a/src/gallium/winsys/drm/intel/xorg/Makefile b/src/gallium/targets/xorg-i915/Makefile
similarity index 95%
rename from src/gallium/winsys/drm/intel/xorg/Makefile
rename to src/gallium/targets/xorg-i915/Makefile
index 14c2462..4442147 100644
--- a/src/gallium/winsys/drm/intel/xorg/Makefile
+++ b/src/gallium/targets/xorg-i915/Makefile
@@ -1,13 +1,13 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
 TARGET     = modesetting_drv.so
 CFILES     = $(wildcard ./*.c)
 OBJECTS    = $(patsubst ./%.c,./%.o,$(CFILES))
-TOP        = ../../../../../..
-
-include $(TOP)/configs/current
 
 INCLUDES = \
 	$(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
-	-I../gem \
+	-I$(TOP)/src/gallium/winsys/drm/intel/gem \
 	-I$(TOP)/src/gallium/include \
 	-I$(TOP)/src/gallium/drivers \
 	-I$(TOP)/src/gallium/auxiliary \
diff --git a/src/gallium/winsys/drm/intel/xorg/intel_xorg.c b/src/gallium/targets/xorg-i915/intel_xorg.c
similarity index 98%
rename from src/gallium/winsys/drm/intel/xorg/intel_xorg.c
rename to src/gallium/targets/xorg-i915/intel_xorg.c
index 369dc35..08f3b08 100644
--- a/src/gallium/winsys/drm/intel/xorg/intel_xorg.c
+++ b/src/gallium/targets/xorg-i915/intel_xorg.c
@@ -28,7 +28,7 @@
  *
  */
 
-#include "../../../../state_trackers/xorg/xorg_winsys.h"
+#include "../../state_trackers/xorg/xorg_winsys.h"
 
 static void intel_xorg_identify(int flags);
 static Bool intel_xorg_pci_probe(DriverPtr driver,
diff --git a/src/gallium/winsys/drm/i965/xorg/Makefile b/src/gallium/targets/xorg-i965/Makefile
similarity index 78%
rename from src/gallium/winsys/drm/i965/xorg/Makefile
rename to src/gallium/targets/xorg-i965/Makefile
index c25726b..8d6a741 100644
--- a/src/gallium/winsys/drm/i965/xorg/Makefile
+++ b/src/gallium/targets/xorg-i965/Makefile
@@ -1,23 +1,17 @@
-TOP        = ../../../../../..
-
-
-GALLIUMDIR = $(TOP)/src/gallium
+TOP = ../../../..
+include $(TOP)/configs/current
 
 TARGET     = i965g_drv.so
-
 CFILES     = $(wildcard ./*.c)
-
-include ${TOP}/configs/current
-
 OBJECTS    = $(patsubst ./%.c,./%.o,$(CFILES))
 
 CFLAGS = -DHAVE_CONFIG_H \
          -g -Wall -Wimplicit-function-declaration -fPIC \
          $(shell pkg-config --cflags pixman-1 xorg-server libdrm xproto) \
-         -I${GALLIUMDIR}/include \
-         -I${GALLIUMDIR}/drivers \
-         -I${GALLIUMDIR}/auxiliary \
-         -I${TOP}/src/mesa \
+         -I$(TOP)/src/gallium/include \
+         -I$(TOP)/src/gallium/drivers \
+         -I$(TOP)/src/gallium/auxiliary \
+         -I$(TOP)/src/mesa \
          -I$(TOP)/include \
          -I$(TOP)/src/egl/main
 
@@ -34,7 +28,7 @@ TARGET_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
 
 all default: $(TARGET) $(TARGET_STAGING)
 
-$(TARGET): $(OBJECTS) Makefile $(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a $(LIBS)
+$(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
 	$(TOP)/bin/mklib -noprefix -o $@ \
 	$(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_intel
 
diff --git a/src/gallium/winsys/drm/i965/xorg/intel_xorg.c b/src/gallium/targets/xorg-i965/intel_xorg.c
similarity index 98%
rename from src/gallium/winsys/drm/i965/xorg/intel_xorg.c
rename to src/gallium/targets/xorg-i965/intel_xorg.c
index ac691cb..f4608f0 100644
--- a/src/gallium/winsys/drm/i965/xorg/intel_xorg.c
+++ b/src/gallium/targets/xorg-i965/intel_xorg.c
@@ -28,7 +28,7 @@
  *
  */
 
-#include "../../../../state_trackers/xorg/xorg_winsys.h"
+#include "../../state_trackers/xorg/xorg_winsys.h"
 
 static void intel_xorg_identify(int flags);
 static Bool intel_xorg_pci_probe(DriverPtr driver,
diff --git a/src/gallium/winsys/drm/nouveau/xorg/Makefile b/src/gallium/targets/xorg-nouveau/Makefile
similarity index 96%
rename from src/gallium/winsys/drm/nouveau/xorg/Makefile
rename to src/gallium/targets/xorg-nouveau/Makefile
index f7f6fe1..d41de0b 100644
--- a/src/gallium/winsys/drm/nouveau/xorg/Makefile
+++ b/src/gallium/targets/xorg-nouveau/Makefile
@@ -1,13 +1,12 @@
+TOP = ../../../..
+include $(TOP)/configs/current
+
 TARGET     = modesetting_drv.so
 CFILES     = $(wildcard ./*.c)
 OBJECTS    = $(patsubst ./%.c,./%.o,$(CFILES))
-TOP        = ../../../../../..
-
-include $(TOP)/configs/current
 
 INCLUDES = \
 	$(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
-	-I../gem \
 	-I$(TOP)/src/gallium/include \
 	-I$(TOP)/src/gallium/drivers \
 	-I$(TOP)/src/gallium/auxiliary \
diff --git a/src/gallium/winsys/drm/nouveau/xorg/nouveau_xorg.c b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
similarity index 98%
rename from src/gallium/winsys/drm/nouveau/xorg/nouveau_xorg.c
rename to src/gallium/targets/xorg-nouveau/nouveau_xorg.c
index a669b30..699af09 100644
--- a/src/gallium/winsys/drm/nouveau/xorg/nouveau_xorg.c
+++ b/src/gallium/targets/xorg-nouveau/nouveau_xorg.c
@@ -28,7 +28,7 @@
  *
  */
 
-#include "../../../../state_trackers/xorg/xorg_winsys.h"
+#include "../../state_trackers/xorg/xorg_winsys.h"
 
 static void nouveau_xorg_identify(int flags);
 static Bool nouveau_xorg_pci_probe(DriverPtr driver, int entity_num,
diff --git a/src/gallium/winsys/drm/radeon/xorg/Makefile b/src/gallium/targets/xorg-radeon/Makefile
similarity index 73%
rename from src/gallium/winsys/drm/radeon/xorg/Makefile
rename to src/gallium/targets/xorg-radeon/Makefile
index 0eb1b39..9618d30 100644
--- a/src/gallium/winsys/drm/radeon/xorg/Makefile
+++ b/src/gallium/targets/xorg-radeon/Makefile
@@ -1,29 +1,23 @@
-TOP        = ../../../../../..
-
-
-GALLIUMDIR = $(TOP)/src/gallium
+TOP = ../../../..
+include $(TOP)/configs/current
 
 TARGET     = radeong_drv.so
-
 CFILES     = $(wildcard ./*.c)
-
-include ${TOP}/configs/current
-
 OBJECTS    = $(patsubst ./%.c,./%.o,$(CFILES))
 
 CFLAGS = -DHAVE_CONFIG_H \
          -g -Wall -Wimplicit-function-declaration -fPIC \
          $(shell pkg-config --cflags pixman-1 xorg-server libdrm xproto) \
-         -I${GALLIUMDIR}/include \
-         -I${GALLIUMDIR}/drivers \
-         -I${GALLIUMDIR}/auxiliary \
+         -I$(TOP)/src/gallium/include \
+         -I$(TOP)/src/gallium/drivers \
+         -I$(TOP)/src/gallium/auxiliary \
          -I${TOP}/src/mesa \
          -I$(TOP)/include \
          -I$(TOP)/src/egl/main
 
 LIBS = \
-	$(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a \
-	$(GALLIUMDIR)/winsys/drm/radeon/core/libradeonwinsys.a \
+	$(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a \
+	$(TOP)/src/gallium/winsys/drm/radeon/core/libradeonwinsys.a \
 	$(TOP)/src/gallium/drivers/r300/libr300.a \
 	$(TOP)/src/gallium/drivers/trace/libtrace.a \
 	$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
@@ -34,7 +28,7 @@ TARGET_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
 
 all default: $(TARGET) $(TARGET_STAGING)
 
-$(TARGET): $(OBJECTS) Makefile $(GALLIUMDIR)/state_trackers/xorg/libxorgtracker.a $(LIBS)
+$(TARGET): $(OBJECTS) Makefile $(TOP)/src/gallium/state_trackers/xorg/libxorgtracker.a $(LIBS)
 	$(TOP)/bin/mklib -noprefix -o $@ \
 	$(OBJECTS) $(LIBS) $(shell pkg-config --libs libdrm) -ldrm_radeon
 
diff --git a/src/gallium/winsys/drm/radeon/xorg/radeon_xorg.c b/src/gallium/targets/xorg-radeon/radeon_xorg.c
similarity index 98%
rename from src/gallium/winsys/drm/radeon/xorg/radeon_xorg.c
rename to src/gallium/targets/xorg-radeon/radeon_xorg.c
index bb76cc0..0d6aa56 100644
--- a/src/gallium/winsys/drm/radeon/xorg/radeon_xorg.c
+++ b/src/gallium/targets/xorg-radeon/radeon_xorg.c
@@ -29,7 +29,7 @@
  *
  */
 
-#include "../../../../state_trackers/xorg/xorg_winsys.h"
+#include "../../state_trackers/xorg/xorg_winsys.h"
 
 static void radeon_xorg_identify(int flags);
 static Bool radeon_xorg_pci_probe(DriverPtr driver,
diff --git a/src/gallium/winsys/drm/vmware/xorg/Makefile b/src/gallium/targets/xorg-vmwgfx/Makefile
similarity index 97%
rename from src/gallium/winsys/drm/vmware/xorg/Makefile
rename to src/gallium/targets/xorg-vmwgfx/Makefile
index 49e28ae..3691b88 100644
--- a/src/gallium/winsys/drm/vmware/xorg/Makefile
+++ b/src/gallium/targets/xorg-vmwgfx/Makefile
@@ -1,5 +1,4 @@
-TOP        = ../../../../../..
-
+TOP = ../../../..
 include $(TOP)/configs/current
 
 TARGET = vmwgfx_drv.so
diff --git a/src/gallium/winsys/drm/vmware/xorg/SConscript b/src/gallium/targets/xorg-vmwgfx/SConscript
similarity index 100%
rename from src/gallium/winsys/drm/vmware/xorg/SConscript
rename to src/gallium/targets/xorg-vmwgfx/SConscript
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_driver.h b/src/gallium/targets/xorg-vmwgfx/vmw_driver.h
similarity index 100%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_driver.h
rename to src/gallium/targets/xorg-vmwgfx/vmw_driver.h
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_hook.h b/src/gallium/targets/xorg-vmwgfx/vmw_hook.h
similarity index 100%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_hook.h
rename to src/gallium/targets/xorg-vmwgfx/vmw_hook.h
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_ioctl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
similarity index 99%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_ioctl.c
rename to src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
index 521578a..fe9c039 100644
--- a/src/gallium/winsys/drm/vmware/xorg/vmw_ioctl.c
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
@@ -42,7 +42,7 @@
 
 #include <sys/mman.h>
 #include "xf86drm.h"
-#include "../core/vmwgfx_drm.h"
+#include "../../winsys/drm/vmware/core/vmwgfx_drm.h"
 
 #include "vmw_driver.h"
 #include "util/u_debug.h"
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_screen.c b/src/gallium/targets/xorg-vmwgfx/vmw_screen.c
similarity index 100%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_screen.c
rename to src/gallium/targets/xorg-vmwgfx/vmw_screen.c
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
similarity index 99%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_video.c
rename to src/gallium/targets/xorg-vmwgfx/vmw_video.c
index de28f06..7909999 100644
--- a/src/gallium/winsys/drm/vmware/xorg/vmw_video.c
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_video.c
@@ -62,7 +62,7 @@ typedef uint8_t uint8;
 #include <X11/extensions/Xv.h>
 
 #include "xf86drm.h"
-#include "../core/vmwgfx_drm.h"
+#include "../../winsys/drm/vmware/core/vmwgfx_drm.h"
 
 #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
 
diff --git a/src/gallium/winsys/drm/vmware/xorg/vmw_xorg.c b/src/gallium/targets/xorg-vmwgfx/vmw_xorg.c
similarity index 100%
rename from src/gallium/winsys/drm/vmware/xorg/vmw_xorg.c
rename to src/gallium/targets/xorg-vmwgfx/vmw_xorg.c
diff --git a/src/gallium/winsys/drm/vmware/SConscript b/src/gallium/winsys/drm/vmware/SConscript
index e4da31a..eff87e7 100644
--- a/src/gallium/winsys/drm/vmware/SConscript
+++ b/src/gallium/winsys/drm/vmware/SConscript
@@ -1,7 +1,3 @@
 Import('*')
 
 SConscript(['core/SConscript',])
-
-if 'xorg' in env['statetrackers']:
-
-    SConscript(['xorg/SConscript'])




More information about the mesa-commit mailing list