EXTRA_CFLAGS += -DHAVE_PAGE_AGP
endif
+ifeq ($(OS_HAS_GEM), 1)
+EXTRA_CFLAGS += -DOS_HAS_GEM=1
+endif
+
# Start with all modules turned off.
CONFIG_DRM_GAMMA := n
CONFIG_DRM_TDFX := n
CONFIG_DRM_I810 := m
endif
ifneq (,$(findstring i915,$(DRM_MODULES)))
+ifeq ($(OS_HAS_GEM), 1)
CONFIG_DRM_I915 := m
endif
+endif
GIT_REVISION := $(shell cd "$(DRMSRCDIR)" && git-describe --abbrev=17)
ifneq ($(GIT_REVISION),)
#define drm_core_ioremap_wc drm_core_ioremap
#endif
+#ifndef OS_HAS_GEM
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+#define OS_HAS_GEM 1
+#else
+#define OS_HAS_GEM 0
+#endif
+#endif
+
#endif
DRM_IOCTL_DEF(DRM_IOCTL_MM_INFO, drm_mm_info_ioctl, 0),
+#if OS_HAS_GEM
DRM_IOCTL_DEF(DRM_IOCTL_GEM_CLOSE, drm_gem_close_ioctl, 0),
DRM_IOCTL_DEF(DRM_IOCTL_GEM_FLINK, drm_gem_flink_ioctl, DRM_AUTH),
DRM_IOCTL_DEF(DRM_IOCTL_GEM_OPEN, drm_gem_open_ioctl, DRM_AUTH),
+#endif
};
#define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls )
*
*/
+#include <linux/version.h>
+
+#include "drmP.h"
+
+#if OS_HAS_GEM
+
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/mman.h>
#include <linux/pagemap.h>
-#include "drmP.h"
/** @file drm_gem.c
*
}
EXPORT_SYMBOL(drm_gem_object_handle_free);
+#else
+
+int drm_gem_init(struct drm_device *dev)
+{
+ return 0;
+}
+
+void drm_gem_open(struct drm_device *dev, struct drm_file *file_private)
+{
+
+}
+
+void
+drm_gem_release(struct drm_device *dev, struct drm_file *file_private)
+{
+
+}
+
+#endif