linux/drivers/gpu/drm/xe/xe_vm_types.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef _XE_VM_TYPES_H_
#define _XE_VM_TYPES_H_

#include <drm/drm_gpuvm.h>

#include <linux/dma-resv.h>
#include <linux/kref.h>
#include <linux/mmu_notifier.h>
#include <linux/scatterlist.h>

#include "xe_device_types.h"
#include "xe_pt_types.h"
#include "xe_range_fence.h"

struct xe_bo;
struct xe_sync_entry;
struct xe_user_fence;
struct xe_vm;
struct xe_vm_pgtable_update_op;

#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
#define TEST_VM_OPS_ERROR
#define FORCE_OP_ERROR

#define FORCE_OP_ERROR_LOCK
#define FORCE_OP_ERROR_PREPARE
#define FORCE_OP_ERROR_RUN
#define FORCE_OP_ERROR_COUNT
#endif

#define XE_VMA_READ_ONLY
#define XE_VMA_DESTROYED
#define XE_VMA_ATOMIC_PTE_BIT
#define XE_VMA_PTE_4K
#define XE_VMA_PTE_2M
#define XE_VMA_PTE_1G
#define XE_VMA_PTE_64K
#define XE_VMA_PTE_COMPACT
#define XE_VMA_DUMPABLE

/** struct xe_userptr - User pointer */
struct xe_userptr {};

struct xe_vma {};

/**
 * struct xe_userptr_vma - A userptr vma subclass
 * @vma: The vma.
 * @userptr: Additional userptr information.
 */
struct xe_userptr_vma {};

struct xe_device;

struct xe_vm {};

/** struct xe_vma_op_map - VMA map operation */
struct xe_vma_op_map {};

/** struct xe_vma_op_remap - VMA remap operation */
struct xe_vma_op_remap {};

/** struct xe_vma_op_prefetch - VMA prefetch operation */
struct xe_vma_op_prefetch {};

/** enum xe_vma_op_flags - flags for VMA operation */
enum xe_vma_op_flags {};

/** struct xe_vma_op - VMA operation */
struct xe_vma_op {};

/** struct xe_vma_ops - VMA operations */
struct xe_vma_ops {};

#endif