Commit 6f0add0a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/gr/gf100-: use nvkm_blob structure for fecs/gpccs fw

It serves the exact same purpose.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 2952a2b4
...@@ -1636,7 +1636,7 @@ gf100_gr_intr(struct nvkm_gr *base) ...@@ -1636,7 +1636,7 @@ gf100_gr_intr(struct nvkm_gr *base)
static void static void
gf100_gr_init_fw(struct nvkm_falcon *falcon, gf100_gr_init_fw(struct nvkm_falcon *falcon,
struct gf100_gr_fuc *code, struct gf100_gr_fuc *data) struct nvkm_blob *code, struct nvkm_blob *data)
{ {
nvkm_falcon_load_dmem(falcon, data->data, 0x0, data->size, 0); nvkm_falcon_load_dmem(falcon, data->data, 0x0, data->size, 0);
nvkm_falcon_load_imem(falcon, code->data, 0x0, code->size, 0, 0, false); nvkm_falcon_load_imem(falcon, code->data, 0x0, code->size, 0, 0, false);
...@@ -2013,13 +2013,6 @@ gf100_gr_fini_(struct nvkm_gr *base, bool suspend) ...@@ -2013,13 +2013,6 @@ gf100_gr_fini_(struct nvkm_gr *base, bool suspend)
return 0; return 0;
} }
void
gf100_gr_dtor_fw(struct gf100_gr_fuc *fuc)
{
kfree(fuc->data);
fuc->data = NULL;
}
static void static void
gf100_gr_dtor_init(struct gf100_gr_pack *pack) gf100_gr_dtor_init(struct gf100_gr_pack *pack)
{ {
...@@ -2036,10 +2029,10 @@ gf100_gr_dtor(struct nvkm_gr *base) ...@@ -2036,10 +2029,10 @@ gf100_gr_dtor(struct nvkm_gr *base)
nvkm_falcon_del(&gr->gpccs.falcon); nvkm_falcon_del(&gr->gpccs.falcon);
nvkm_falcon_del(&gr->fecs.falcon); nvkm_falcon_del(&gr->fecs.falcon);
gf100_gr_dtor_fw(&gr->fuc409c); nvkm_blob_dtor(&gr->fuc409c);
gf100_gr_dtor_fw(&gr->fuc409d); nvkm_blob_dtor(&gr->fuc409d);
gf100_gr_dtor_fw(&gr->fuc41ac); nvkm_blob_dtor(&gr->fuc41ac);
gf100_gr_dtor_fw(&gr->fuc41ad); nvkm_blob_dtor(&gr->fuc41ad);
gf100_gr_dtor_init(gr->fuc_bundle); gf100_gr_dtor_init(gr->fuc_bundle);
gf100_gr_dtor_init(gr->fuc_method); gf100_gr_dtor_init(gr->fuc_method);
...@@ -2067,7 +2060,7 @@ gf100_gr_ = { ...@@ -2067,7 +2060,7 @@ gf100_gr_ = {
int int
gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname, gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname,
struct gf100_gr_fuc *fuc, int ret) struct nvkm_blob *fuc, int ret)
{ {
struct nvkm_subdev *subdev = &gr->base.engine.subdev; struct nvkm_subdev *subdev = &gr->base.engine.subdev;
struct nvkm_device *device = subdev->device; struct nvkm_device *device = subdev->device;
...@@ -2111,7 +2104,7 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname, ...@@ -2111,7 +2104,7 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname,
int int
gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname, gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname,
struct gf100_gr_fuc *fuc) struct nvkm_blob *fuc)
{ {
const struct firmware *fw; const struct firmware *fw;
int ret; int ret;
......
...@@ -55,11 +55,6 @@ struct gf100_gr_mmio { ...@@ -55,11 +55,6 @@ struct gf100_gr_mmio {
int buffer; int buffer;
}; };
struct gf100_gr_fuc {
u32 *data;
u32 size;
};
struct gf100_gr_zbc_color { struct gf100_gr_zbc_color {
u32 format; u32 format;
u32 ds[4]; u32 ds[4];
...@@ -92,10 +87,10 @@ struct gf100_gr { ...@@ -92,10 +87,10 @@ struct gf100_gr {
struct nvkm_falcon *falcon; struct nvkm_falcon *falcon;
} gpccs; } gpccs;
struct gf100_gr_fuc fuc409c; struct nvkm_blob fuc409c;
struct gf100_gr_fuc fuc409d; struct nvkm_blob fuc409d;
struct gf100_gr_fuc fuc41ac; struct nvkm_blob fuc41ac;
struct gf100_gr_fuc fuc41ad; struct nvkm_blob fuc41ad;
bool firmware; bool firmware;
/* /*
...@@ -269,9 +264,8 @@ struct gf100_gr_chan { ...@@ -269,9 +264,8 @@ struct gf100_gr_chan {
void gf100_gr_ctxctl_debug(struct gf100_gr *); void gf100_gr_ctxctl_debug(struct gf100_gr *);
void gf100_gr_dtor_fw(struct gf100_gr_fuc *);
int gf100_gr_ctor_fw(struct gf100_gr *, const char *, int gf100_gr_ctor_fw(struct gf100_gr *, const char *,
struct gf100_gr_fuc *); struct nvkm_blob *);
u64 gf100_gr_units(struct nvkm_gr *); u64 gf100_gr_units(struct nvkm_gr *);
void gf100_gr_zbc_init(struct gf100_gr *); void gf100_gr_zbc_init(struct gf100_gr *);
...@@ -294,8 +288,8 @@ struct gf100_gr_pack { ...@@ -294,8 +288,8 @@ struct gf100_gr_pack {
for (init = pack->init; init && init->count; init++) for (init = pack->init; init && init->count; init++)
struct gf100_gr_ucode { struct gf100_gr_ucode {
struct gf100_gr_fuc code; struct nvkm_blob code;
struct gf100_gr_fuc data; struct nvkm_blob data;
}; };
extern struct gf100_gr_ucode gf100_gr_fecs_ucode; extern struct gf100_gr_ucode gf100_gr_fecs_ucode;
......
...@@ -36,7 +36,7 @@ int ...@@ -36,7 +36,7 @@ int
gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name, gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack) struct gf100_gr_pack **ppack)
{ {
struct gf100_gr_fuc fuc; struct nvkm_blob fuc;
struct gf100_gr_init *init; struct gf100_gr_init *init;
struct gf100_gr_pack *pack; struct gf100_gr_pack *pack;
int nent; int nent;
...@@ -70,7 +70,7 @@ gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name, ...@@ -70,7 +70,7 @@ gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name,
*ppack = pack; *ppack = pack;
end: end:
gf100_gr_dtor_fw(&fuc); nvkm_blob_dtor(&fuc);
return ret; return ret;
} }
...@@ -85,7 +85,7 @@ int ...@@ -85,7 +85,7 @@ int
gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name, gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack) struct gf100_gr_pack **ppack)
{ {
struct gf100_gr_fuc fuc; struct nvkm_blob fuc;
struct gf100_gr_init *init; struct gf100_gr_init *init;
struct gf100_gr_pack *pack; struct gf100_gr_pack *pack;
int nent; int nent;
...@@ -119,7 +119,7 @@ gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name, ...@@ -119,7 +119,7 @@ gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name,
*ppack = pack; *ppack = pack;
end: end:
gf100_gr_dtor_fw(&fuc); nvkm_blob_dtor(&fuc);
return ret; return ret;
} }
...@@ -127,7 +127,7 @@ int ...@@ -127,7 +127,7 @@ int
gk20a_gr_av_to_method(struct gf100_gr *gr, const char *fw_name, gk20a_gr_av_to_method(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack) struct gf100_gr_pack **ppack)
{ {
struct gf100_gr_fuc fuc; struct nvkm_blob fuc;
struct gf100_gr_init *init; struct gf100_gr_init *init;
struct gf100_gr_pack *pack; struct gf100_gr_pack *pack;
/* We don't suppose we will initialize more than 16 classes here... */ /* We don't suppose we will initialize more than 16 classes here... */
...@@ -179,7 +179,7 @@ gk20a_gr_av_to_method(struct gf100_gr *gr, const char *fw_name, ...@@ -179,7 +179,7 @@ gk20a_gr_av_to_method(struct gf100_gr *gr, const char *fw_name,
*ppack = pack; *ppack = pack;
end: end:
gf100_gr_dtor_fw(&fuc); nvkm_blob_dtor(&fuc);
return ret; return ret;
} }
......
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