diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-15 10:32:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-16 22:15:39 +0000 |
commit | 3771387ad11b5842a83e58a4b373c2acdd827bd2 (patch) | |
tree | 59da2bf679d2cae00ebdd6d720fab2a835b39649 | |
parent | edbeab8c4edf9e0e89d85add485fe659795b6350 (diff) |
Compile out UXA if so desired
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | src/Makefile.am | 14 | ||||
-rw-r--r-- | src/i915_video.c | 1 | ||||
-rw-r--r-- | src/intel.h | 3 | ||||
-rw-r--r-- | src/intel_batchbuffer.c | 2 | ||||
-rw-r--r-- | src/intel_dri.c | 2 | ||||
-rw-r--r-- | src/intel_driver.c | 1 | ||||
-rw-r--r-- | src/intel_module.c | 8 | ||||
-rw-r--r-- | src/intel_uxa.c | 2 |
10 files changed, 43 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index 29c04fde..48c3477f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,13 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -SUBDIRS = uxa src man +SUBDIRS = man + +if UXA +SUBDIRS += uxa +endif + +SUBDIRS += src MAINTAINERCLEANFILES = ChangeLog INSTALL if HAVE_X11 diff --git a/configure.ac b/configure.ac index 831f6b30..2c407607 100644 --- a/configure.ac +++ b/configure.ac @@ -120,14 +120,13 @@ AC_ARG_ENABLE(kms-only, AS_HELP_STRING([--enable-kms-only], [KMS_ONLY="$enableval"], [KMS_ONLY=no]) +AC_MSG_CHECKING([whether to include SNA support]) AC_ARG_ENABLE(sna, AS_HELP_STRING([--enable-sna], [Enable SandyBridge's New Acceleration (SNA) [default=no]]), [SNA="$enableval"], [SNA=no]) AM_CONDITIONAL(SNA, test x$SNA != xno) -AC_MSG_CHECKING([whether to include SNA support]) - required_xorg_xserver_version=1.6 required_pixman_version=0.16 if test "x$SNA" != "xno"; then @@ -137,6 +136,17 @@ if test "x$SNA" != "xno"; then fi AC_MSG_RESULT([$SNA]) +AC_MSG_CHECKING([whether to include UXA support]) +AC_ARG_ENABLE(uxa, + AS_HELP_STRING([--enable-uxa], + [Enable Unified Acceleration Architecture (UXA) [default=yes]]), + [UXA="$enableval"], + [UXA=yes]) +AM_CONDITIONAL(UXA, test x$UXA != xno) +if test "x$UXA" != "xno"; then + AC_DEFINE(USE_UXA, 1, [Enable UXA support]) +fi +AC_MSG_RESULT([$UXA]) AC_ARG_ENABLE(vmap, AS_HELP_STRING([--enable-vmap], diff --git a/src/Makefile.am b/src/Makefile.am index cd1bb36e..e5097daf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,13 +27,12 @@ SUBDIRS = xvmc render_program legacy # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @UDEV_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \ - @PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa -I$(top_srcdir)/src/render_program + @PCIACCESS_CFLAGS@ intel_drv_la_LTLIBRARIES = intel_drv.la intel_drv_la_LDFLAGS = -module -avoid-version intel_drv_ladir = @moduledir@/drivers -intel_drv_la_LIBADD = @UDEV_LIBS@ -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la legacy/liblegacy.la -intel_drv_la_LIBADD += @PCIACCESS_LIBS@ +intel_drv_la_LIBADD = legacy/liblegacy.la @PCIACCESS_LIBS@ if SNA SUBDIRS += sna @@ -43,11 +42,17 @@ endif NULL:=# intel_drv_la_SOURCES = \ + intel_module.c \ + $(NULL) + +if UXA +AM_CFLAGS += -I$(top_srcdir)/uxa -I$(top_srcdir)/src/render_program +intel_drv_la_LIBADD += @UDEV_LIBS@ @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la +intel_drv_la_SOURCES += \ brw_defines.h \ brw_structs.h \ common.h \ intel.h \ - intel_module.c \ intel_batchbuffer.c \ intel_batchbuffer.h \ intel_display.c \ @@ -87,3 +92,4 @@ intel_drv_la_SOURCES += \ intel_hwmc.c \ $(NULL) endif +endif diff --git a/src/i915_video.c b/src/i915_video.c index d46c6d15..c73615e6 100644 --- a/src/i915_video.c +++ b/src/i915_video.c @@ -33,6 +33,7 @@ #include "xf86_OSproc.h" #include "xf86xv.h" #include "fourcc.h" +#include "gcstruct.h" #include "intel.h" #include "intel_video.h" diff --git a/src/intel.h b/src/intel.h index ed95063e..1a002e2c 100644 --- a/src/intel.h +++ b/src/intel.h @@ -75,7 +75,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <libudev.h> #endif -#include "uxa.h" /* XXX * The X server gained an *almost* identical implementation in 1.9. * @@ -316,7 +315,7 @@ typedef struct intel_screen_private { void (*batch_flush) (struct intel_screen_private *intel); void (*batch_commit_notify) (struct intel_screen_private *intel); - uxa_driver_t *uxa_driver; + struct _UxaDriver *uxa_driver; Bool need_sync; int accel_pixmap_offset_alignment; int accel_max_x; diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c index 89a99692..2b8fbb6e 100644 --- a/src/intel_batchbuffer.c +++ b/src/intel_batchbuffer.c @@ -40,6 +40,8 @@ #include "i915_drm.h" #include "i965_reg.h" +#include "uxa.h" + #define DUMP_BATCHBUFFERS NULL // "/tmp/i915-batchbuffers.dump" static void intel_end_vertex(intel_screen_private *intel) diff --git a/src/intel_dri.c b/src/intel_dri.c index 1227dbb0..135ba4e1 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -56,8 +56,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "windowstr.h" #include "shadow.h" - #include "xaarop.h" +#include "fb.h" #include "intel.h" #include "i830_reg.h" diff --git a/src/intel_driver.c b/src/intel_driver.c index f3858194..188c5125 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -70,6 +70,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include "legacy/legacy.h" +#include "uxa.h" #include <sys/ioctl.h> #include "i915_drm.h" diff --git a/src/intel_module.c b/src/intel_module.c index 3a0ecc9a..80b5da88 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -346,8 +346,10 @@ static Bool intel_pci_probe(DriverPtr driver, default: #if USE_SNA sna_init_scrn(scrn, entity_num); -#else +#elif USE_UXA intel_init_scrn(scrn); +#else + scrn = NULL; #endif break; } @@ -387,8 +389,10 @@ intel_available_options(int chipid, int busid) default: #if USE_SNA return sna_available_options(chipid, busid); -#else +#elif USE_UXA return intel_uxa_available_options(chipid, busid); +#else + return NULL; #endif } } diff --git a/src/intel_uxa.c b/src/intel_uxa.c index 8c6f7546..94dfb86f 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -40,6 +40,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <string.h> #include <errno.h> +#include "uxa.h" + static const int I830CopyROP[16] = { ROP_0, /* GXclear */ ROP_DSa, /* GXand */ |