]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blob - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-kernels.git] / drivers / gpu / drm / nouveau / nvkm / subdev / instmem / priv.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_INSTMEM_PRIV_H__
3 #define __NVKM_INSTMEM_PRIV_H__
4 #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
5 #include <subdev/instmem.h>
6
7 struct nvkm_instmem_func {
8 void *(*dtor)(struct nvkm_instmem *);
9 int (*oneinit)(struct nvkm_instmem *);
10 void (*fini)(struct nvkm_instmem *);
11 u32 (*rd32)(struct nvkm_instmem *, u32 addr);
12 void (*wr32)(struct nvkm_instmem *, u32 addr, u32 data);
13 int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align,
14 bool zero, struct nvkm_memory **);
15 bool persistent;
16 bool zero;
17 };
18
19 void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *,
20 int index, struct nvkm_instmem *);
21 #endif