Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gt / shmem_utils.h
blobc1669170c351e1fb0f7aaf89fec146470bb1f520
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2020 Intel Corporation
4 */
6 #ifndef SHMEM_UTILS_H
7 #define SHMEM_UTILS_H
9 #include <linux/types.h>
11 struct drm_i915_gem_object;
12 struct file;
14 struct file *shmem_create_from_data(const char *name, void *data, size_t len);
15 struct file *shmem_create_from_object(struct drm_i915_gem_object *obj);
17 void *shmem_pin_map(struct file *file);
18 void shmem_unpin_map(struct file *file, void *ptr);
20 int shmem_read(struct file *file, loff_t off, void *dst, size_t len);
21 int shmem_write(struct file *file, loff_t off, void *src, size_t len);
23 #endif /* SHMEM_UTILS_H */