diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2018-06-18 17:17:28 +0300 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2018-06-25 17:17:03 +0300 |
commit | 1572042a4ab25567e4785b53b947729dfa2dac99 (patch) | |
tree | 8232ce3ff12286ec7bcb8cb9ae40d9bd3c1df9b3 /drivers/gpu/drm/drm_internal.h | |
parent | 46d8f405e16cdc47962edbe7771246c8d5b8c795 (diff) | |
download | linux-1572042a4ab25567e4785b53b947729dfa2dac99.tar.xz |
drm: provide management functions for drm_file
Rather than doing drm_file allocation/destruction right in the fops, lets
provide separate helpers. This decouples drm_file management from the
still-mandatory drm-fops. It prepares for use of drm_file without the
fops, both by possible separate fops implementations and APIs (not that I
am aware of any such plans), and more importantly from in-kernel use where
no real file is available.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180618141739.48151-2-noralf@tronnes.org
Diffstat (limited to 'drivers/gpu/drm/drm_internal.h')
-rw-r--r-- | drivers/gpu/drm/drm_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index b72242e93ea4..40179c5fc6b8 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -26,6 +26,8 @@ /* drm_file.c */ extern struct mutex drm_global_mutex; +struct drm_file *drm_file_alloc(struct drm_minor *minor); +void drm_file_free(struct drm_file *file); void drm_lastclose(struct drm_device *dev); /* drm_pci.c */ |