forked from Minki/linux
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: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
e1fc44fb9d
commit
f02a0e849d
@ -152,43 +152,6 @@ gk208_gr_pack_mmio[] = {
|
||||
* 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"
|
||||
|
||||
static struct gf100_gr_ucode
|
||||
@ -216,7 +179,7 @@ gk208_gr_oclass = &(struct gf100_gr_oclass) {
|
||||
.ctor = gf100_gr_ctor,
|
||||
.dtor = gf100_gr_dtor,
|
||||
.init = gk104_gr_init,
|
||||
.fini = gk208_gr_fini,
|
||||
.fini = _nvkm_gr_fini,
|
||||
},
|
||||
.cclass = &gk208_grctx_oclass,
|
||||
.sclass = gk208_gr_sclass,
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include <subdev/timer.h>
|
||||
|
||||
static void
|
||||
void
|
||||
gk110_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
|
||||
{
|
||||
static const struct {
|
||||
|
@ -37,4 +37,5 @@ gk208_pmu_oclass = &(struct nvkm_pmu_impl) {
|
||||
.code.size = sizeof(gk208_pmu_code),
|
||||
.data.data = gk208_pmu_data,
|
||||
.data.size = sizeof(gk208_pmu_data),
|
||||
.pgob = gk110_pmu_pgob,
|
||||
}.base;
|
||||
|
@ -40,4 +40,6 @@ struct nvkm_pmu_impl {
|
||||
|
||||
void (*pgob)(struct nvkm_pmu *, bool);
|
||||
};
|
||||
|
||||
void gk110_pmu_pgob(struct nvkm_pmu *, bool);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user