Dmitry Osipenko 61b51fb51c drm/tegra: gem: Fix CPU-cache maintenance for BO's allocated using get_pages()
The allocated pages need to be invalidated in CPU caches. On ARM32 the
DMA_BIDIRECTIONAL flag only ensures that data is written-back to DRAM and
the data stays in CPU cache lines. While the DMA_FROM_DEVICE flag ensures
that the corresponding CPU cache lines are getting invalidated and nothing
more, that's exactly what is needed for a newly allocated pages.

This fixes randomly failing rendercheck tests on Tegra30 using the
Opentegra driver for tests that use small-sized pixmaps (10x10 and less,
i.e. 1-2 memory pages) because apparently CPU reads out stale data from
caches and/or that data is getting evicted to DRAM at the time of HW job
execution.

Fixes: bd43c9f0fa1f ("drm/tegra: gem: Map pages via the DMA API")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-18 11:48:09 +02:00
..
2018-09-26 16:04:39 +02:00
2018-09-26 16:04:56 +02:00
2019-02-11 13:32:49 +10:00
2015-08-13 13:47:45 +02:00
2017-04-05 18:11:47 +02:00
2019-02-11 13:32:49 +10:00
2016-07-04 11:34:31 +02:00
2019-01-24 13:20:42 +01:00
2015-01-27 10:14:40 +01:00
2014-04-04 09:12:51 +02:00
2019-01-16 13:09:32 +01:00
2017-08-17 17:57:14 +02:00
2017-09-26 11:08:17 +02:00