summaryrefslogtreecommitdiff
path: root/linux-core/i915_buffer.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-09-22 13:34:33 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-09-22 13:57:13 +0200
commitda63f4ba0f15c3ae614eba92c8219670c674727e (patch)
tree9b77d3602d8008d060e44e6ab90f6ed1f1f6cd06 /linux-core/i915_buffer.c
parent24e33627c5dfb92324a9faf1c7d366e7f33e622a (diff)
Add fence error member.
Modify the TTM backend bind arguments. Export a number of functions needed for driver-specific super-ioctls. Add a function to map buffer objects from the kernel, regardless of where they're currently placed. A number of error fixes.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r--linux-core/i915_buffer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c
index bf500cc6..75763e71 100644
--- a/linux-core/i915_buffer.c
+++ b/linux-core/i915_buffer.c
@@ -38,7 +38,9 @@ struct drm_ttm_backend *i915_create_ttm_backend_entry(struct drm_device * dev)
return drm_agp_init_ttm(dev);
}
-int i915_fence_types(struct drm_buffer_object *bo, uint32_t * type)
+int i915_fence_types(struct drm_buffer_object *bo,
+ uint32_t * fclass,
+ uint32_t * type)
{
if (bo->mem.flags & (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE))
*type = 3;
@@ -71,6 +73,7 @@ int i915_init_mem_type(struct drm_device * dev, uint32_t type,
man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE |
_DRM_FLAG_MEMTYPE_CACHED;
man->drm_bus_maptype = 0;
+ man->gpu_offset = 0;
break;
case DRM_BO_MEM_TT:
if (!(drm_core_has_AGP(dev) && dev->agp)) {
@@ -84,6 +87,7 @@ int i915_init_mem_type(struct drm_device * dev, uint32_t type,
man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE |
_DRM_FLAG_MEMTYPE_CSELECT | _DRM_FLAG_NEEDS_IOREMAP;
man->drm_bus_maptype = _DRM_AGP;
+ man->gpu_offset = 0;
break;
case DRM_BO_MEM_PRIV0:
if (!(drm_core_has_AGP(dev) && dev->agp)) {
@@ -97,6 +101,7 @@ int i915_init_mem_type(struct drm_device * dev, uint32_t type,
man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE |
_DRM_FLAG_MEMTYPE_FIXED | _DRM_FLAG_NEEDS_IOREMAP;
man->drm_bus_maptype = _DRM_AGP;
+ man->gpu_offset = 0;
break;
default:
DRM_ERROR("Unsupported memory type %u\n", (unsigned)type);
@@ -196,7 +201,7 @@ static int i915_move_flip(struct drm_buffer_object * bo,
if (ret)
return ret;
- ret = drm_bind_ttm(bo->ttm, 1, tmp_mem.mm_node->start);
+ ret = drm_bind_ttm(bo->ttm, &tmp_mem);
if (ret)
goto out_cleanup;