• Ard Biesheuvel's avatar
    drm: disable uncached DMA optimization for ARM and arm64 · e3f5c3cb
    Ard Biesheuvel authored
    [ Upstream commit e02f5c1b ]
    
    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: 's avatarCarsten Haitzler <Carsten.Haitzler@arm.com>
    Signed-off-by: 's avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Reviewed-by: 's avatarChristian König <christian.koenig@amd.com>
    Reviewed-by: 's avatarAlex Deucher <alexander.deucher@amd.com>
    Link: https://patchwork.kernel.org/patch/10778815/Signed-off-by: 's avatarChristian König <christian.koenig@amd.com>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    e3f5c3cb
Name
Last commit
Last update
..
bridge Loading commit data...
i2c Loading commit data...
tinydrm Loading commit data...
ttm Loading commit data...
amd_asic_type.h Loading commit data...
ati_pcigart.h Loading commit data...
drmP.h Loading commit data...
drm_agpsupport.h Loading commit data...
drm_atomic.h Loading commit data...
drm_atomic_helper.h Loading commit data...
drm_atomic_state_helper.h Loading commit data...
drm_atomic_uapi.h Loading commit data...
drm_audio_component.h Loading commit data...
drm_auth.h Loading commit data...
drm_blend.h Loading commit data...
drm_bridge.h Loading commit data...
drm_cache.h Loading commit data...
drm_client.h Loading commit data...
drm_color_mgmt.h Loading commit data...
drm_connector.h Loading commit data...
drm_crtc.h Loading commit data...
drm_crtc_helper.h Loading commit data...
drm_damage_helper.h Loading commit data...
drm_debugfs.h Loading commit data...
drm_debugfs_crc.h Loading commit data...
drm_device.h Loading commit data...
drm_displayid.h Loading commit data...
drm_dp_dual_mode_helper.h Loading commit data...
drm_dp_helper.h Loading commit data...
drm_dp_mst_helper.h Loading commit data...
drm_drv.h Loading commit data...
drm_dsc.h Loading commit data...
drm_edid.h Loading commit data...
drm_encoder.h Loading commit data...
drm_encoder_slave.h Loading commit data...
drm_fb_cma_helper.h Loading commit data...
drm_fb_helper.h Loading commit data...
drm_file.h Loading commit data...
drm_fixed.h Loading commit data...
drm_flip_work.h Loading commit data...
drm_fourcc.h Loading commit data...
drm_framebuffer.h Loading commit data...
drm_gem.h Loading commit data...
drm_gem_cma_helper.h Loading commit data...
drm_gem_framebuffer_helper.h Loading commit data...
drm_hashtab.h Loading commit data...
drm_hdcp.h Loading commit data...
drm_ioctl.h Loading commit data...
drm_irq.h Loading commit data...
drm_lease.h Loading commit data...
drm_legacy.h Loading commit data...
drm_mipi_dsi.h Loading commit data...
drm_mm.h Loading commit data...
drm_mode_config.h Loading commit data...
drm_mode_object.h Loading commit data...
drm_modes.h Loading commit data...
drm_modeset_helper.h Loading commit data...
drm_modeset_helper_vtables.h Loading commit data...
drm_modeset_lock.h Loading commit data...
drm_of.h Loading commit data...
drm_os_linux.h Loading commit data...
drm_panel.h Loading commit data...
drm_pci.h Loading commit data...
drm_pciids.h Loading commit data...
drm_plane.h Loading commit data...
drm_plane_helper.h Loading commit data...
drm_prime.h Loading commit data...
drm_print.h Loading commit data...
drm_property.h Loading commit data...
drm_rect.h Loading commit data...
drm_scdc_helper.h Loading commit data...
drm_simple_kms_helper.h Loading commit data...
drm_syncobj.h Loading commit data...
drm_sysfs.h Loading commit data...
drm_util.h Loading commit data...
drm_utils.h Loading commit data...
drm_vblank.h Loading commit data...
drm_vma_manager.h Loading commit data...
drm_writeback.h Loading commit data...
gma_drm.h Loading commit data...
gpu_scheduler.h Loading commit data...
i915_component.h Loading commit data...
i915_drm.h Loading commit data...
i915_pciids.h Loading commit data...
intel-gtt.h Loading commit data...
intel_lpe_audio.h Loading commit data...
spsc_queue.h Loading commit data...