]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/imagination: Use cached memory with dma_coherent
authorMatt Coster <matt.coster@imgtec.com>
Thu, 10 Apr 2025 09:55:14 +0000 (10:55 +0100)
committerMatt Coster <matt.coster@imgtec.com>
Tue, 15 Apr 2025 11:21:52 +0000 (12:21 +0100)
commitf0a1ab65d90420f2817569bbf67111feb8e6821e
treeaf33c3353243dbb77a6af4430140d8ded64ba5e3
parent171f378d2a23db92d3443173f5fd7f25633ec39d
drm/imagination: Use cached memory with dma_coherent

The TI k3-j721s2 platform does not allow us to use uncached memory
(which is what the driver currently does) without disabling cache snooping
on the AXI ACE-Lite interface, which would be too much of a performance
hit.

Given the platform is dma-coherent, we can simply force all
device-accessible memory allocations through the CPU cache. In fact, this
can be done whenever the dma_coherent attribute is present.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-15-eda620c5865f@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
drivers/gpu/drm/imagination/pvr_gem.c
drivers/gpu/drm/imagination/pvr_gem.h
drivers/gpu/drm/imagination/pvr_mmu.c