Commit f02a0e84 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/pmu/gk208: implement gr power-up magic with gk110_pmu_pgob()

Before we moved gk110's implementation of this to pmu, the functions were
identical.  This commit just switches GK208 to use the new (more complete)
implementation of the power-up sequence.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent e1fc44fb
...@@ -152,43 +152,6 @@ gk208_gr_pack_mmio[] = { ...@@ -152,43 +152,6 @@ gk208_gr_pack_mmio[] = {
* PGRAPH engine/subdev functions * PGRAPH engine/subdev functions
******************************************************************************/ ******************************************************************************/
static int
gk208_gr_fini(struct nvkm_object *object, bool suspend)
{
struct gf100_gr_priv *priv = (void *)object;
static const struct {
u32 addr;
u32 data;
} magic[] = {
{ 0x020520, 0xfffffffc },
{ 0x020524, 0xfffffffe },
{ 0x020524, 0xfffffffc },
{ 0x020524, 0xfffffff8 },
{ 0x020524, 0xffffffe0 },
{ 0x020530, 0xfffffffe },
{ 0x02052c, 0xfffffffa },
{ 0x02052c, 0xfffffff0 },
{ 0x02052c, 0xffffffc0 },
{ 0x02052c, 0xffffff00 },
{ 0x02052c, 0xfffffc00 },
{ 0x02052c, 0xfffcfc00 },
{ 0x02052c, 0xfff0fc00 },
{ 0x02052c, 0xff80fc00 },
{ 0x020528, 0xfffffffe },
{ 0x020528, 0xfffffffc },
};
int i;
nv_mask(priv, 0x000200, 0x08001000, 0x00000000);
nv_mask(priv, 0x0206b4, 0x00000000, 0x00000000);
for (i = 0; i < ARRAY_SIZE(magic); i++) {
nv_wr32(priv, magic[i].addr, magic[i].data);
nv_wait(priv, magic[i].addr, 0x80000000, 0x00000000);
}
return nvkm_gr_fini(&priv->base, suspend);
}
#include "fuc/hubgk208.fuc5.h" #include "fuc/hubgk208.fuc5.h"
static struct gf100_gr_ucode static struct gf100_gr_ucode
...@@ -216,7 +179,7 @@ gk208_gr_oclass = &(struct gf100_gr_oclass) { ...@@ -216,7 +179,7 @@ gk208_gr_oclass = &(struct gf100_gr_oclass) {
.ctor = gf100_gr_ctor, .ctor = gf100_gr_ctor,
.dtor = gf100_gr_dtor, .dtor = gf100_gr_dtor,
.init = gk104_gr_init, .init = gk104_gr_init,
.fini = gk208_gr_fini, .fini = _nvkm_gr_fini,
}, },
.cclass = &gk208_grctx_oclass, .cclass = &gk208_grctx_oclass,
.sclass = gk208_gr_sclass, .sclass = gk208_gr_sclass,
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <subdev/timer.h> #include <subdev/timer.h>
static void void
gk110_pmu_pgob(struct nvkm_pmu *pmu, bool enable) gk110_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
{ {
static const struct { static const struct {
......
...@@ -37,4 +37,5 @@ gk208_pmu_oclass = &(struct nvkm_pmu_impl) { ...@@ -37,4 +37,5 @@ gk208_pmu_oclass = &(struct nvkm_pmu_impl) {
.code.size = sizeof(gk208_pmu_code), .code.size = sizeof(gk208_pmu_code),
.data.data = gk208_pmu_data, .data.data = gk208_pmu_data,
.data.size = sizeof(gk208_pmu_data), .data.size = sizeof(gk208_pmu_data),
.pgob = gk110_pmu_pgob,
}.base; }.base;
...@@ -40,4 +40,6 @@ struct nvkm_pmu_impl { ...@@ -40,4 +40,6 @@ struct nvkm_pmu_impl {
void (*pgob)(struct nvkm_pmu *, bool); void (*pgob)(struct nvkm_pmu *, bool);
}; };
void gk110_pmu_pgob(struct nvkm_pmu *, bool);
#endif #endif
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