This source file includes following definitions.
- i915_gemfs_init
- i915_gemfs_fini
1
2
3
4
5
6
7 #include <linux/fs.h>
8 #include <linux/mount.h>
9 #include <linux/pagemap.h>
10
11 #include "i915_drv.h"
12 #include "i915_gemfs.h"
13
14 int i915_gemfs_init(struct drm_i915_private *i915)
15 {
16 struct file_system_type *type;
17 struct vfsmount *gemfs;
18
19 type = get_fs_type("tmpfs");
20 if (!type)
21 return -ENODEV;
22
23
24
25
26
27
28
29
30
31
32 gemfs = kern_mount(type);
33 if (IS_ERR(gemfs))
34 return PTR_ERR(gemfs);
35
36 i915->mm.gemfs = gemfs;
37
38 return 0;
39 }
40
41 void i915_gemfs_fini(struct drm_i915_private *i915)
42 {
43 kern_unmount(i915->mm.gemfs);
44 }