From 5dff04e9f78ce016c25e407e408e108a1ceb9830 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 6 Jun 2014 08:15:20 +0200 Subject: [PATCH] drm/i915: clflush ppgtt ptes on baytrail We need it like on cherryview apparently. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79670 Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index f3e23e15c46d..ec0273a0cfad 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -943,6 +943,8 @@ static void gen6_ppgtt_clear_range(struct i915_address_space *vm, for (i = first_pte; i < last_pte; i++) pt_vaddr[i] = scratch_pte; + if (!HAS_LLC(ppgtt->base.dev)) + drm_clflush_virt_range(pt_vaddr, PAGE_SIZE); kunmap_atomic(pt_vaddr); num_entries -= last_pte - first_pte; @@ -973,14 +975,19 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, vm->pte_encode(sg_page_iter_dma_address(&sg_iter), cache_level, true); if (++act_pte == I915_PPGTT_PT_ENTRIES) { + if (!HAS_LLC(ppgtt->base.dev)) + drm_clflush_virt_range(pt_vaddr, PAGE_SIZE); kunmap_atomic(pt_vaddr); pt_vaddr = NULL; act_pt++; act_pte = 0; } } - if (pt_vaddr) + if (pt_vaddr) { + if (!HAS_LLC(ppgtt->base.dev)) + drm_clflush_virt_range(pt_vaddr, PAGE_SIZE); kunmap_atomic(pt_vaddr); + } } static void gen6_ppgtt_unmap_pages(struct i915_hw_ppgtt *ppgtt) -- 2.0.0