summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/Makefile.kernel3
-rw-r--r--linux-core/drm_agpsupport.c4
-rw-r--r--linux-core/i915_buffer.c40
-rw-r--r--linux-core/i915_drv.c8
4 files changed, 52 insertions, 3 deletions
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel
index bf5221d1..e571f29e 100644
--- a/linux-core/Makefile.kernel
+++ b/linux-core/Makefile.kernel
@@ -19,7 +19,8 @@ r128-objs := r128_drv.o r128_cce.o r128_state.o r128_irq.o
mga-objs := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
i810-objs := i810_drv.o i810_dma.o
i830-objs := i830_drv.o i830_dma.o i830_irq.o
-i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o
+i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \
+ i915_buffer.o
radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o
sis-objs := sis_drv.o sis_mm.o
ffb-objs := ffb_drv.o ffb_context.o
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index 92868005..e7226f1f 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -682,7 +682,7 @@ drm_ttm_backend_t *drm_agp_init_ttm_uncached(struct drm_device *dev) {
agp_be->destroy = drm_agp_destroy_ttm;
return agp_be;
}
-
+EXPORT_SYMBOL(drm_agp_init_ttm_uncached);
drm_ttm_backend_t *drm_agp_init_ttm_cached(struct drm_device *dev) {
@@ -715,6 +715,6 @@ drm_ttm_backend_t *drm_agp_init_ttm_cached(struct drm_device *dev) {
agp_be->destroy = drm_agp_destroy_ttm;
return agp_be;
}
-
+EXPORT_SYMBOL(drm_agp_init_ttm_cached);
#endif /* __OS_HAS_AGP */
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c
new file mode 100644
index 00000000..bedbd41c
--- /dev/null
+++ b/linux-core/i915_buffer.c
@@ -0,0 +1,40 @@
+/**************************************************************************
+ *
+ * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ *
+ **************************************************************************/
+/*
+ * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
+ */
+
+#include "drmP.h"
+
+drm_ttm_backend_t *i915_create_ttm_backend_entry(drm_device_t *dev, int cached)
+{
+ if (cached)
+ return drm_agp_init_ttm_cached(dev);
+ else
+ return drm_agp_init_ttm_uncached(dev);
+}
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 56ac5fc7..64ab3f50 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -48,6 +48,12 @@ static drm_fence_driver_t i915_fence_driver = {
.poke_flush = i915_poke_flush,
};
+static drm_bo_driver_t i915_bo_driver = {
+ .cached_pages = 1,
+ .create_ttm_backend_entry = i915_create_ttm_backend_entry
+};
+
+
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static struct drm_driver driver = {
/* don't use mtrr's here, the Xserver or user space app should
@@ -89,6 +95,8 @@ static struct drm_driver driver = {
},
.fence_driver = &i915_fence_driver,
+ .bo_driver = &i915_bo_driver,
+
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,