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)
static void
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_imem(falcon, code->data, 0x0, code->size, 0, 0, false);
......@@ -2013,13 +2013,6 @@ gf100_gr_fini_(struct nvkm_gr *base, bool suspend)
return 0;
}
void
gf100_gr_dtor_fw(struct gf100_gr_fuc *fuc)
{
kfree(fuc->data);
fuc->data = NULL;
}
static void
gf100_gr_dtor_init(struct gf100_gr_pack *pack)
{
......@@ -2036,10 +2029,10 @@ gf100_gr_dtor(struct nvkm_gr *base)
nvkm_falcon_del(&gr->gpccs.falcon);
nvkm_falcon_del(&gr->fecs.falcon);
gf100_gr_dtor_fw(&gr->fuc409c);
gf100_gr_dtor_fw(&gr->fuc409d);
gf100_gr_dtor_fw(&gr->fuc41ac);
gf100_gr_dtor_fw(&gr->fuc41ad);
nvkm_blob_dtor(&gr->fuc409c);
nvkm_blob_dtor(&gr->fuc409d);
nvkm_blob_dtor(&gr->fuc41ac);
nvkm_blob_dtor(&gr->fuc41ad);
gf100_gr_dtor_init(gr->fuc_bundle);
gf100_gr_dtor_init(gr->fuc_method);
......@@ -2067,7 +2060,7 @@ gf100_gr_ = {
int
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_device *device = subdev->device;
......@@ -2111,7 +2104,7 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname,
int
gf100_gr_ctor_fw(struct gf100_gr *gr, const char *fwname,
struct gf100_gr_fuc *fuc)
struct nvkm_blob *fuc)
{
const struct firmware *fw;
int ret;
......
......@@ -55,11 +55,6 @@ struct gf100_gr_mmio {
int buffer;
};
struct gf100_gr_fuc {
u32 *data;
u32 size;
};
struct gf100_gr_zbc_color {
u32 format;
u32 ds[4];
......@@ -92,10 +87,10 @@ struct gf100_gr {
struct nvkm_falcon *falcon;
} gpccs;
struct gf100_gr_fuc fuc409c;
struct gf100_gr_fuc fuc409d;
struct gf100_gr_fuc fuc41ac;
struct gf100_gr_fuc fuc41ad;
struct nvkm_blob fuc409c;
struct nvkm_blob fuc409d;
struct nvkm_blob fuc41ac;
struct nvkm_blob fuc41ad;
bool firmware;
/*
......@@ -269,9 +264,8 @@ struct gf100_gr_chan {
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 *,
struct gf100_gr_fuc *);
struct nvkm_blob *);
u64 gf100_gr_units(struct nvkm_gr *);
void gf100_gr_zbc_init(struct gf100_gr *);
......@@ -294,8 +288,8 @@ struct gf100_gr_pack {
for (init = pack->init; init && init->count; init++)
struct gf100_gr_ucode {
struct gf100_gr_fuc code;
struct gf100_gr_fuc data;
struct nvkm_blob code;
struct nvkm_blob data;
};
extern struct gf100_gr_ucode gf100_gr_fecs_ucode;
......
......@@ -36,7 +36,7 @@ int
gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack)
{
struct gf100_gr_fuc fuc;
struct nvkm_blob fuc;
struct gf100_gr_init *init;
struct gf100_gr_pack *pack;
int nent;
......@@ -70,7 +70,7 @@ gk20a_gr_av_to_init(struct gf100_gr *gr, const char *fw_name,
*ppack = pack;
end:
gf100_gr_dtor_fw(&fuc);
nvkm_blob_dtor(&fuc);
return ret;
}
......@@ -85,7 +85,7 @@ int
gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack)
{
struct gf100_gr_fuc fuc;
struct nvkm_blob fuc;
struct gf100_gr_init *init;
struct gf100_gr_pack *pack;
int nent;
......@@ -119,7 +119,7 @@ gk20a_gr_aiv_to_init(struct gf100_gr *gr, const char *fw_name,
*ppack = pack;
end:
gf100_gr_dtor_fw(&fuc);
nvkm_blob_dtor(&fuc);
return ret;
}
......@@ -127,7 +127,7 @@ int
gk20a_gr_av_to_method(struct gf100_gr *gr, const char *fw_name,
struct gf100_gr_pack **ppack)
{
struct gf100_gr_fuc fuc;
struct nvkm_blob fuc;
struct gf100_gr_init *init;
struct gf100_gr_pack *pack;
/* 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,
*ppack = pack;
end:
gf100_gr_dtor_fw(&fuc);
nvkm_blob_dtor(&fuc);
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