Commit d2753f40 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

drm/nouveau/gr: add fini() hook

Add a fini() hook to the GR engine. This will be used by gf100+ to
properly release the FECS and GPCCS falcons.
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d72fb36c
...@@ -106,6 +106,15 @@ nvkm_gr_init(struct nvkm_engine *engine) ...@@ -106,6 +106,15 @@ nvkm_gr_init(struct nvkm_engine *engine)
return gr->func->init(gr); return gr->func->init(gr);
} }
static int
nvkm_gr_fini(struct nvkm_engine *engine, bool suspend)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->fini)
return gr->func->fini(gr, suspend);
return 0;
}
static void * static void *
nvkm_gr_dtor(struct nvkm_engine *engine) nvkm_gr_dtor(struct nvkm_engine *engine)
{ {
...@@ -120,6 +129,7 @@ nvkm_gr = { ...@@ -120,6 +129,7 @@ nvkm_gr = {
.dtor = nvkm_gr_dtor, .dtor = nvkm_gr_dtor,
.oneinit = nvkm_gr_oneinit, .oneinit = nvkm_gr_oneinit,
.init = nvkm_gr_init, .init = nvkm_gr_init,
.fini = nvkm_gr_fini,
.intr = nvkm_gr_intr, .intr = nvkm_gr_intr,
.tile = nvkm_gr_tile, .tile = nvkm_gr_tile,
.fifo.cclass = nvkm_gr_cclass_new, .fifo.cclass = nvkm_gr_cclass_new,
......
...@@ -15,6 +15,7 @@ struct nvkm_gr_func { ...@@ -15,6 +15,7 @@ struct nvkm_gr_func {
void *(*dtor)(struct nvkm_gr *); void *(*dtor)(struct nvkm_gr *);
int (*oneinit)(struct nvkm_gr *); int (*oneinit)(struct nvkm_gr *);
int (*init)(struct nvkm_gr *); int (*init)(struct nvkm_gr *);
int (*fini)(struct nvkm_gr *, bool);
void (*intr)(struct nvkm_gr *); void (*intr)(struct nvkm_gr *);
void (*tile)(struct nvkm_gr *, int region, struct nvkm_fb_tile *); void (*tile)(struct nvkm_gr *, int region, struct nvkm_fb_tile *);
int (*tlb_flush)(struct nvkm_gr *); int (*tlb_flush)(struct nvkm_gr *);
......
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