#include <linux/err.h>
#include <linux/slab.h>
#include <linux/dma-buf.h>
#include <linux/dma-mapping.h>
#include <drm/panfrost_drm.h>
#include "panfrost_device.h"
#include "panfrost_gem.h"
#include "panfrost_mmu.h"
static void panfrost_gem_free_object(struct drm_gem_object *obj)
{ … }
struct panfrost_gem_mapping *
panfrost_gem_mapping_get(struct panfrost_gem_object *bo,
struct panfrost_file_priv *priv)
{ … }
static void
panfrost_gem_teardown_mapping(struct panfrost_gem_mapping *mapping)
{ … }
static void panfrost_gem_mapping_release(struct kref *kref)
{ … }
void panfrost_gem_mapping_put(struct panfrost_gem_mapping *mapping)
{ … }
void panfrost_gem_teardown_mappings_locked(struct panfrost_gem_object *bo)
{ … }
int panfrost_gem_open(struct drm_gem_object *obj, struct drm_file *file_priv)
{ … }
void panfrost_gem_close(struct drm_gem_object *obj, struct drm_file *file_priv)
{ … }
static int panfrost_gem_pin(struct drm_gem_object *obj)
{ … }
static enum drm_gem_object_status panfrost_gem_status(struct drm_gem_object *obj)
{ … }
static size_t panfrost_gem_rss(struct drm_gem_object *obj)
{ … }
static const struct drm_gem_object_funcs panfrost_gem_funcs = …;
struct drm_gem_object *panfrost_gem_create_object(struct drm_device *dev, size_t size)
{ … }
struct panfrost_gem_object *
panfrost_gem_create(struct drm_device *dev, size_t size, u32 flags)
{ … }
struct drm_gem_object *
panfrost_gem_prime_import_sg_table(struct drm_device *dev,
struct dma_buf_attachment *attach,
struct sg_table *sgt)
{ … }