]> git.ipfire.org Git - thirdparty/linux.git/blame - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/linux.git] / drivers / gpu / drm / nouveau / nvkm / subdev / instmem / priv.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
24a4ae86
BS
2#ifndef __NVKM_INSTMEM_PRIV_H__
3#define __NVKM_INSTMEM_PRIV_H__
b7a2bc18 4#define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
24a4ae86
BS
5#include <subdev/instmem.h>
6
b7a2bc18
BS
7struct 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);
d8e83994
BS
13 int (*memory_new)(struct nvkm_instmem *, u32 size, u32 align,
14 bool zero, struct nvkm_memory **);
15 bool persistent;
16 bool zero;
24a4ae86
BS
17};
18
b7a2bc18
BS
19void nvkm_instmem_ctor(const struct nvkm_instmem_func *, struct nvkm_device *,
20 int index, struct nvkm_instmem *);
24a4ae86 21#endif