From 2df2c70e20caa3d6d1a1ac12da6fe3cc0689d51f Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 18 Apr 2007 16:33:28 +0200 Subject: Simplify the ttm backend interface and the agp ttm backend. --- linux-core/drm_ttm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'linux-core/drm_ttm.c') diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index 25566340..31503c9c 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -154,7 +154,7 @@ int drm_destroy_ttm(drm_ttm_t * ttm) be = ttm->be; if (be) { - be->destroy(be); + be->func->destroy(be); ttm->be = NULL; } @@ -222,7 +222,7 @@ static int drm_ttm_populate(drm_ttm_t * ttm) if (!page) return -ENOMEM; } - be->populate(be, ttm->num_pages, ttm->pages); + be->func->populate(be, ttm->num_pages, ttm->pages); ttm->state = ttm_unbound; return 0; } @@ -281,7 +281,7 @@ void drm_ttm_evict(drm_ttm_t * ttm) int ret; if (ttm->state == ttm_bound) { - ret = be->unbind(be); + ret = be->func->unbind(be); BUG_ON(ret); } @@ -293,7 +293,7 @@ void drm_ttm_fixup_caching(drm_ttm_t * ttm) if (ttm->state == ttm_evicted) { drm_ttm_backend_t *be = ttm->be; - if (be->needs_ub_cache_adjust(be)) { + if (be->func->needs_ub_cache_adjust(be)) { drm_set_caching(ttm, 0); } ttm->state = ttm_unbound; @@ -329,7 +329,7 @@ int drm_bind_ttm(drm_ttm_t * ttm, int cached, unsigned long aper_offset) drm_set_caching(ttm, DRM_TTM_PAGE_UNCACHED); } - if ((ret = be->bind(be, aper_offset, cached))) { + if ((ret = be->func->bind(be, aper_offset, cached))) { ttm->state = ttm_evicted; DRM_ERROR("Couldn't bind backend.\n"); return ret; -- cgit v1.2.3