summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorVincent Whitchurch <vincent.whitchurch@axis.com>2022-09-27 14:21:15 +0300
committerMark Brown <broonie@kernel.org>2022-09-28 14:54:05 +0300
commit0c17ba73c08ff2690c1eff8df374b6709eed55ce (patch)
treeb0c60feb122a9b47c76ab367a0263860cfd70390 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentf25723dcef4a38f6a39e17afeabd1adf6402230e (diff)
downloadlinux-0c17ba73c08ff2690c1eff8df374b6709eed55ce.tar.xz
spi: Fix cache corruption due to DMA/PIO overlap
The SPI core DMA mapping support performs cache management once for the entire message and not between transfers, and this leads to cache corruption if a message has two or more RX transfers with both transfers targeting the same cache line, and the controller driver decides to handle one using DMA and the other using PIO (for example, because one is much larger than the other). Fix it by syncing before/after the actual transfers. This also means that we can skip the sync during the map/unmap of the message. Fixes: 99adef310f68 ("spi: Provide core support for DMA mapping transfers") Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Link: https://lore.kernel.org/r/20220927112117.77599-3-vincent.whitchurch@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions