1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2020 Intel Corporation
9 #include <linux/types.h>
12 struct drm_i915_gem_object;
15 struct file *shmem_create_from_data(const char *name, void *data, size_t len);
16 struct file *shmem_create_from_object(struct drm_i915_gem_object *obj);
18 void *shmem_pin_map(struct file *file);
19 void shmem_unpin_map(struct file *file, void *ptr);
21 int shmem_read_to_iosys_map(struct file *file, loff_t off,
22 struct iosys_map *map, size_t map_off, size_t len);
23 int shmem_read(struct file *file, loff_t off, void *dst, size_t len);
24 int shmem_write(struct file *file, loff_t off, void *src, size_t len);
26 #endif /* SHMEM_UTILS_H */