From dd733dea3856e7ddbba7c4c3928ccaba909b4535 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 1 Feb 2007 13:19:05 +0100 Subject: Fix missing ttm_open_vma call from previous commit. Honour the ttm backend cant-use-aperture flag. --- linux-core/drm_ttm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-core/drm_ttm.c') diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index c17c41cb..f1e3ea40 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -162,7 +162,7 @@ int drm_destroy_ttm(drm_ttm_t * ttm) DRM_DEBUG("Destroying a ttm\n"); -#ifdef DRM_TTM_ODD_COMPAT +#ifdef DRM_ODD_MM_COMPAT BUG_ON(!list_empty(&ttm->vma_list)); BUG_ON(!list_empty(&ttm->p_mm_list)); #endif @@ -364,6 +364,7 @@ int drm_bind_ttm(drm_ttm_t * ttm, int cached, unsigned long aper_offset) ret = drm_ttm_populate(ttm); if (ret) return ret; + if (ttm->state == ttm_unbound && !cached) { ret = unmap_vma_pages(ttm); if (ret) -- cgit v1.2.3