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_vm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'linux-core/drm_vm.c') diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index b11e09f8..63cf6f56 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -222,11 +222,8 @@ struct page *drm_vm_ttm_fault(struct vm_area_struct *vma, #endif } - if (ttm->page_flags & DRM_TTM_PAGE_UNCACHED) { - - /* - * FIXME: Check can't map aperture flag. - */ + if ((ttm->page_flags & DRM_TTM_PAGE_UNCACHED) && + !(ttm->be->flags & DRM_BE_FLAG_CMA)) { pfn = ttm->aper_offset + page_offset + (ttm->be->aperture_base >> PAGE_SHIFT); @@ -845,6 +842,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) #ifdef DRM_ODD_MM_COMPAT drm_ttm_map_bound(vma); #endif + drm_vm_ttm_open_locked(vma); return 0; } default: -- cgit v1.2.3