Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / xen / xen_drm_front_gem.h
bloba4e67d0a149c76ae5c2ee7338a3dba8ef3752d14
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
3 /*
4 * Xen para-virtual DRM device
6 * Copyright (C) 2016-2018 EPAM Systems Inc.
8 * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
9 */
11 #ifndef __XEN_DRM_FRONT_GEM_H
12 #define __XEN_DRM_FRONT_GEM_H
14 struct dma_buf_attachment;
15 struct dma_buf_map;
16 struct drm_device;
17 struct drm_gem_object;
18 struct file;
19 struct sg_table;
20 struct vm_area_struct;
22 struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev,
23 size_t size);
25 struct drm_gem_object *
26 xen_drm_front_gem_import_sg_table(struct drm_device *dev,
27 struct dma_buf_attachment *attach,
28 struct sg_table *sgt);
30 struct sg_table *xen_drm_front_gem_get_sg_table(struct drm_gem_object *gem_obj);
32 struct page **xen_drm_front_gem_get_pages(struct drm_gem_object *obj);
34 void xen_drm_front_gem_free_object_unlocked(struct drm_gem_object *gem_obj);
36 int xen_drm_front_gem_mmap(struct file *filp, struct vm_area_struct *vma);
38 int xen_drm_front_gem_prime_vmap(struct drm_gem_object *gem_obj,
39 struct dma_buf_map *map);
41 void xen_drm_front_gem_prime_vunmap(struct drm_gem_object *gem_obj,
42 struct dma_buf_map *map);
44 int xen_drm_front_gem_prime_mmap(struct drm_gem_object *gem_obj,
45 struct vm_area_struct *vma);
47 #endif /* __XEN_DRM_FRONT_GEM_H */