drm/nouveau: Use write-combined maps for coherent
On Tegra devices, uncached maps traslate to device memory, causing unaligned accesses by userspace resulting in a SIGBUS. Instead, use write-combined maps to ensure proper access. It was also determined that discrete cards should also use write-combined maps for coherent. Thus this change is made for all gpu types. Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com> Co-developed-by: Aaron Kling <webgeek1234@gmail.com> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
This commit is contained in:
1 parent
c11c7e2e06
commit
da5e6625ff
1 file changed
+1
-3
@@ -72,9 +72,7 @@ nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo, uint32_t page_flags)
|
||||
struct nouveau_sgdma_be *nvbe;
|
||||
enum ttm_caching caching;
|
||||
|
||||
if (nvbo->force_coherent)
|
||||
caching = ttm_uncached;
|
||||
else if (drm->agp.bridge)
|
||||
if (nvbo->force_coherent || drm->agp.bridge)
|
||||
caching = ttm_write_combined;
|
||||
else
|
||||
caching = ttm_cached;
|
||||
|
||||
Reference in new issue
Block a user