Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / bar.h
blobf6bd94c7e0f75fa71586a41270a1865c6c702a11
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_BAR_H__
3 #define __NVKM_BAR_H__
4 #include <core/subdev.h>
5 struct nvkm_vma;
7 struct nvkm_bar {
8 const struct nvkm_bar_func *func;
9 struct nvkm_subdev subdev;
11 spinlock_t lock;
12 bool bar2;
14 /* whether the BAR supports to be ioremapped WC or should be uncached */
15 bool iomap_uncached;
18 struct nvkm_vmm *nvkm_bar_bar1_vmm(struct nvkm_device *);
19 void nvkm_bar_bar2_init(struct nvkm_device *);
20 void nvkm_bar_bar2_fini(struct nvkm_device *);
21 struct nvkm_vmm *nvkm_bar_bar2_vmm(struct nvkm_device *);
22 void nvkm_bar_flush(struct nvkm_bar *);
24 int nv50_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
25 int g84_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
26 int gf100_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
27 int gk20a_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
28 int gm107_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
29 int gm20b_bar_new(struct nvkm_device *, int, struct nvkm_bar **);
30 #endif