linux/drivers/gpu/drm/loongson/lsdc_ttm.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2023 Loongson Technology Corporation Limited
 */

#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_gem.h>
#include <drm/drm_managed.h>
#include <drm/drm_prime.h>

#include "lsdc_drv.h"
#include "lsdc_ttm.h"

const char *lsdc_mem_type_to_str(uint32_t mem_type)
{}

const char *lsdc_domain_to_str(u32 domain)
{}

static void lsdc_bo_set_placement(struct lsdc_bo *lbo, u32 domain)
{}

static void lsdc_ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *tt)
{}

static struct ttm_tt *
lsdc_ttm_tt_create(struct ttm_buffer_object *tbo, uint32_t page_flags)
{}

static int lsdc_ttm_tt_populate(struct ttm_device *bdev,
				struct ttm_tt *ttm,
				struct ttm_operation_ctx *ctx)
{}

static void lsdc_ttm_tt_unpopulate(struct ttm_device *bdev,
				   struct ttm_tt *ttm)
{}

static void lsdc_bo_evict_flags(struct ttm_buffer_object *tbo,
				struct ttm_placement *tplacement)
{}

static int lsdc_bo_move(struct ttm_buffer_object *tbo,
			bool evict,
			struct ttm_operation_ctx *ctx,
			struct ttm_resource *new_mem,
			struct ttm_place *hop)
{}

static int lsdc_bo_reserve_io_mem(struct ttm_device *bdev,
				  struct ttm_resource *mem)
{}

static struct ttm_device_funcs lsdc_bo_driver =;

u64 lsdc_bo_gpu_offset(struct lsdc_bo *lbo)
{}

size_t lsdc_bo_size(struct lsdc_bo *lbo)
{}

int lsdc_bo_reserve(struct lsdc_bo *lbo)
{}

void lsdc_bo_unreserve(struct lsdc_bo *lbo)
{}

int lsdc_bo_pin(struct lsdc_bo *lbo, u32 domain, u64 *gpu_addr)
{}

void lsdc_bo_unpin(struct lsdc_bo *lbo)
{}

void lsdc_bo_ref(struct lsdc_bo *lbo)
{}

void lsdc_bo_unref(struct lsdc_bo *lbo)
{}

int lsdc_bo_kmap(struct lsdc_bo *lbo)
{}

void lsdc_bo_kunmap(struct lsdc_bo *lbo)
{}

void lsdc_bo_clear(struct lsdc_bo *lbo)
{}

int lsdc_bo_evict_vram(struct drm_device *ddev)
{}

static void lsdc_bo_destroy(struct ttm_buffer_object *tbo)
{}

struct lsdc_bo *lsdc_bo_create(struct drm_device *ddev,
			       u32 domain,
			       size_t size,
			       bool kernel,
			       struct sg_table *sg,
			       struct dma_resv *resv)
{}

struct lsdc_bo *lsdc_bo_create_kernel_pinned(struct drm_device *ddev,
					     u32 domain,
					     size_t size)
{}

void lsdc_bo_free_kernel_pinned(struct lsdc_bo *lbo)
{}

static void lsdc_ttm_fini(struct drm_device *ddev, void *data)
{}

int lsdc_ttm_init(struct lsdc_device *ldev)
{}

void lsdc_ttm_debugfs_init(struct lsdc_device *ldev)
{}