drm/vram-helper: Set object function iff they are not provided by driver
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 22 Sep 2020 14:56:59 +0000 (16:56 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 25 Sep 2020 09:21:04 +0000 (11:21 +0200)
commit4d92d7d76dd582fc1212b25a9380acc6123535cb
tree1b20d66a9dec77963e2612cd286537ea5ccdfe64
parent7faa92dfdf426db40740f59fcdfce48e5cfb7210
drm/vram-helper: Set object function iff they are not provided by driver

Don't override the GEM object functions unconditionally. If the driver
sets the GEM functions, VRAM helpers will not set them. The idea has been
taken from SHMEM helpers.

v2:
* updated the commit message (Sam)
* document the new feature for drm_gem_vram_create()

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200922145700.25413-3-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_vram_helper.c