#include <linux/dma-buf.h>
#include <drm/drm_fourcc.h>
#include "vc4_drv.h"
#include "uapi/drm/vc4_drm.h"
static const struct drm_gem_object_funcs vc4_gem_object_funcs;
static const char * const bo_type_names[] = …;
static bool is_user_label(int label)
{ … }
static void vc4_bo_stats_print(struct drm_printer *p, struct vc4_dev *vc4)
{ … }
static int vc4_bo_stats_debugfs(struct seq_file *m, void *unused)
{ … }
static int vc4_get_user_label(struct vc4_dev *vc4, const char *name)
{ … }
static void vc4_bo_set_label(struct drm_gem_object *gem_obj, int label)
{ … }
static uint32_t bo_page_index(size_t size)
{ … }
static void vc4_bo_destroy(struct vc4_bo *bo)
{ … }
static void vc4_bo_remove_from_cache(struct vc4_bo *bo)
{ … }
static struct list_head *vc4_get_cache_list_for_size(struct drm_device *dev,
size_t size)
{ … }
static void vc4_bo_cache_purge(struct drm_device *dev)
{ … }
void vc4_bo_add_to_purgeable_pool(struct vc4_bo *bo)
{ … }
static void vc4_bo_remove_from_purgeable_pool_locked(struct vc4_bo *bo)
{ … }
void vc4_bo_remove_from_purgeable_pool(struct vc4_bo *bo)
{ … }
static void vc4_bo_purge(struct drm_gem_object *obj)
{ … }
static void vc4_bo_userspace_cache_purge(struct drm_device *dev)
{ … }
static struct vc4_bo *vc4_bo_get_from_cache(struct drm_device *dev,
uint32_t size,
enum vc4_kernel_bo_type type)
{ … }
struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
{ … }
struct vc4_bo *vc4_bo_create(struct drm_device *dev, size_t unaligned_size,
bool allow_unzeroed, enum vc4_kernel_bo_type type)
{ … }
int vc4_bo_dumb_create(struct drm_file *file_priv,
struct drm_device *dev,
struct drm_mode_create_dumb *args)
{ … }
static void vc4_bo_cache_free_old(struct drm_device *dev)
{ … }
static void vc4_free_object(struct drm_gem_object *gem_bo)
{ … }
static void vc4_bo_cache_time_work(struct work_struct *work)
{ … }
int vc4_bo_inc_usecnt(struct vc4_bo *bo)
{ … }
void vc4_bo_dec_usecnt(struct vc4_bo *bo)
{ … }
static void vc4_bo_cache_time_timer(struct timer_list *t)
{ … }
static struct dma_buf *vc4_prime_export(struct drm_gem_object *obj, int flags)
{ … }
static vm_fault_t vc4_fault(struct vm_fault *vmf)
{ … }
static int vc4_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{ … }
static const struct vm_operations_struct vc4_vm_ops = …;
static const struct drm_gem_object_funcs vc4_gem_object_funcs = …;
static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file)
{ … }
int vc4_create_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int vc4_mmap_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int
vc4_create_shader_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int vc4_set_tiling_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int vc4_get_tiling_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }
int vc4_bo_debugfs_init(struct drm_minor *minor)
{ … }
static void vc4_bo_cache_destroy(struct drm_device *dev, void *unused);
int vc4_bo_cache_init(struct drm_device *dev)
{ … }
static void vc4_bo_cache_destroy(struct drm_device *dev, void *unused)
{ … }
int vc4_label_bo_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{ … }