Commit fb0a5bbe authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/flcn: specify FBIF offset from subdev

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 10e43bfd
......@@ -78,6 +78,9 @@ struct nvkm_falcon_func {
} data;
void (*init)(struct nvkm_falcon *);
void (*intr)(struct nvkm_falcon *, struct nvkm_fifo_chan *);
u32 fbif;
void (*load_imem)(struct nvkm_falcon *, void *, u32, u32, u16, u8, bool);
void (*load_dmem)(struct nvkm_falcon *, void *, u32, u32, u8);
void (*read_dmem)(struct nvkm_falcon *, u32, u32, u8, void *);
......
......@@ -2045,6 +2045,7 @@ gf100_gr_ = {
static const struct nvkm_falcon_func
gf100_gr_flcn = {
.fbif = 0x600,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -23,6 +23,7 @@
static const struct nvkm_falcon_func
gm107_nvdec_flcn = {
.fbif = 0x600,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -24,6 +24,7 @@
static const struct nvkm_falcon_func
gm107_nvenc_flcn = {
.fbif = 0x800,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -48,6 +48,7 @@ gp102_sec2_intr(struct nvkm_sec2 *sec2)
static const struct nvkm_falcon_func
gp102_sec2_flcn = {
.fbif = 0x600,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -23,6 +23,7 @@
static const struct nvkm_falcon_func
tu102_sec2_flcn = {
.fbif = 0x600,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -183,8 +183,8 @@ void
nvkm_falcon_v1_bind_context(struct nvkm_falcon *falcon, struct nvkm_memory *ctx)
{
struct nvkm_device *device = falcon->owner->device;
const u32 fbif = falcon->func->fbif;
u32 inst_loc;
u32 fbif;
/* disable instance block binding */
if (ctx == NULL) {
......@@ -192,20 +192,6 @@ nvkm_falcon_v1_bind_context(struct nvkm_falcon *falcon, struct nvkm_memory *ctx)
return;
}
switch (falcon->owner->index) {
case NVKM_ENGINE_NVENC0:
case NVKM_ENGINE_NVENC1:
case NVKM_ENGINE_NVENC2:
fbif = 0x800;
break;
case NVKM_SUBDEV_PMU:
fbif = 0xe00;
break;
default:
fbif = 0x600;
break;
}
nvkm_falcon_wr32(falcon, 0x10c, 0x1);
/* setup apertures - virtual */
......
......@@ -23,6 +23,7 @@
static const struct nvkm_falcon_func
gv100_gsp_flcn = {
.fbif = 0x600,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
......@@ -243,6 +243,7 @@ gt215_pmu_init(struct nvkm_pmu *pmu)
const struct nvkm_falcon_func
gt215_pmu_flcn = {
.fbif = 0xe00,
.load_imem = nvkm_falcon_v1_load_imem,
.load_dmem = nvkm_falcon_v1_load_dmem,
.read_dmem = nvkm_falcon_v1_read_dmem,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment