By default, SHMEM GEM helpers map pages using writecombine. Only a few drivers require this setting. Others revert it to default mappings flags. Some could benefit from caching, but don't care. Unify the behaviour by switching the SHMEM GEM code to use cached mappings (i.e., PAGE_KERNEL actually); just like regular shmem memory does. The 3 drivers that require write combining explicitly select it during GEM object creation. The exception is dma-buf imported pages, which are always mapped using writecombine mode. v3: * fix dereferencing of an uninitialized pointer (Dan, kernel test robot) v2: * recreate patches on top of latest SHMEM helpers * update lima, panfrost, v3d (Daniel, Rob) * udl has been updated before separately. Thomas Zimmermann (2): drm/shmem-helper: Use cached mappings by default drm/shmem-helper: Removed drm_gem_shmem_create_object_cached() drivers/gpu/drm/drm_gem_shmem_helper.c | 40 +++++-------------------- drivers/gpu/drm/lima/lima_gem.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 1 - drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- drivers/gpu/drm/udl/udl_drv.c | 2 -- drivers/gpu/drm/v3d/v3d_bo.c | 2 +- drivers/gpu/drm/virtio/virtgpu_object.c | 1 - drivers/gpu/drm/vkms/vkms_drv.c | 1 - include/drm/drm_gem_shmem_helper.h | 7 ++--- 9 files changed, 13 insertions(+), 45 deletions(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel