linux/drivers/gpu/drm/nouveau/nouveau_drv.h

/* SPDX-License-Identifier: MIT */
#ifndef __NOUVEAU_DRV_H__
#define __NOUVEAU_DRV_H__

#define DRIVER_AUTHOR
#define DRIVER_EMAIL

#define DRIVER_NAME
#define DRIVER_DESC
#define DRIVER_DATE

#define DRIVER_MAJOR
#define DRIVER_MINOR
#define DRIVER_PATCHLEVEL

/*
 * 1.1.1:
 * 	- added support for tiled system memory buffer objects
 *      - added support for NOUVEAU_GETPARAM_GRAPH_UNITS on [nvc0,nve0].
 *      - added support for compressed memory storage types on [nvc0,nve0].
 *      - added support for software methods 0x600,0x644,0x6ac on nvc0
 *        to control registers on the MPs to enable performance counters,
 *        and to control the warp error enable mask (OpenGL requires out of
 *        bounds access to local memory to be silently ignored / return 0).
 * 1.1.2:
 *      - fixes multiple bugs in flip completion events and timestamping
 * 1.2.0:
 * 	- object api exposed to userspace
 * 	- fermi,kepler,maxwell zbc
 * 1.2.1:
 *      - allow concurrent access to bo's mapped read/write.
 * 1.2.2:
 *      - add NOUVEAU_GEM_DOMAIN_COHERENT flag
 * 1.3.0:
 *      - NVIF ABI modified, safe because only (current) users are test
 *        programs that get directly linked with NVKM.
 * 1.3.1:
 *      - implemented limited ABI16/NVIF interop
 */

#include <linux/notifier.h>

#include <nvif/client.h>
#include <nvif/device.h>
#include <nvif/ioctl.h>
#include <nvif/mmu.h>
#include <nvif/vmm.h>

#include <drm/drm_connector.h>
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>

#include <drm/ttm/ttm_bo.h>
#include <drm/ttm/ttm_placement.h>

#include <drm/drm_audio_component.h>

#include "uapi/drm/nouveau_drm.h"

struct nouveau_channel;
struct platform_device;

#include "nouveau_fence.h"
#include "nouveau_bios.h"
#include "nouveau_sched.h"
#include "nouveau_vmm.h"
#include "nouveau_uvmm.h"

struct nouveau_drm_tile {};

enum nouveau_drm_object_route {};

enum nouveau_drm_handle {};

struct nouveau_cli {};

struct nouveau_cli_work {};

static inline struct nouveau_uvmm *
nouveau_cli_uvmm(struct nouveau_cli *cli)
{}

static inline struct nouveau_uvmm *
nouveau_cli_uvmm_locked(struct nouveau_cli *cli)
{}

static inline struct nouveau_vmm *
nouveau_cli_vmm(struct nouveau_cli *cli)
{}

static inline void
__nouveau_cli_disable_uvmm_noinit(struct nouveau_cli *cli)
{}

static inline void
nouveau_cli_disable_uvmm_noinit(struct nouveau_cli *cli)
{}

void nouveau_cli_work_queue(struct nouveau_cli *, struct dma_fence *,
			    struct nouveau_cli_work *);

static inline struct nouveau_cli *
nouveau_cli(struct drm_file *fpriv)
{}

static inline void
u_free(void *addr)
{}

static inline void *
u_memcpya(uint64_t user, unsigned int nmemb, unsigned int size)
{}

#include <nvif/object.h>
#include <nvif/parent.h>

struct nouveau_drm {};

static inline struct nouveau_drm *
nouveau_drm(struct drm_device *dev)
{}

static inline bool
nouveau_drm_use_coherent_gpu_mapping(struct nouveau_drm *drm)
{}

int nouveau_pmops_suspend(struct device *);
int nouveau_pmops_resume(struct device *);
bool nouveau_pmops_runtime(void);

#include <nvkm/core/tegra.h>

struct drm_device *
nouveau_platform_device_create(const struct nvkm_device_tegra_func *,
			       struct platform_device *, struct nvkm_device **);
void nouveau_drm_device_remove(struct drm_device *dev);

#define NV_PRINTK(l,c,f,a...)

#define NV_FATAL(drm,f,a...)
#define NV_ERROR(drm,f,a...)
#define NV_WARN(drm,f,a...)
#define NV_INFO(drm,f,a...)

#define NV_DEBUG(drm,f,a...)
#define NV_ATOMIC(drm,f,a...)

#define NV_PRINTK_ONCE(l,c,f,a...)

#define NV_ERROR_ONCE(drm,f,a...)
#define NV_WARN_ONCE(drm,f,a...)
#define NV_INFO_ONCE(drm,f,a...)

extern int nouveau_modeset;

#endif