diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-02-09 16:56:33 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-02-14 09:42:01 +0100 |
commit | d315bdbfebd517cf5efabf666c8099e027ef666f (patch) | |
tree | 1ce230dddddec2c86e2c5b53d891c7206de5e780 /drivers/gpu/drm/lima | |
parent | 593504ba3ee36bb9e5c7e5cbcf13986817f4d8d8 (diff) | |
download | linux-d315bdbfebd517cf5efabf666c8099e027ef666f.tar.gz linux-d315bdbfebd517cf5efabf666c8099e027ef666f.tar.bz2 linux-d315bdbfebd517cf5efabf666c8099e027ef666f.zip |
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
Diffstat (limited to 'drivers/gpu/drm/lima')
-rw-r--r-- | drivers/gpu/drm/lima/lima_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c index f9a9198ef198..6a6f6f2ead75 100644 --- a/drivers/gpu/drm/lima/lima_gem.c +++ b/drivers/gpu/drm/lima/lima_gem.c @@ -213,6 +213,7 @@ static const struct drm_gem_object_funcs lima_gem_funcs = { .vmap = lima_gem_vmap, .vunmap = drm_gem_shmem_object_vunmap, .mmap = lima_gem_mmap, + .vm_ops = &drm_gem_shmem_vm_ops, }; struct drm_gem_object *lima_gem_create_object(struct drm_device *dev, size_t size) |