linux/drivers/gpu/drm/i915/gt/shmem_utils.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: MIT */
   2/*
   3 * Copyright © 2020 Intel Corporation
   4 */
   5
   6#ifndef SHMEM_UTILS_H
   7#define SHMEM_UTILS_H
   8
   9#include <linux/types.h>
  10
  11struct drm_i915_gem_object;
  12struct file;
  13
  14struct file *shmem_create_from_data(const char *name, void *data, size_t len);
  15struct file *shmem_create_from_object(struct drm_i915_gem_object *obj);
  16
  17void *shmem_pin_map(struct file *file);
  18void shmem_unpin_map(struct file *file, void *ptr);
  19
  20int shmem_read(struct file *file, loff_t off, void *dst, size_t len);
  21int shmem_write(struct file *file, loff_t off, void *src, size_t len);
  22
  23#endif /* SHMEM_UTILS_H */
  24