diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-01-14 23:34:21 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-01-15 03:50:26 +0300 |
commit | 00e1b5dcf76648e7e0de9f56358fee86263df1ca (patch) | |
tree | 95c64574cbfe28f1da0cb8e034a2c14195c5ba4b /drivers | |
parent | 0033f15b44bc29ec6fe5b58de18d801c3de74c88 (diff) | |
download | linux-00e1b5dcf76648e7e0de9f56358fee86263df1ca.tar.xz |
drm/nouveau/gr/gf100-: move fecs/gpccs ucode into their substructures
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 22 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 8 |
4 files changed, 25 insertions, 22 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index f0925d40e6fe..8ee193b6224f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -1701,12 +1701,14 @@ gf100_gr_init_ctxctl_ext(struct gf100_gr *gr) if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_FECS)) secboot_mask |= BIT(NVKM_SECBOOT_FALCON_FECS); else - gf100_gr_init_fw(gr->fecs.falcon, &gr->fuc409c, &gr->fuc409d); + gf100_gr_init_fw(gr->fecs.falcon, &gr->fecs.inst, + &gr->fecs.data); if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_GPCCS)) secboot_mask |= BIT(NVKM_SECBOOT_FALCON_GPCCS); else - gf100_gr_init_fw(gr->gpccs.falcon, &gr->fuc41ac, &gr->fuc41ad); + gf100_gr_init_fw(gr->gpccs.falcon, &gr->gpccs.inst, + &gr->gpccs.data); if (secboot_mask != 0) { int ret = nvkm_secboot_reset(sb, secboot_mask); @@ -2023,10 +2025,10 @@ gf100_gr_dtor(struct nvkm_gr *base) nvkm_falcon_del(&gr->gpccs.falcon); nvkm_falcon_del(&gr->fecs.falcon); - nvkm_blob_dtor(&gr->fuc409c); - nvkm_blob_dtor(&gr->fuc409d); - nvkm_blob_dtor(&gr->fuc41ac); - nvkm_blob_dtor(&gr->fuc41ad); + nvkm_blob_dtor(&gr->fecs.inst); + nvkm_blob_dtor(&gr->fecs.data); + nvkm_blob_dtor(&gr->gpccs.inst); + nvkm_blob_dtor(&gr->gpccs.data); vfree(gr->bundle); vfree(gr->method); @@ -2146,10 +2148,10 @@ gf100_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device, return ret; if (gr->firmware) { - if (gf100_gr_ctor_fw(gr, "fecs_inst", &gr->fuc409c) || - gf100_gr_ctor_fw(gr, "fecs_data", &gr->fuc409d) || - gf100_gr_ctor_fw(gr, "gpccs_inst", &gr->fuc41ac) || - gf100_gr_ctor_fw(gr, "gpccs_data", &gr->fuc41ad)) + if (gf100_gr_ctor_fw(gr, "fecs_inst", &gr->fecs.inst) || + gf100_gr_ctor_fw(gr, "fecs_data", &gr->fecs.data) || + gf100_gr_ctor_fw(gr, "gpccs_inst", &gr->gpccs.inst) || + gf100_gr_ctor_fw(gr, "gpccs_data", &gr->gpccs.data)) return -ENODEV; } diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h index bece3c753433..c048a87ee4df 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h @@ -79,18 +79,19 @@ struct gf100_gr { struct { struct nvkm_falcon *falcon; + struct nvkm_blob inst; + struct nvkm_blob data; + struct mutex mutex; u32 disable; } fecs; struct { struct nvkm_falcon *falcon; + struct nvkm_blob inst; + struct nvkm_blob data; } gpccs; - struct nvkm_blob fuc409c; - struct nvkm_blob fuc409d; - struct nvkm_blob fuc41ac; - struct nvkm_blob fuc41ad; bool firmware; /* diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c index a6ee5d61e715..2ee733984407 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c @@ -333,10 +333,10 @@ gk20a_gr_new(struct nvkm_device *device, int index, struct nvkm_gr **pgr) if (ret) return ret; - if (gf100_gr_ctor_fw(gr, "fecs_inst", &gr->fuc409c) || - gf100_gr_ctor_fw(gr, "fecs_data", &gr->fuc409d) || - gf100_gr_ctor_fw(gr, "gpccs_inst", &gr->fuc41ac) || - gf100_gr_ctor_fw(gr, "gpccs_data", &gr->fuc41ad)) + if (gf100_gr_ctor_fw(gr, "fecs_inst", &gr->fecs.inst) || + gf100_gr_ctor_fw(gr, "fecs_data", &gr->fecs.data) || + gf100_gr_ctor_fw(gr, "gpccs_inst", &gr->gpccs.inst) || + gf100_gr_ctor_fw(gr, "gpccs_data", &gr->gpccs.data)) return -ENODEV; ret = gk20a_gr_load_sw(gr, "", 0); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c index 775ada042b3e..085f5e32a3d9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c @@ -142,14 +142,14 @@ gm200_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device, /* Load firmwares for non-secure falcons */ if (!nvkm_secboot_is_managed(device->secboot, NVKM_SECBOOT_FALCON_FECS)) { - if ((ret = gf100_gr_ctor_fw(gr, "gr/fecs_inst", &gr->fuc409c)) || - (ret = gf100_gr_ctor_fw(gr, "gr/fecs_data", &gr->fuc409d))) + if ((ret = gf100_gr_ctor_fw(gr, "gr/fecs_inst", &gr->fecs.inst)) || + (ret = gf100_gr_ctor_fw(gr, "gr/fecs_data", &gr->fecs.data))) return ret; } if (!nvkm_secboot_is_managed(device->secboot, NVKM_SECBOOT_FALCON_GPCCS)) { - if ((ret = gf100_gr_ctor_fw(gr, "gr/gpccs_inst", &gr->fuc41ac)) || - (ret = gf100_gr_ctor_fw(gr, "gr/gpccs_data", &gr->fuc41ad))) + if ((ret = gf100_gr_ctor_fw(gr, "gr/gpccs_inst", &gr->gpccs.inst)) || + (ret = gf100_gr_ctor_fw(gr, "gr/gpccs_data", &gr->gpccs.data))) return ret; } |