#include <linux/dma-buf.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/set_memory.h>
#include <linux/xarray.h>
#include <drm/drm_cache.h>
#include <drm/drm_debugfs.h>
#include <drm/drm_file.h>
#include <drm/drm_utils.h>
#include "ivpu_drv.h"
#include "ivpu_gem.h"
#include "ivpu_hw.h"
#include "ivpu_mmu.h"
#include "ivpu_mmu_context.h"
static const struct drm_gem_object_funcs ivpu_gem_funcs;
static inline void ivpu_dbg_bo(struct ivpu_device *vdev, struct ivpu_bo *bo, const char *action)
{ … }
int __must_check ivpu_bo_pin(struct ivpu_bo *bo)
{ … }
static int
ivpu_bo_alloc_vpu_addr(struct ivpu_bo *bo, struct ivpu_mmu_context *ctx,
const struct ivpu_addr_range *range)
{ … }
static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)
{ … }
void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx)
{ … }
struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t size)
{ … }
static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flags)
{ … }
static int ivpu_gem_bo_open(struct drm_gem_object *obj, struct drm_file *file)
{ … }
static void ivpu_gem_bo_free(struct drm_gem_object *obj)
{ … }
static const struct drm_gem_object_funcs ivpu_gem_funcs = …;
int ivpu_bo_create_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
struct ivpu_bo *
ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,
struct ivpu_addr_range *range, u64 size, u32 flags)
{ … }
struct ivpu_bo *ivpu_bo_create_global(struct ivpu_device *vdev, u64 size, u32 flags)
{ … }
void ivpu_bo_free(struct ivpu_bo *bo)
{ … }
int ivpu_bo_info_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
int ivpu_bo_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
{ … }
static void ivpu_bo_print_info(struct ivpu_bo *bo, struct drm_printer *p)
{ … }
void ivpu_bo_list(struct drm_device *dev, struct drm_printer *p)
{ … }
void ivpu_bo_list_print(struct drm_device *dev)
{ … }