[PATCH v1] drm/tegra: gem: Fix CPU-cache maintenance for BO's allocated using get_pages()

Thierry Reding thierry.reding at gmail.com
Thu Apr 18 10:00:48 UTC 2019


On Thu, Mar 07, 2019 at 01:55:19AM +0300, Dmitry Osipenko wrote:
> 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.
> 
> Cc: stable <stable at vger.kernel.org>
> Signed-off-by: Dmitry Osipenko <digetx at gmail.com>
> ---
>  drivers/gpu/drm/tegra/gem.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190418/6ac66233/attachment.sig>


More information about the dri-devel mailing list