xref: /linux/drivers/gpu/drm/xen/xen_drm_front_gem.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 
3 /*
4  *  Xen para-virtual DRM device
5  *
6  * Copyright (C) 2016-2018 EPAM Systems Inc.
7  *
8  * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
9  */
10 
11 #ifndef __XEN_DRM_FRONT_GEM_H
12 #define __XEN_DRM_FRONT_GEM_H
13 
14 struct dma_buf_attachment;
15 struct iosys_map;
16 struct drm_device;
17 struct drm_gem_object;
18 struct sg_table;
19 
20 struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev,
21 						size_t size);
22 
23 struct drm_gem_object *
24 xen_drm_front_gem_import_sg_table(struct drm_device *dev,
25 				  struct dma_buf_attachment *attach,
26 				  struct sg_table *sgt);
27 
28 struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj);
29 
30 struct page **xen_drm_front_gem_get_pages(struct drm_gem_object *obj);
31 
32 void xen_drm_front_gem_free_object_unlocked(struct drm_gem_object *gem_obj);
33 
34 int xen_drm_front_gem_prime_vmap(struct drm_gem_object *gem_obj,
35 				 struct iosys_map *map);
36 
37 void xen_drm_front_gem_prime_vunmap(struct drm_gem_object *gem_obj,
38 				    struct iosys_map *map);
39 
40 #endif /* __XEN_DRM_FRONT_GEM_H */
41