Commit Graph
6 Commits
Author SHA1 Message Date
Ard Biesheuvel e02f5c1bb2 drm: disable uncached DMA optimization for ARM and arm64
The DRM driver stack is designed to work with cache coherent devices
only, but permits an optimization to be enabled in some cases, where
for some buffers, both the CPU and the GPU use uncached mappings,
removing the need for DMA snooping and allocation in the CPU caches.

The use of uncached GPU mappings relies on the correct implementation
of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
will use cached mappings nonetheless. On x86 platforms, this does not
seem to matter, as uncached CPU mappings will snoop the caches in any
case. However, on ARM and arm64, enabling this optimization on a
platform where NoSnoop is ignored results in loss of coherency, which
breaks correct operation of the device. Since we have no way of
detecting whether NoSnoop works or not, just disable this
optimization entirely for ARM and arm64.

Cc: Christian Koenig <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: David Zhou <[email protected]>
Cc: Huang Rui <[email protected]>
Cc: Junwei Zhang <[email protected]>
Cc: Michel Daenzer <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: amd-gfx list <[email protected]>
Cc: dri-devel <[email protected]>
Reported-by: Carsten Haitzler <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Link: https://patchwork.kernel.org/patch/10778815/
Signed-off-by: Christian König <[email protected]>
2019-02-06 19:32:30 +01:00
Chunming Zhou 82626363a2 drm: add func to get max iomem address v2
it will be used to check if the driver needs swiotlb
v2: Don't use inline, instead, move function to drm_memory.c (Michel Daenzer <[email protected]>)

Signed-off-by: Chunming Zhou <[email protected]>
Reviewed-by: Monk Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-02-13 11:57:59 -05:00
Gabriel Krisman Bertazi f9a87bd7d5 drm: Move drm_clflush prototypes to drm_cache header file
Continue to clean up drmP.h by moving the cache flushing functions into
it's own header file.

Compile-tested only

Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-01-10 11:17:01 +01:00
Huacai Chen 221004c66a drm: Loongson-3 doesn't fully support wc memory
Signed-off-by: Huacai Chen <[email protected]>
Cc: [email protected]
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
2016-04-22 10:24:11 +10:00
Dave Airlie 4b0e4e4af6 drm: add helper to check for wc memory support
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Oded Gabbay <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
2016-02-02 10:08:43 -05:00
Dave Airlie c9c97b8c75 drm/ttm: consolidate cache flushing code in one place.
This merges the TTM and drm cache flushing into one file in the
drm core.

Signed-off-by: Dave Airlie <[email protected]>
2009-08-27 09:53:47 +10:00