forked from Minki/linux
drm/nouveau/gr/gk104-gk20a: call pmu to disable any power-gating before ctor()
On some of these chipsets, reading NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK can trigger a PRI fault and return an error code instead of a TPC mask, unless PGOB has been disabled first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
f02a0e849d
commit
ed22e68462
@ -124,6 +124,9 @@ void gf100_gr_dtor(struct nvkm_object *);
|
||||
int gf100_gr_init(struct nvkm_object *);
|
||||
void gf100_gr_zbc_init(struct gf100_gr_priv *);
|
||||
|
||||
int gk104_gr_ctor(struct nvkm_object *, struct nvkm_object *,
|
||||
struct nvkm_oclass *, void *data, u32 size,
|
||||
struct nvkm_object **);
|
||||
int gk104_gr_init(struct nvkm_object *);
|
||||
|
||||
extern struct nvkm_ofuncs gf100_fermi_ofuncs;
|
||||
|
@ -310,6 +310,17 @@ gk104_gr_init(struct nvkm_object *object)
|
||||
return gf100_gr_init_ctxctl(priv);
|
||||
}
|
||||
|
||||
int
|
||||
gk104_gr_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
|
||||
struct nvkm_oclass *oclass, void *data, u32 size,
|
||||
struct nvkm_object **pobject)
|
||||
{
|
||||
struct nvkm_pmu *pmu = nvkm_pmu(parent);
|
||||
if (pmu)
|
||||
pmu->pgob(pmu, false);
|
||||
return gf100_gr_ctor(parent, engine, oclass, data, size, pobject);
|
||||
}
|
||||
|
||||
#include "fuc/hubgk104.fuc3.h"
|
||||
|
||||
static struct gf100_gr_ucode
|
||||
@ -334,7 +345,7 @@ struct nvkm_oclass *
|
||||
gk104_gr_oclass = &(struct gf100_gr_oclass) {
|
||||
.base.handle = NV_ENGINE(GR, 0xe4),
|
||||
.base.ofuncs = &(struct nvkm_ofuncs) {
|
||||
.ctor = gf100_gr_ctor,
|
||||
.ctor = gk104_gr_ctor,
|
||||
.dtor = gf100_gr_dtor,
|
||||
.init = gk104_gr_init,
|
||||
.fini = _nvkm_gr_fini,
|
||||
|
@ -197,7 +197,7 @@ struct nvkm_oclass *
|
||||
gk110_gr_oclass = &(struct gf100_gr_oclass) {
|
||||
.base.handle = NV_ENGINE(GR, 0xf0),
|
||||
.base.ofuncs = &(struct nvkm_ofuncs) {
|
||||
.ctor = gf100_gr_ctor,
|
||||
.ctor = gk104_gr_ctor,
|
||||
.dtor = gf100_gr_dtor,
|
||||
.init = gk104_gr_init,
|
||||
.fini = _nvkm_gr_fini,
|
||||
|
@ -102,7 +102,7 @@ struct nvkm_oclass *
|
||||
gk110b_gr_oclass = &(struct gf100_gr_oclass) {
|
||||
.base.handle = NV_ENGINE(GR, 0xf1),
|
||||
.base.ofuncs = &(struct nvkm_ofuncs) {
|
||||
.ctor = gf100_gr_ctor,
|
||||
.ctor = gk104_gr_ctor,
|
||||
.dtor = gf100_gr_dtor,
|
||||
.init = gk104_gr_init,
|
||||
.fini = _nvkm_gr_fini,
|
||||
|
@ -176,7 +176,7 @@ struct nvkm_oclass *
|
||||
gk208_gr_oclass = &(struct gf100_gr_oclass) {
|
||||
.base.handle = NV_ENGINE(GR, 0x08),
|
||||
.base.ofuncs = &(struct nvkm_ofuncs) {
|
||||
.ctor = gf100_gr_ctor,
|
||||
.ctor = gk104_gr_ctor,
|
||||
.dtor = gf100_gr_dtor,
|
||||
.init = gk104_gr_init,
|
||||
.fini = _nvkm_gr_fini,
|
||||
|
Loading…
Reference in New Issue
Block a user