summaryrefslogtreecommitdiff
path: root/linux-core/drm_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-10-30 17:51:59 +1000
committerDave Airlie <airlied@optimus.(none)>2007-10-30 17:52:13 +1000
commit50dec29c800a6e980a01be38190e44a0ba7916b5 (patch)
tree5cf8c466b9497a9176b718452480ad4ecb4d4ec5 /linux-core/drm_ttm.c
parentff5889f8316e0c16112f114c1c8f57645b8dc54f (diff)
drm/i915: add driver cache flush entry point
Use clflush on Intel hardware to flush cached objects.
Diffstat (limited to 'linux-core/drm_ttm.c')
-rw-r--r--linux-core/drm_ttm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c
index 33bbe1d4..df9e7e44 100644
--- a/linux-core/drm_ttm.c
+++ b/linux-core/drm_ttm.c
@@ -207,6 +207,7 @@ struct page *drm_ttm_get_page(struct drm_ttm * ttm, int index)
}
return p;
}
+EXPORT_SYMBOL(drm_ttm_get_page);
int drm_ttm_populate(struct drm_ttm * ttm)
{
@@ -311,7 +312,7 @@ void drm_ttm_unbind(struct drm_ttm * ttm)
int drm_bind_ttm(struct drm_ttm * ttm, struct drm_bo_mem_reg *bo_mem)
{
-
+ struct drm_bo_driver *bo_driver = ttm->dev->driver->bo_driver;
int ret = 0;
struct drm_ttm_backend *be;
@@ -328,7 +329,9 @@ int drm_bind_ttm(struct drm_ttm * ttm, struct drm_bo_mem_reg *bo_mem)
if (ttm->state == ttm_unbound && !(bo_mem->flags & DRM_BO_FLAG_CACHED)) {
drm_set_caching(ttm, DRM_TTM_PAGE_UNCACHED);
- }
+ } else if ((bo_mem->flags & DRM_BO_FLAG_CACHED) &&
+ bo_driver->ttm_cache_flush)
+ bo_driver->ttm_cache_flush(ttm);
if ((ret = be->func->bind(be, bo_mem))) {
ttm->state = ttm_evicted;