linux/drivers/gpu/drm/panfrost/panfrost_gem.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright 2019 Linaro, Ltd, Rob Herring <[email protected]> */

#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"

/* Called DRM core on the last userspace/kernel unreference of the
 * BO.
 */
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 =;

/**
 * panfrost_gem_create_object - Implementation of driver->gem_create_object.
 * @dev: DRM device
 * @size: Size in bytes of the memory the object will reference
 *
 * This lets the GEM helpers allocate object structs for us, and keep
 * our BO stats correct.
 */
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)
{}