Loading drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +2 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: MIT */ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_TOP , struct nvkm_top , top) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GSP , struct nvkm_gsp , gsp) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VFN , struct nvkm_vfn , vfn) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_PCI , struct nvkm_pci , pci) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS , struct nvkm_bios , bios) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_DEVINIT , struct nvkm_devinit , devinit) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_TOP , struct nvkm_top , top) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_PRIVRING, struct nvkm_subdev , privring) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GPIO , struct nvkm_gpio , gpio) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_I2C , struct nvkm_i2c , i2c) Loading @@ -24,7 +25,6 @@ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VOLT , struct nvkm_volt , volt) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ICCSENSE, struct nvkm_iccsense, iccsense) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_THERM , struct nvkm_therm , therm) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_CLK , struct nvkm_clk , clk) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GSP , struct nvkm_gsp , gsp) NVKM_LAYOUT_INST(NVKM_SUBDEV_IOCTRL , struct nvkm_subdev , ioctrl, 3) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FLA , struct nvkm_subdev , fla) Loading drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h +2 −0 Original line number Diff line number Diff line Loading @@ -5,7 +5,9 @@ #include <core/falcon.h> struct nvkm_gsp { const struct nvkm_gsp_func *func; struct nvkm_subdev subdev; struct nvkm_falcon falcon; }; Loading drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c +3 −1 Original line number Diff line number Diff line Loading @@ -53,5 +53,7 @@ nvkm_gsp_new_(const struct nvkm_gsp_fwif *fwif, struct nvkm_device *device, if (IS_ERR(fwif)) return PTR_ERR(fwif); return nvkm_falcon_ctor(fwif->flcn, &gsp->subdev, gsp->subdev.name, 0, &gsp->falcon); gsp->func = fwif->func; return nvkm_falcon_ctor(gsp->func->flcn, &gsp->subdev, gsp->subdev.name, 0, &gsp->falcon); } drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c +8 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ gv100_gsp_flcn = { .disable = nvkm_falcon_v1_disable, }; static const struct nvkm_gsp_func gv100_gsp = { .flcn = &gv100_gsp_flcn, }; static int gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif) { Loading @@ -43,8 +48,8 @@ gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif) } static struct nvkm_gsp_fwif gv100_gsp[] = { { -1, gv100_gsp_nofw, &gv100_gsp_flcn }, gv100_gsps[] = { { -1, gv100_gsp_nofw, &gv100_gsp }, {} }; Loading @@ -52,5 +57,5 @@ int gv100_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_gsp **pgsp) { return nvkm_gsp_new_(gv100_gsp, device, type, inst, pgsp); return nvkm_gsp_new_(gv100_gsps, device, type, inst, pgsp); } drivers/gpu/drm/nouveau/nvkm/subdev/gsp/priv.h +5 −1 Original line number Diff line number Diff line Loading @@ -4,10 +4,14 @@ #include <subdev/gsp.h> enum nvkm_acr_lsf_id; struct nvkm_gsp_func { const struct nvkm_falcon_func *flcn; }; struct nvkm_gsp_fwif { int version; int (*load)(struct nvkm_gsp *, int ver, const struct nvkm_gsp_fwif *); const struct nvkm_falcon_func *flcn; const struct nvkm_gsp_func *func; }; int nvkm_gsp_new_(const struct nvkm_gsp_fwif *, struct nvkm_device *, enum nvkm_subdev_type, int, Loading Loading
drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +2 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: MIT */ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_TOP , struct nvkm_top , top) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GSP , struct nvkm_gsp , gsp) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VFN , struct nvkm_vfn , vfn) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_PCI , struct nvkm_pci , pci) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS , struct nvkm_bios , bios) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_DEVINIT , struct nvkm_devinit , devinit) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_TOP , struct nvkm_top , top) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_PRIVRING, struct nvkm_subdev , privring) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GPIO , struct nvkm_gpio , gpio) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_I2C , struct nvkm_i2c , i2c) Loading @@ -24,7 +25,6 @@ NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VOLT , struct nvkm_volt , volt) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ICCSENSE, struct nvkm_iccsense, iccsense) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_THERM , struct nvkm_therm , therm) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_CLK , struct nvkm_clk , clk) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_GSP , struct nvkm_gsp , gsp) NVKM_LAYOUT_INST(NVKM_SUBDEV_IOCTRL , struct nvkm_subdev , ioctrl, 3) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FLA , struct nvkm_subdev , fla) Loading
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h +2 −0 Original line number Diff line number Diff line Loading @@ -5,7 +5,9 @@ #include <core/falcon.h> struct nvkm_gsp { const struct nvkm_gsp_func *func; struct nvkm_subdev subdev; struct nvkm_falcon falcon; }; Loading
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c +3 −1 Original line number Diff line number Diff line Loading @@ -53,5 +53,7 @@ nvkm_gsp_new_(const struct nvkm_gsp_fwif *fwif, struct nvkm_device *device, if (IS_ERR(fwif)) return PTR_ERR(fwif); return nvkm_falcon_ctor(fwif->flcn, &gsp->subdev, gsp->subdev.name, 0, &gsp->falcon); gsp->func = fwif->func; return nvkm_falcon_ctor(gsp->func->flcn, &gsp->subdev, gsp->subdev.name, 0, &gsp->falcon); }
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c +8 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ gv100_gsp_flcn = { .disable = nvkm_falcon_v1_disable, }; static const struct nvkm_gsp_func gv100_gsp = { .flcn = &gv100_gsp_flcn, }; static int gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif) { Loading @@ -43,8 +48,8 @@ gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif) } static struct nvkm_gsp_fwif gv100_gsp[] = { { -1, gv100_gsp_nofw, &gv100_gsp_flcn }, gv100_gsps[] = { { -1, gv100_gsp_nofw, &gv100_gsp }, {} }; Loading @@ -52,5 +57,5 @@ int gv100_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_gsp **pgsp) { return nvkm_gsp_new_(gv100_gsp, device, type, inst, pgsp); return nvkm_gsp_new_(gv100_gsps, device, type, inst, pgsp); }
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/priv.h +5 −1 Original line number Diff line number Diff line Loading @@ -4,10 +4,14 @@ #include <subdev/gsp.h> enum nvkm_acr_lsf_id; struct nvkm_gsp_func { const struct nvkm_falcon_func *flcn; }; struct nvkm_gsp_fwif { int version; int (*load)(struct nvkm_gsp *, int ver, const struct nvkm_gsp_fwif *); const struct nvkm_falcon_func *flcn; const struct nvkm_gsp_func *func; }; int nvkm_gsp_new_(const struct nvkm_gsp_fwif *, struct nvkm_device *, enum nvkm_subdev_type, int, Loading