summaryrefslogtreecommitdiff
path: root/linux-core/drm_agpsupport.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-10-05 12:11:43 +1000
committerDave Airlie <airlied@redhat.com>2007-10-05 12:11:43 +1000
commit19b7cc34443889fc73de2e10462e1c0f9fa38041 (patch)
tree1cd73a2ef2aaed132cbc766e4ad4a8d2e3dde4e6 /linux-core/drm_agpsupport.c
parentd351601899e5814d809b8e86ab6f0d6e7676f585 (diff)
parent495bbbaadc93c574eb98dd2ad64bdca4d91d4152 (diff)
Merge branch 'pre-superioctl-branch'
Diffstat (limited to 'linux-core/drm_agpsupport.c')
-rw-r--r--linux-core/drm_agpsupport.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index 4618823c..b68efc64 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -535,23 +535,23 @@ static int drm_agp_populate(struct drm_ttm_backend *backend, unsigned long num_p
}
static int drm_agp_bind_ttm(struct drm_ttm_backend *backend,
- unsigned long offset,
- int cached)
+ struct drm_bo_mem_reg *bo_mem)
{
- struct drm_agp_ttm_backend *agp_be =
+ struct drm_agp_ttm_backend *agp_be =
container_of(backend, struct drm_agp_ttm_backend, backend);
DRM_AGP_MEM *mem = agp_be->mem;
int ret;
DRM_DEBUG("drm_agp_bind_ttm\n");
mem->is_flushed = TRUE;
- mem->type = (cached) ? AGP_USER_CACHED_MEMORY :
+ mem->type = (bo_mem->flags & DRM_BO_FLAG_CACHED) ? AGP_USER_CACHED_MEMORY :
AGP_USER_MEMORY;
- ret = drm_agp_bind_memory(mem, offset);
+ ret = drm_agp_bind_memory(mem, bo_mem->mm_node->start);
if (ret) {
DRM_ERROR("AGP Bind memory failed\n");
}
- DRM_FLAG_MASKED(backend->flags, (cached) ? DRM_BE_FLAG_BOUND_CACHED : 0,
+ DRM_FLAG_MASKED(backend->flags, (bo_mem->flags & DRM_BO_FLAG_CACHED) ?
+ DRM_BE_FLAG_BOUND_CACHED : 0,
DRM_BE_FLAG_BOUND_CACHED);
return ret;
}
@@ -643,7 +643,8 @@ struct drm_ttm_backend *drm_agp_init_ttm(struct drm_device *dev)
agp_be->bridge = dev->agp->bridge;
agp_be->populated = FALSE;
agp_be->backend.func = &agp_ttm_backend;
- agp_be->backend.mem_type = DRM_BO_MEM_TT;
+ // agp_be->backend.mem_type = DRM_BO_MEM_TT;
+ agp_be->backend.dev = dev;
return &agp_be->backend;
}