brintos

brintos / linux-shallow public Read only

0
0
Text · 1.4 KiB · 874a508 Raw
38 lines · c
1/* SPDX-License-Identifier: MIT */2#ifndef __NVKM_BAR_H__3#define __NVKM_BAR_H__4#include <core/subdev.h>5struct nvkm_vma;6 7struct nvkm_bar {8	const struct nvkm_bar_func *func;9	struct nvkm_subdev subdev;10 11	spinlock_t lock;12	bool bar2;13 14	void __iomem *flushBAR2PhysMode;15	struct nvkm_memory *flushFBZero;16	void __iomem *flushBAR2;17 18	/* whether the BAR supports to be ioremapped WC or should be uncached */19	bool iomap_uncached;20};21 22struct nvkm_vmm *nvkm_bar_bar1_vmm(struct nvkm_device *);23void nvkm_bar_bar1_reset(struct nvkm_device *);24void nvkm_bar_bar2_init(struct nvkm_device *);25void nvkm_bar_bar2_fini(struct nvkm_device *);26void nvkm_bar_bar2_reset(struct nvkm_device *);27struct nvkm_vmm *nvkm_bar_bar2_vmm(struct nvkm_device *);28void nvkm_bar_flush(struct nvkm_bar *);29 30int nv50_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);31int g84_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);32int gf100_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);33int gk20a_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);34int gm107_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);35int gm20b_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);36int tu102_bar_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);37#endif38