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

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

#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>

#include "etnaviv_cmdbuf.h"
#include "etnaviv_gpu.h"
#include "etnaviv_mmu.h"
#include "state.xml.h"
#include "state_hi.xml.h"

#define MMUv2_PTE_PRESENT
#define MMUv2_PTE_EXCEPTION
#define MMUv2_PTE_WRITEABLE

#define MMUv2_MTLB_MASK
#define MMUv2_MTLB_SHIFT
#define MMUv2_STLB_MASK
#define MMUv2_STLB_SHIFT

#define MMUv2_MAX_STLB_ENTRIES

struct etnaviv_iommuv2_context {};

static struct etnaviv_iommuv2_context *
to_v2_context(struct etnaviv_iommu_context *context)
{}

static void etnaviv_iommuv2_free(struct etnaviv_iommu_context *context)
{}
static int
etnaviv_iommuv2_ensure_stlb(struct etnaviv_iommuv2_context *v2_context,
			    int stlb)
{}

static int etnaviv_iommuv2_map(struct etnaviv_iommu_context *context,
			       unsigned long iova, phys_addr_t paddr,
			       size_t size, int prot)
{}

static size_t etnaviv_iommuv2_unmap(struct etnaviv_iommu_context *context,
				    unsigned long iova, size_t size)
{}

static size_t etnaviv_iommuv2_dump_size(struct etnaviv_iommu_context *context)
{}

static void etnaviv_iommuv2_dump(struct etnaviv_iommu_context *context, void *buf)
{}

static void etnaviv_iommuv2_restore_nonsec(struct etnaviv_gpu *gpu,
	struct etnaviv_iommu_context *context)
{}

static void etnaviv_iommuv2_restore_sec(struct etnaviv_gpu *gpu,
	struct etnaviv_iommu_context *context)
{}

u32 etnaviv_iommuv2_get_mtlb_addr(struct etnaviv_iommu_context *context)
{}

unsigned short etnaviv_iommuv2_get_pta_id(struct etnaviv_iommu_context *context)
{}
static void etnaviv_iommuv2_restore(struct etnaviv_gpu *gpu,
				    struct etnaviv_iommu_context *context)
{}

const struct etnaviv_iommu_ops etnaviv_iommuv2_ops =;

struct etnaviv_iommu_context *
etnaviv_iommuv2_context_alloc(struct etnaviv_iommu_global *global)
{}