From 43218a45a4cdbe2bc92867dc143f4b0e5fe9ca8d Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 24 Mar 2010 11:45:30 +0100 Subject: [PATCH] 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 ++++++++++ .../intel/xorg => targets/xorg-i915}/Makefile | 8 +++---- .../xorg => targets/xorg-i915}/intel_xorg.c | 2 +- .../i965/xorg => targets/xorg-i965}/Makefile | 20 ++++++----------- .../xorg => targets/xorg-i965}/intel_xorg.c | 2 +- .../xorg => targets/xorg-nouveau}/Makefile | 7 +++--- .../xorg-nouveau}/nouveau_xorg.c | 2 +- .../xorg => targets/xorg-radeon}/Makefile | 22 +++++++------------ .../xorg-radeon}/radeon_xorg.c | 2 +- .../xorg => targets/xorg-vmwgfx}/Makefile | 3 +-- .../xorg => targets/xorg-vmwgfx}/SConscript | 0 .../xorg => targets/xorg-vmwgfx}/vmw_driver.h | 0 .../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 +- .../xorg => targets/xorg-vmwgfx}/vmw_xorg.c | 0 src/gallium/winsys/drm/vmware/SConscript | 4 ---- 18 files changed, 41 insertions(+), 47 deletions(-) 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%) diff --git a/configure.ac b/configure.ac index dccff6f7cc4..c8f78dc74e8 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 14c2462524b..4442147e83f 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 369dc356cf8..08f3b088636 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 c25726b0bb1..8d6a741e5d1 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 ac691cb76b3..f4608f0eb41 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 f7f6fe17dd6..d41de0b3110 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 a669b3080aa..699af09029f 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 0eb1b3988f3..9618d30b4d6 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 bb76cc03499..0d6aa567229 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 49e28ae17f5..3691b883588 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 521578ab35d..fe9c0393e23 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 #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 de28f06a475..7909999edfb 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 #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 e4da31a6933..eff87e7d010 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']) -- 2.30.2