]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Integrate VRAM MM into struct drm_device
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 8 May 2019 08:26:18 +0000 (10:26 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 15 May 2019 14:17:06 +0000 (16:17 +0200)
commit1e72ed5b25040ec15e6b5f6bc6389fc8ad8a940c
tree8054d6410183e4d61439822a31446fbf4a3f5226
parentedcc84a6b94982e1b569ec360b64a24bb560d1a6
drm: Integrate VRAM MM into struct drm_device

There's now a pointer to struct drm_vram_mm stored in struct drm_device.
DRM drivers that use VRAM MM should use this field to refer to their
instance of the data structure. Appropriate helpers are now provided as
well.

Adding struct drm_vram_mm to struct drm_device further avoids wrappers
and boilerplate code in drivers. This patch implements default functions
for callbacks in struct drm_driver and struct file_operations that use
the struct drm_vram_mm stored in struct drm_device. Drivers that need to
provide their own implementations can still do so.

The patch also adds documentation for the VRAM helper library in general.

v5:
* set .llseek to no_llseek() from DRM_VRAM_MM_FILE_OPERATIONS
v4:
* cleanups from checkpatch.pl
* document VRAM helper library

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-9-tzimmermann@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Documentation/gpu/drm-mm.rst
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/drm_vram_helper_common.c
drivers/gpu/drm/drm_vram_mm_helper.c
include/drm/drm_device.h
include/drm/drm_gem_vram_helper.h
include/drm/drm_vram_mm_helper.h