radeon: Insist on libdrm being present to build.
authorEric Anholt <eric@anholt.net>
Fri, 14 Oct 2011 21:34:19 +0000 (14:34 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 28 Oct 2011 18:32:00 +0000 (11:32 -0700)
There's no sense in building a broken driver.  Previously, there was
the potential of building a DRI1-only driver that would work for DRI1
and fail on DRI2 because the newer libdrm code wasn't present.  Now
the radeon build system should be matching intel and nouveau.

configs/autoconf.in
configure.ac
src/mesa/drivers/dri/r200/Makefile
src/mesa/drivers/dri/radeon/Makefile
src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h

index 96fe5da87732b845872a943f51035b37705896ec..3d4c749cf4bc2be6f2612e6b658e82896b1ab52a 100644 (file)
@@ -25,7 +25,7 @@ CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@
 LDFLAGS = @LDFLAGS@
 EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
 RADEON_CFLAGS = @RADEON_CFLAGS@
-RADEON_LDFLAGS = @RADEON_LDFLAGS@
+RADEON_LIBS = @RADEON_LIBS@
 NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@
 NOUVEAU_LIBS = @NOUVEAU_LIBS@
 INTEL_LIBS = @INTEL_LIBS@
index ab3ba25e9379723ea4eeffe9717633de927aab71..29da959e229c338b31baa290be2d5f607d96aeea 100644 (file)
@@ -1277,19 +1277,9 @@ esac
 
 case $DRI_DIRS in
 *radeon*|*r200*)
-    PKG_CHECK_MODULES([LIBDRM_RADEON],
-                     [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED],
-                     HAVE_LIBDRM_RADEON=yes,
-                     HAVE_LIBDRM_RADEON=no)
-
-    if test "x$HAVE_LIBDRM_RADEON" = xyes; then
-       RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
-       RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
-    fi
+    PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
     ;;
 esac
-AC_SUBST([RADEON_CFLAGS])
-AC_SUBST([RADEON_LDFLAGS])
 
 
 dnl
index dc32d4e4e49c81afb9bcd0c4f4314e89f1d5bc63..dc857b86a8b1abb0b4449a31bc4887ff0ed83bb7 100644 (file)
@@ -52,7 +52,7 @@ X86_SOURCES =
 DRIVER_DEFINES = -DRADEON_R200
 
 INCLUDES += $(RADEON_CFLAGS)
-DRI_LIB_DEPS += $(RADEON_LDFLAGS)
+DRI_LIB_DEPS += $(RADEON_LIBS)
 
 ##### TARGETS #####
 
index 371bc731a6f189c2c1f3d7e426900d771b8584ab..1aaa17cf3d74d3ad203970510c493e7a5e1be83b 100644 (file)
@@ -8,7 +8,7 @@ LIBNAME = radeon_dri.so
 
 include ../Makefile.defines
 
-ifeq ($(RADEON_LDFLAGS),)
+ifeq ($(RADEON_LIBS),)
 CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
 endif
 
@@ -50,7 +50,7 @@ C_SOURCES = \
 DRIVER_DEFINES = -DRADEON_R100
 
 INCLUDES += $(RADEON_CFLAGS)
-DRI_LIB_DEPS += $(RADEON_LDFLAGS)
+DRI_LIB_DEPS += $(RADEON_LIBS)
 
 X86_SOURCES = 
 
index 1ab756572017ef748415779c279bd93a26344edf..ef688b8ddfa4a710949d98c6e77ee15d8e4d6f56 100644 (file)
@@ -5,104 +5,9 @@
 #include "../radeon/radeon_bo_drm.h"
 #include "../radeon/radeon_cs_drm.h"
 
-#ifdef HAVE_LIBDRM_RADEON
-
 #include "radeon_bo.h"
 #include "radeon_bo_gem.h"
 #include "radeon_cs.h"
 #include "radeon_cs_gem.h"
 
-#else
-#include <stdint.h>
-
-#define RADEON_GEM_DOMAIN_CPU 0x1   // Cached CPU domain
-#define RADEON_GEM_DOMAIN_GTT 0x2   // GTT or cache flushed
-#define RADEON_GEM_DOMAIN_VRAM 0x4  // VRAM domain
-
-#define RADEON_TILING_MACRO 0x1
-#define RADEON_TILING_MICRO 0x2
-#define RADEON_TILING_SWAP 0x4
-
-#ifndef RADEON_TILING_SURFACE
-#define RADEON_TILING_SURFACE 0x8 /* this object requires a surface
-                                  * when mapped - i.e. front buffer */
-#endif
-
-#ifndef DRM_RADEON_GEM_INFO
-#define DRM_RADEON_GEM_INFO 0x1c
-
-struct drm_radeon_gem_info {
-        uint64_t gart_size;
-        uint64_t vram_size;
-        uint64_t vram_visible;
-};
-
-struct drm_radeon_info {
-       uint32_t request;
-       uint32_t pad;
-       uint32_t value;
-};
-#endif
-
-#ifndef RADEON_PARAM_DEVICE_ID
-#define RADEON_PARAM_DEVICE_ID 16
-#endif
-
-#ifndef RADEON_PARAM_NUM_Z_PIPES
-#define RADEON_PARAM_NUM_Z_PIPES 17
-#endif
-
-#ifndef RADEON_INFO_DEVICE_ID
-#define RADEON_INFO_DEVICE_ID 0
-#endif
-#ifndef RADEON_INFO_NUM_GB_PIPES
-#define RADEON_INFO_NUM_GB_PIPES 0
-#endif
-
-#ifndef RADEON_INFO_NUM_Z_PIPES
-#define RADEON_INFO_NUM_Z_PIPES 0
-#endif
-
-#ifndef DRM_RADEON_INFO
-#define DRM_RADEON_INFO 0x1
-#endif
-
-static inline void radeon_gem_get_kernel_name(struct radeon_bo *dummy, uint32_t *value)
-{
-}
-
-static inline uint32_t radeon_gem_name_bo(struct radeon_bo *dummy)
-{
-  return 0;
-}
-
-static inline void *radeon_bo_manager_gem_ctor(int fd)
-{
-  fprintf(stderr, "[%s:%u] Mesa built without Radeon libdrm support.\n",
-         __func__, __LINE__);
-
-  return NULL;
-}
-
-static inline void radeon_bo_manager_gem_dtor(void *dummy)
-{
-}
-
-static inline void *radeon_cs_manager_gem_ctor(int fd)
-{
-  fprintf(stderr, "[%s:%u] Mesa built without Radeon libdrm support.\n",
-         __func__, __LINE__);
-
-  return NULL;
-}
-
-static inline void radeon_cs_manager_gem_dtor(void *dummy)
-{
-}
-
-static inline void radeon_tracker_print(void *ptr, int io)
-{
-}
-#endif
-
 #endif