linux-stable/include/drm
Ard Biesheuvel 0bcbfa51a7 drm: disable uncached DMA optimization for ARM and arm64
[ Upstream commit e02f5c1bb2 ]

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 <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: David Zhou <David1.Zhou@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Michel Daenzer <michel.daenzer@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Reported-by: Carsten Haitzler <Carsten.Haitzler@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.kernel.org/patch/10778815/
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:03:23 -07:00
..
bridge Merge airlied/drm-next into drm-misc-next 2017-07-26 13:43:33 +02:00
i2c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tinydrm drm/tinydrm: Generalize tinydrm_xrgb8888_to_gray8() 2017-08-09 17:55:50 +02:00
ttm drm/ttm: make ttm_mem_type_manager_func debug more useful 2017-08-17 15:45:59 -04:00
ati_pcigart.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_agpsupport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_atomic.h drm: Nuke drm_atomic_legacy_backoff 2017-08-08 14:49:29 +02:00
drm_atomic_helper.h drm: Nuke drm_atomic_helper_connector_dpms 2017-08-08 14:48:48 +02:00
drm_auth.h drm: Move drm_lock_data out of drmP.h 2017-03-09 16:18:02 +01:00
drm_blend.h drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_bridge.h drm/bridge: Add a devm_ allocator for panel bridge. 2017-07-26 12:19:47 -07:00
drm_cache.h drm: disable uncached DMA optimization for ARM and arm64 2019-03-13 14:03:23 -07:00
drm_color_mgmt.h drm: drm_color_mgmt.h needs struct drm_crtc declaration 2017-05-02 10:30:23 +02:00
drm_connector.h drm: Handle properties in the core for atomic drivers 2017-08-08 14:45:09 +02:00
drm_crtc.h drm: Handle properties in the core for atomic drivers 2017-08-08 14:45:09 +02:00
drm_crtc_helper.h drm: Allow determining if current task is output poll worker 2018-03-15 10:54:29 +01:00
drm_debugfs.h drm/debugfs: Add kerneldoc 2017-03-24 09:36:06 +01:00
drm_debugfs_crc.h
drm_device.h drm: Extract drm_device.h 2017-08-11 10:47:17 +02:00
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h drm: Add DP PSR2 sink enable bit 2018-08-03 07:50:42 +02:00
drm_dp_mst_helper.h drm/atomic: Make private objs proper objects 2017-07-13 19:28:43 +03:00
drm_drv.h drm/nouveau: prefer XBGR2101010 for addfb ioctl 2018-03-15 10:54:30 +01:00
drm_edid.h drm/edid: VSDB yCBCr420 Deep Color mode bit definitions 2018-11-10 07:48:35 -08:00
drm_encoder.h
drm_encoder_slave.h
drm_fb_cma_helper.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_fb_helper.h drm: remove unused and redundant callbacks 2017-08-07 11:20:36 +02:00
drm_file.h drm: introduce sync objects (v4) 2017-06-14 12:10:22 +10:00
drm_fixed.h
drm_flip_work.h
drm_fourcc.h drm: Add mode_config .get_format_info() hook 2017-03-22 19:45:00 +02:00
drm_framebuffer.h drm: Add GEM backed framebuffer library 2017-08-16 21:32:23 +02:00
drm_gem.h drm/gem: Add drm_gem_dumb_map_offset() 2017-07-29 13:49:55 +02:00
drm_gem_cma_helper.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_gem_framebuffer_helper.h drm: Add GEM backed framebuffer library 2017-08-16 21:32:23 +02:00
drm_global.h drm: drop extern from function decls 2017-03-24 09:36:06 +01:00
drm_hashtab.h drm: drop extern from function decls 2017-03-24 09:36:06 +01:00
drm_ioctl.h new helper: drm_ioctl_kernel() 2017-05-27 15:39:28 -04:00
drm_irq.h drm: Extract drm_vblank.[hc] 2017-06-01 08:02:14 +02:00
drm_legacy.h
drm_mipi_dsi.h
drm_mm.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
drm_mode_config.h drm: Create a format/modifier blob 2017-08-01 17:50:06 +01:00
drm_mode_object.h drm: Introduce drm_mode_object_{get,put}() 2017-02-28 16:14:55 +01:00
drm_modes.h drm: add helper functions for YCBCR420 handling 2017-07-14 21:23:54 +03:00
drm_modeset_helper.h
drm_modeset_helper_vtables.h drm: remove unused and redundant callbacks 2017-08-07 11:20:36 +02:00
drm_modeset_lock.h drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx 2017-04-05 09:26:45 +02:00
drm_of.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_os_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_panel.h drm: make drm_panel.h self-contained 2017-05-16 17:17:02 +02:00
drm_pci.h drm/pci: Deprecate drm_pci_init/exit completely 2017-06-20 10:41:03 +02:00
drm_pciids.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_plane.h drm: Handle properties in the core for atomic drivers 2017-08-08 14:45:09 +02:00
drm_plane_helper.h drm: Add acquire ctx parameter to ->plane_disable 2017-03-29 09:14:58 +02:00
drm_prime.h drm: Extract drm_vblank.[hc] 2017-06-01 08:02:14 +02:00
drm_print.h drm: drm_printer: add __printf validation 2017-02-26 21:43:08 +01:00
drm_property.h drm: rename, adjust and export drm_atomic_replace_property_blob 2017-07-14 15:53:06 +02:00
drm_rect.h drm/doc: move printf helpers out of drmP.h 2017-05-31 09:59:41 +02:00
drm_scdc_helper.h drm: Fix warning when building docs for scdc_helper 2017-07-31 14:24:14 +02:00
drm_simple_kms_helper.h drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
drm_syncobj.h drm/syncobj: Stop reusing the same struct file for all syncobj -> fd 2018-03-28 18:24:47 +02:00
drm_sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drm_vblank.h drm/vblank: Unexport drm_vblank_cleanup 2017-06-28 12:51:13 +02:00
drm_vma_manager.h drm: Extract drm_prime.h 2017-03-09 16:18:02 +01:00
drmP.h drm: Document device unplug infrastructure 2017-08-11 10:48:03 +02:00
gma_drm.h
i915_component.h
i915_drm.h
i915_pciids.h x86/gpu: add CFL to early quirks 2018-02-22 15:42:18 +01:00
intel-gtt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel_lpe_audio.h ALSA: x86: Register multiple PCM devices for the LPE audio card 2017-05-03 16:24:00 +03:00