This source file includes following definitions.
- exynos_drm_gem_put
1
2
3
4
5
6
7
8 #ifndef _EXYNOS_DRM_GEM_H_
9 #define _EXYNOS_DRM_GEM_H_
10
11 #include <drm/drm_gem.h>
12 #include <linux/mm_types.h>
13
14 #define to_exynos_gem(x) container_of(x, struct exynos_drm_gem, base)
15
16 #define IS_NONCONTIG_BUFFER(f) (f & EXYNOS_BO_NONCONTIG)
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 struct exynos_drm_gem {
44 struct drm_gem_object base;
45 unsigned int flags;
46 unsigned long size;
47 void *cookie;
48 void __iomem *kvaddr;
49 dma_addr_t dma_addr;
50 unsigned long dma_attrs;
51 struct page **pages;
52 struct sg_table *sgt;
53 };
54
55
56 void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem);
57
58
59 struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
60 unsigned int flags,
61 unsigned long size);
62
63
64
65
66
67
68 int exynos_drm_gem_create_ioctl(struct drm_device *dev, void *data,
69 struct drm_file *file_priv);
70
71
72 int exynos_drm_gem_map_ioctl(struct drm_device *dev, void *data,
73 struct drm_file *file_priv);
74
75
76
77
78
79
80 struct exynos_drm_gem *exynos_drm_gem_get(struct drm_file *filp,
81 unsigned int gem_handle);
82
83
84
85
86
87 static inline void exynos_drm_gem_put(struct exynos_drm_gem *exynos_gem)
88 {
89 drm_gem_object_put_unlocked(&exynos_gem->base);
90 }
91
92
93 int exynos_drm_gem_get_ioctl(struct drm_device *dev, void *data,
94 struct drm_file *file_priv);
95
96
97 void exynos_drm_gem_free_object(struct drm_gem_object *obj);
98
99
100 int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
101 struct drm_device *dev,
102 struct drm_mode_create_dumb *args);
103
104
105 vm_fault_t exynos_drm_gem_fault(struct vm_fault *vmf);
106
107
108 int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
109
110
111 struct drm_gem_object *exynos_drm_gem_prime_import(struct drm_device *dev,
112 struct dma_buf *dma_buf);
113 struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj);
114 struct drm_gem_object *
115 exynos_drm_gem_prime_import_sg_table(struct drm_device *dev,
116 struct dma_buf_attachment *attach,
117 struct sg_table *sgt);
118 void *exynos_drm_gem_prime_vmap(struct drm_gem_object *obj);
119 void exynos_drm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
120 int exynos_drm_gem_prime_mmap(struct drm_gem_object *obj,
121 struct vm_area_struct *vma);
122
123 #endif