accel/ivpu: Make DMA allocations for MMU600 write combined
authorKarol Wachowski <karol.wachowski@linux.intel.com>
Sat, 28 Oct 2023 15:59:34 +0000 (17:59 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Tue, 31 Oct 2023 15:45:45 +0000 (16:45 +0100)
commit3bcc5209ba6af1019487b54b30fc226ecf79193d
tree330449d7aeaec40025b1d4300e3355f5735c38df
parente013aa9ab01b400cccc6c3e8b969b8e7f10bc6cb
accel/ivpu: Make DMA allocations for MMU600 write combined

Previously using dma_alloc_wc() API we created cache coherent
(mapped as write-back) mappings.

Because we disable MMU600 snooping it was required to do costly
page walk and cache flushes after each page table modification.

With write-combined buffers it's possible to do a single write memory
barrier to flush write-combined buffer to memory which simplifies the
driver and significantly reduce time of map/unmap operations.

Mapping time of 255 MB is reduced from 2.5 ms to 500 us.

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-7-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_mmu_context.c