summaryrefslogtreecommitdiff
path: root/linux-core/drm_ttm.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2007-10-16 15:28:33 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2007-10-16 15:28:33 +0100
commit90bfc8e611cb0c72ee03dce47027b50d2cc614b1 (patch)
tree3fdcec3cf166b6fc4f5a6aeb8e46b277bd49a8bf /linux-core/drm_ttm.c
parent2b07b0a45d32a9ffb7f6b9bb1b8f6f8e615524cb (diff)
parentdb1709f2f3f8cab2477fb149b58420de4db65654 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts: linux-core/drm_bo.c linux-core/drm_objects.h shared-core/i915_dma.c shared-core/i915_drv.h
Diffstat (limited to 'linux-core/drm_ttm.c')
-rw-r--r--linux-core/drm_ttm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c
index 60c64cba..33bbe1d4 100644
--- a/linux-core/drm_ttm.c
+++ b/linux-core/drm_ttm.c
@@ -35,11 +35,12 @@ static void drm_ttm_ipi_handler(void *null)
flush_agp_cache();
}
-static void drm_ttm_cache_flush(void)
+void drm_ttm_cache_flush(void)
{
if (on_each_cpu(drm_ttm_ipi_handler, NULL, 1, 1) != 0)
DRM_ERROR("Timed out waiting for drm cache flush.\n");
}
+EXPORT_SYMBOL(drm_ttm_cache_flush);
/*
* Use kmalloc if possible. Otherwise fall back to vmalloc.
@@ -207,7 +208,7 @@ struct page *drm_ttm_get_page(struct drm_ttm * ttm, int index)
return p;
}
-static int drm_ttm_populate(struct drm_ttm * ttm)
+int drm_ttm_populate(struct drm_ttm * ttm)
{
struct page *page;
unsigned long i;
@@ -308,7 +309,7 @@ void drm_ttm_unbind(struct drm_ttm * ttm)
drm_ttm_fixup_caching(ttm);
}
-int drm_bind_ttm(struct drm_ttm * ttm, int cached, unsigned long aper_offset)
+int drm_bind_ttm(struct drm_ttm * ttm, struct drm_bo_mem_reg *bo_mem)
{
int ret = 0;
@@ -325,17 +326,16 @@ int drm_bind_ttm(struct drm_ttm * ttm, int cached, unsigned long aper_offset)
if (ret)
return ret;
- if (ttm->state == ttm_unbound && !cached) {
+ if (ttm->state == ttm_unbound && !(bo_mem->flags & DRM_BO_FLAG_CACHED)) {
drm_set_caching(ttm, DRM_TTM_PAGE_UNCACHED);
}
- if ((ret = be->func->bind(be, aper_offset, cached))) {
+ if ((ret = be->func->bind(be, bo_mem))) {
ttm->state = ttm_evicted;
DRM_ERROR("Couldn't bind backend.\n");
return ret;
}
- ttm->aper_offset = aper_offset;
ttm->state = ttm_bound;
return 0;