2019-06-20 00:13:43 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2013-12-22 15:51:16 +00:00
|
|
|
#ifndef __NVKM_BAR_PRIV_H__
|
|
|
|
#define __NVKM_BAR_PRIV_H__
|
2015-08-20 04:54:20 +00:00
|
|
|
#define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
|
2013-12-22 15:51:16 +00:00
|
|
|
#include <subdev/bar.h>
|
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
void nvkm_bar_ctor(const struct nvkm_bar_func *, struct nvkm_device *,
|
2020-12-04 00:46:32 +00:00
|
|
|
enum nvkm_subdev_type, int, struct nvkm_bar *);
|
2013-12-22 15:51:16 +00:00
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
struct nvkm_bar_func {
|
|
|
|
void *(*dtor)(struct nvkm_bar *);
|
|
|
|
int (*oneinit)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
void (*init)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
|
|
|
|
struct {
|
|
|
|
void (*init)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
void (*fini)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
void (*wait)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
struct nvkm_vmm *(*vmm)(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
} bar1, bar2;
|
2017-10-31 17:56:19 +00:00
|
|
|
|
2015-08-20 04:54:20 +00:00
|
|
|
void (*flush)(struct nvkm_bar *);
|
|
|
|
};
|
2013-12-22 15:51:16 +00:00
|
|
|
|
2017-10-31 17:56:19 +00:00
|
|
|
void nv50_bar_bar1_fini(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
void nv50_bar_bar2_fini(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
|
2015-01-14 04:35:35 +00:00
|
|
|
void g84_bar_flush(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
|
|
|
|
void gf100_bar_bar1_fini(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
void gf100_bar_bar2_fini(struct nvkm_bar *);
|
2017-10-31 17:56:19 +00:00
|
|
|
|
|
|
|
void gm107_bar_bar1_wait(struct nvkm_bar *);
|
2013-12-22 15:51:16 +00:00
|
|
|
#endif
|