OpenCloudOS-Kernel/drivers/gpu/drm/v3d
Thomas Zimmermann 0cf2ef46c6 drm/shmem-helper: Use cached mappings by default
SHMEM-buffer backing storage is allocated from system memory; which is
typically cachable. The default mode for SHMEM objects is writecombine
though.

Unify SHMEM semantics by defaulting to cached mappings. The exception
is pages imported via dma-buf. DMA memory is usually not cached.

DRM drivers that require write-combined mappings set the map_wc flag
in struct drm_gem_shmem_object to true. This currently affects lima,
panfrost and v3d.

The drivers mgag200, udl, virtio and vkms continue to use default
shmem mappings.

The drivers cirrus and gm12u320 change caching flags. Both used
writecombine and now switch over to shmem defaults. Both drivers use
SHMEM objects as shadow buffers for internal video memory, so cached
mappings will not affect them negatively.

v3:
	* set value of shmem pointer before dereferencing it in
	  __drm_gem_shmem_create() (Dan, kernel test robot)
v2:
	* recreate patch on top of latest SHMEM helpers
	* update lima, panfrost, v3d to select writecombine (Daniel, Rob)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117133156.26822-2-tzimmermann@suse.de
2020-11-24 09:10:21 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
v3d_bo.c drm/shmem-helper: Use cached mappings by default 2020-11-24 09:10:21 +01:00
v3d_debugfs.c drm/v3d: Delete v3d_dev->dev 2020-04-28 15:15:52 +02:00
v3d_drv.c drm/v3d/v3d_drv: Remove unused static variable 'v3d_v3d_pm_ops' 2020-11-17 20:22:43 +01:00
v3d_drv.h drm/v3d: Delete v3d_dev->pdev 2020-04-28 15:15:59 +02:00
v3d_fence.c drm/v3d: Add support for compute shader dispatch. 2019-04-18 09:54:10 -07:00
v3d_gem.c drm/v3d/v3d_gem: Provide descriptions for 'v3d_lookup_bos's params 2020-11-17 20:26:47 +01:00
v3d_irq.c drm/v3d: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:35 +01:00
v3d_mmu.c drm: v3d: fix common struct sg_table related issues 2020-09-10 08:18:35 +02:00
v3d_regs.h drm/v3d: Fix and extend MMU error handling. 2019-05-16 09:24:52 -07:00
v3d_sched.c drm/v3d/v3d_sched: Demote non-conformant kernel-doc header 2020-11-18 11:51:27 +01:00
v3d_trace.h drm/v3d: Add support for compute shader dispatch. 2019-04-18 09:54:10 -07:00
v3d_trace_points.c