0001
0002
0003
0004
0005
0006 #ifndef SHMEM_UTILS_H
0007 #define SHMEM_UTILS_H
0008
0009 #include <linux/types.h>
0010
0011 struct iosys_map;
0012 struct drm_i915_gem_object;
0013 struct file;
0014
0015 struct file *shmem_create_from_data(const char *name, void *data, size_t len);
0016 struct file *shmem_create_from_object(struct drm_i915_gem_object *obj);
0017
0018 void *shmem_pin_map(struct file *file);
0019 void shmem_unpin_map(struct file *file, void *ptr);
0020
0021 int shmem_read_to_iosys_map(struct file *file, loff_t off,
0022 struct iosys_map *map, size_t map_off, size_t len);
0023 int shmem_read(struct file *file, loff_t off, void *dst, size_t len);
0024 int shmem_write(struct file *file, loff_t off, void *src, size_t len);
0025
0026 #endif