linux/drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h
Ben Skeggs 5bf0257136 drm/nouveau/mmu/r535: initial support
- Valid VRAM regions are read from GSP-RM, and used to construct our MM
- BAR1/BAR2 VMMs modified to be shared with RM
- Client VMMs have RM VASPACE objects created for them
- Adds FBSR to backup system objects in VRAM across suspend

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-37-skeggsb@gmail.com
2023-10-31 15:08:16 +10:00

37 lines
1 KiB
C

/* SPDX-License-Identifier: MIT */
#ifndef __NVKM_BAR_PRIV_H__
#define __NVKM_BAR_PRIV_H__
#define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
#include <subdev/bar.h>
int r535_bar_new_(const struct nvkm_bar_func *,
struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_bar **);
void nvkm_bar_ctor(const struct nvkm_bar_func *, struct nvkm_device *,
enum nvkm_subdev_type, int, struct nvkm_bar *);
struct nvkm_bar_func {
void *(*dtor)(struct nvkm_bar *);
int (*oneinit)(struct nvkm_bar *);
void (*init)(struct nvkm_bar *);
struct {
void (*init)(struct nvkm_bar *);
void (*fini)(struct nvkm_bar *);
void (*wait)(struct nvkm_bar *);
struct nvkm_vmm *(*vmm)(struct nvkm_bar *);
} bar1, bar2;
void (*flush)(struct nvkm_bar *);
};
void nv50_bar_bar1_fini(struct nvkm_bar *);
void nv50_bar_bar2_fini(struct nvkm_bar *);
void g84_bar_flush(struct nvkm_bar *);
void gf100_bar_bar1_fini(struct nvkm_bar *);
void gf100_bar_bar2_fini(struct nvkm_bar *);
void gm107_bar_bar1_wait(struct nvkm_bar *);
#endif