xref: /openbmc/linux/drivers/gpu/drm/lima/lima_gem.h (revision 1a59d1b8)
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /* Copyright 2017-2019 Qiang Yu <yuq825@gmail.com> */
3 
4 #ifndef __LIMA_GEM_H__
5 #define __LIMA_GEM_H__
6 
7 struct lima_bo;
8 struct lima_submit;
9 
10 extern const struct vm_operations_struct lima_gem_vm_ops;
11 
12 struct lima_bo *lima_gem_create_bo(struct drm_device *dev, u32 size, u32 flags);
13 int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file,
14 			   u32 size, u32 flags, u32 *handle);
15 void lima_gem_free_object(struct drm_gem_object *obj);
16 int lima_gem_object_open(struct drm_gem_object *obj, struct drm_file *file);
17 void lima_gem_object_close(struct drm_gem_object *obj, struct drm_file *file);
18 int lima_gem_get_info(struct drm_file *file, u32 handle, u32 *va, u64 *offset);
19 int lima_gem_mmap(struct file *filp, struct vm_area_struct *vma);
20 int lima_gem_submit(struct drm_file *file, struct lima_submit *submit);
21 int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns);
22 
23 void lima_set_vma_flags(struct vm_area_struct *vma);
24 
25 #endif
26