linux/drivers/gpu/drm/etnaviv/etnaviv_gem.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2015-2018 Etnaviv Project
 */

#include <drm/drm_prime.h>
#include <linux/dma-mapping.h>
#include <linux/shmem_fs.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>

#include "etnaviv_drv.h"
#include "etnaviv_gem.h"
#include "etnaviv_gpu.h"
#include "etnaviv_mmu.h"

static struct lock_class_key etnaviv_shm_lock_class;
static struct lock_class_key etnaviv_userptr_lock_class;

static void etnaviv_gem_scatter_map(struct etnaviv_gem_object *etnaviv_obj)
{}

static void etnaviv_gem_scatterlist_unmap(struct etnaviv_gem_object *etnaviv_obj)
{}

/* called with etnaviv_obj->lock held */
static int etnaviv_gem_shmem_get_pages(struct etnaviv_gem_object *etnaviv_obj)
{}

static void put_pages(struct etnaviv_gem_object *etnaviv_obj)
{}

struct page **etnaviv_gem_get_pages(struct etnaviv_gem_object *etnaviv_obj)
{}

void etnaviv_gem_put_pages(struct etnaviv_gem_object *etnaviv_obj)
{}

static int etnaviv_gem_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
		struct vm_area_struct *vma)
{}

static int etnaviv_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{}

static vm_fault_t etnaviv_gem_fault(struct vm_fault *vmf)
{}

int etnaviv_gem_mmap_offset(struct drm_gem_object *obj, u64 *offset)
{}

static struct etnaviv_vram_mapping *
etnaviv_gem_get_vram_mapping(struct etnaviv_gem_object *obj,
			     struct etnaviv_iommu_context *context)
{}

void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping)
{}

struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
	struct drm_gem_object *obj, struct etnaviv_iommu_context *mmu_context,
	u64 va)
{}

void *etnaviv_gem_vmap(struct drm_gem_object *obj)
{}

static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)
{}

static inline enum dma_data_direction etnaviv_op_to_dma_dir(u32 op)
{}

int etnaviv_gem_cpu_prep(struct drm_gem_object *obj, u32 op,
		struct drm_etnaviv_timespec *timeout)
{}

int etnaviv_gem_cpu_fini(struct drm_gem_object *obj)
{}

int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj,
	struct drm_etnaviv_timespec *timeout)
{}

#ifdef CONFIG_DEBUG_FS
static void etnaviv_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
{}

void etnaviv_gem_describe_objects(struct etnaviv_drm_private *priv,
	struct seq_file *m)
{}
#endif

static void etnaviv_gem_shmem_release(struct etnaviv_gem_object *etnaviv_obj)
{}

static const struct etnaviv_gem_ops etnaviv_gem_shmem_ops =;

void etnaviv_gem_free_object(struct drm_gem_object *obj)
{}

void etnaviv_gem_obj_add(struct drm_device *dev, struct drm_gem_object *obj)
{}

static const struct vm_operations_struct vm_ops =;

static const struct drm_gem_object_funcs etnaviv_gem_object_funcs =;

static int etnaviv_gem_new_impl(struct drm_device *dev, u32 flags,
	const struct etnaviv_gem_ops *ops, struct drm_gem_object **obj)
{}

/* convenience method to construct a GEM buffer object, and userspace handle */
int etnaviv_gem_new_handle(struct drm_device *dev, struct drm_file *file,
	u32 size, u32 flags, u32 *handle)
{}

int etnaviv_gem_new_private(struct drm_device *dev, size_t size, u32 flags,
	const struct etnaviv_gem_ops *ops, struct etnaviv_gem_object **res)
{}

static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj)
{}

static void etnaviv_gem_userptr_release(struct etnaviv_gem_object *etnaviv_obj)
{}

static int etnaviv_gem_userptr_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
		struct vm_area_struct *vma)
{}

static const struct etnaviv_gem_ops etnaviv_gem_userptr_ops =;

int etnaviv_gem_new_userptr(struct drm_device *dev, struct drm_file *file,
	uintptr_t ptr, u32 size, u32 flags, u32 *handle)
{}