diff options
author | Haneen Mohammed <hamohammed.sa@gmail.com> | 2018-07-24 19:26:59 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-07-30 13:03:05 -0400 |
commit | bb112b14af8d1910909eb132c78ddf49be907e31 (patch) | |
tree | 09f4f90b0a0df0e3d456e025dbdbdb0ad7edefe5 /drivers/gpu/drm/vkms/vkms_drv.h | |
parent | 344d00795eb11927ba84233473bb18398e569eb4 (diff) | |
download | linux-bb112b14af8d1910909eb132c78ddf49be907e31.tar.gz linux-bb112b14af8d1910909eb132c78ddf49be907e31.tar.bz2 linux-bb112b14af8d1910909eb132c78ddf49be907e31.zip |
drm/vkms: Add functions to map/unmap GEM backing storage
This patch add the necessary functions to map/unmap GEM
backing memory to the kernel's virtual address space.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/4b6563ae4f4337a5fd51f872424addf64e8d59a6.1532446182.git.hamohammed.sa@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_drv.h')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_drv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 07be29f2dc44..47048f707566 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm/vkms/vkms_drv.h @@ -39,6 +39,8 @@ struct vkms_gem_object { struct drm_gem_object gem; struct mutex pages_lock; /* Page lock used in page fault handler */ struct page **pages; + unsigned int vmap_count; + void *vaddr; }; #define drm_crtc_to_vkms_output(target) \ @@ -47,6 +49,9 @@ struct vkms_gem_object { #define drm_device_to_vkms_device(target) \ container_of(target, struct vkms_device, drm) +#define drm_gem_to_vkms_gem(target)\ + container_of(target, struct vkms_gem_object, gem) + /* CRTC */ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor); @@ -75,4 +80,8 @@ int vkms_dumb_map(struct drm_file *file, struct drm_device *dev, void vkms_gem_free_object(struct drm_gem_object *obj); +int vkms_gem_vmap(struct drm_gem_object *obj); + +void vkms_gem_vunmap(struct drm_gem_object *obj); + #endif /* _VKMS_DRV_H_ */ |