[PATCH v3 3/3] drm/vgem: use normal cached mmap'ings
Eric Anholt
eric at anholt.net
Tue Jul 16 23:39:11 UTC 2019
Rob Clark <robdclark at gmail.com> writes:
> From: Rob Clark <robdclark at chromium.org>
>
> Since there is no real device associated with VGEM, it is impossible to
> end up with appropriate dev->dma_ops, meaning that we have no way to
> invalidate the shmem pages allocated by VGEM. So, at least on platforms
> without drm_cflush_pages(), we end up with corruption when cache lines
> from previous usage of VGEM bo pages get evicted to memory.
>
> The only sane option is to use cached mappings.
This may be an improvement, but...
pin/unpin is only on attaching/closing the dma-buf, right? So, great,
you flushed the cached map once after exporting the vgem dma-buf to the
actual GPU device, but from then on you still have no interface for
getting coherent access through VGEM's mapping again, which still
exists.
I feel like this is papering over something that's really just broken,
and we should stop providing VGEM just because someone wants to write
dma-buf test code without driver-specific BO alloc ioctl code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190716/8692fff1/attachment-0001.sig>
More information about the dri-devel
mailing list