From cf89fb8b731dd541bde16277c52264ba1e150424 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 8 Dec 2013 16:35:27 +0000 Subject: [PATCH] sna: Simplify kgem_bo_can_map() Remove the attempt to trick us into mapping large bo. Signed-off-by: Chris Wilson --- src/sna/kgem.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 14d7d68..d67f73f 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -668,10 +668,7 @@ static inline bool kgem_bo_can_map(struct kgem *kgem, struct kgem_bo *bo) if (kgem->gen == 021 && bo->tiling == I915_TILING_Y) return false; - if (!bo->presumed_offset) - return __kgem_bo_num_pages(bo) <= kgem->aperture_mappable / 4; - - return bo->presumed_offset / PAGE_SIZE + __kgem_bo_num_pages(bo) <= kgem->aperture_mappable; + return __kgem_bo_num_pages(bo) <= kgem->aperture_mappable / 4; } static inline bool kgem_bo_can_map__cpu(struct kgem *kgem, -- 2.7.4