drm/gem-shmem: Set vm_ops in static initializer
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 9 Feb 2022 15:56:33 +0000 (16:56 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Feb 2022 08:42:01 +0000 (09:42 +0100)
commitd315bdbfebd517cf5efabf666c8099e027ef666f
tree1ce230dddddec2c86e2c5b53d891c7206de5e780
parent593504ba3ee36bb9e5c7e5cbcf13986817f4d8d8
drm/gem-shmem: Set vm_ops in static initializer

Initialize default vm_ops in static initialization of the GEM SHMEM funcs,
instead of the mmap code. It's simply better style. GEM helpers will later
set a VMA's vm_ops from the default automatically.

v2:
* also update the drivers that build upon GEM SHMEM

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220209155634.3994-2-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_shmem_helper.c
drivers/gpu/drm/lima/lima_gem.c
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/v3d/v3d_bo.c
drivers/gpu/drm/virtio/virtgpu_object.c
include/drm/drm_gem_shmem_helper.h