Commit 66daec6b authored by Chris Wilson's avatar Chris Wilson

drm/i915/gtt: Control cache domain of dma_map_page() directly

We already maually control the CPU cache for our page table directories,
so we can tell the dma mapper to skip doing it as well.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180706122611.4142-2-chris@chris-wilson.co.uk
parent 58174eac
...@@ -564,6 +564,7 @@ static int __setup_page_dma(struct i915_address_space *vm, ...@@ -564,6 +564,7 @@ static int __setup_page_dma(struct i915_address_space *vm,
p->daddr = dma_map_page_attrs(vm->dma, p->daddr = dma_map_page_attrs(vm->dma,
p->page, 0, PAGE_SIZE, p->page, 0, PAGE_SIZE,
PCI_DMA_BIDIRECTIONAL, PCI_DMA_BIDIRECTIONAL,
DMA_ATTR_SKIP_CPU_SYNC |
DMA_ATTR_NO_WARN); DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, p->daddr))) { if (unlikely(dma_mapping_error(vm->dma, p->daddr))) {
vm_free_page(vm, p->page); vm_free_page(vm, p->page);
...@@ -648,6 +649,7 @@ setup_scratch_page(struct i915_address_space *vm, gfp_t gfp) ...@@ -648,6 +649,7 @@ setup_scratch_page(struct i915_address_space *vm, gfp_t gfp)
addr = dma_map_page_attrs(vm->dma, addr = dma_map_page_attrs(vm->dma,
page, 0, size, page, 0, size,
PCI_DMA_BIDIRECTIONAL, PCI_DMA_BIDIRECTIONAL,
DMA_ATTR_SKIP_CPU_SYNC |
DMA_ATTR_NO_WARN); DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, addr))) if (unlikely(dma_mapping_error(vm->dma, addr)))
goto free_page; goto free_page;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment