#include <linux/iosys-map.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/shmem_fs.h>
#include <linux/vmalloc.h>
#include "i915_drv.h"
#include "gem/i915_gem_object.h"
#include "gem/i915_gem_lmem.h"
#include "shmem_utils.h"
struct file *shmem_create_from_data(const char *name, void *data, size_t len)
{ … }
struct file *shmem_create_from_object(struct drm_i915_gem_object *obj)
{ … }
void *shmem_pin_map(struct file *file)
{ … }
void shmem_unpin_map(struct file *file, void *ptr)
{ … }
static int __shmem_rw(struct file *file, loff_t off,
void *ptr, size_t len,
bool write)
{ … }
int shmem_read_to_iosys_map(struct file *file, loff_t off,
struct iosys_map *map, size_t map_off, size_t len)
{ … }
int shmem_read(struct file *file, loff_t off, void *dst, size_t len)
{ … }
int shmem_write(struct file *file, loff_t off, void *src, size_t len)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "st_shmem_utils.c"
#endif