1c575b7eeSOleksandr Andrushchenko /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2c575b7eeSOleksandr Andrushchenko 3c575b7eeSOleksandr Andrushchenko /* 4c575b7eeSOleksandr Andrushchenko * Xen para-virtual DRM device 5c575b7eeSOleksandr Andrushchenko * 6c575b7eeSOleksandr Andrushchenko * Copyright (C) 2016-2018 EPAM Systems Inc. 7c575b7eeSOleksandr Andrushchenko * 8c575b7eeSOleksandr Andrushchenko * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> 9c575b7eeSOleksandr Andrushchenko */ 10c575b7eeSOleksandr Andrushchenko 11c575b7eeSOleksandr Andrushchenko #ifndef __XEN_DRM_FRONT_GEM_H 12c575b7eeSOleksandr Andrushchenko #define __XEN_DRM_FRONT_GEM_H 13c575b7eeSOleksandr Andrushchenko 142ea2269eSSam Ravnborg struct dma_buf_attachment; 15*49a3f51dSThomas Zimmermann struct dma_buf_map; 162ea2269eSSam Ravnborg struct drm_device; 172ea2269eSSam Ravnborg struct drm_gem_object; 182ea2269eSSam Ravnborg struct file; 192ea2269eSSam Ravnborg struct sg_table; 202ea2269eSSam Ravnborg struct vm_area_struct; 21c575b7eeSOleksandr Andrushchenko 22c575b7eeSOleksandr Andrushchenko struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev, 23c575b7eeSOleksandr Andrushchenko size_t size); 24c575b7eeSOleksandr Andrushchenko 25c575b7eeSOleksandr Andrushchenko struct drm_gem_object * 26c575b7eeSOleksandr Andrushchenko xen_drm_front_gem_import_sg_table(struct drm_device *dev, 27c575b7eeSOleksandr Andrushchenko struct dma_buf_attachment *attach, 28c575b7eeSOleksandr Andrushchenko struct sg_table *sgt); 29c575b7eeSOleksandr Andrushchenko 30c575b7eeSOleksandr Andrushchenko struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj); 31c575b7eeSOleksandr Andrushchenko 32c575b7eeSOleksandr Andrushchenko struct page **xen_drm_front_gem_get_pages(struct drm_gem_object *obj); 33c575b7eeSOleksandr Andrushchenko 34c575b7eeSOleksandr Andrushchenko void xen_drm_front_gem_free_object_unlocked(struct drm_gem_object *gem_obj); 35c575b7eeSOleksandr Andrushchenko 36c575b7eeSOleksandr Andrushchenko int xen_drm_front_gem_mmap(struct file *filp, struct vm_area_struct *vma); 37c575b7eeSOleksandr Andrushchenko 38*49a3f51dSThomas Zimmermann int xen_drm_front_gem_prime_vmap(struct drm_gem_object *gem_obj, 39*49a3f51dSThomas Zimmermann struct dma_buf_map *map); 40c575b7eeSOleksandr Andrushchenko 41c575b7eeSOleksandr Andrushchenko void xen_drm_front_gem_prime_vunmap(struct drm_gem_object *gem_obj, 42*49a3f51dSThomas Zimmermann struct dma_buf_map *map); 43c575b7eeSOleksandr Andrushchenko 44c575b7eeSOleksandr Andrushchenko int xen_drm_front_gem_prime_mmap(struct drm_gem_object *gem_obj, 45c575b7eeSOleksandr Andrushchenko struct vm_area_struct *vma); 46c575b7eeSOleksandr Andrushchenko 47c575b7eeSOleksandr Andrushchenko #endif /* __XEN_DRM_FRONT_GEM_H */ 48