summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drm/nouveau/nvkm/subdev/pmu/gk104.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drm/nouveau/nvkm/subdev/pmu/gk104.c b/drm/nouveau/nvkm/subdev/pmu/gk104.c
index 28fdb8ea..242c094f 100644
--- a/drm/nouveau/nvkm/subdev/pmu/gk104.c
+++ b/drm/nouveau/nvkm/subdev/pmu/gk104.c
@@ -26,6 +26,21 @@
#include "priv.h"
#include "fuc/gf110.fuc4.h"
+#include <subdev/timer.h>
+
+static void
+magic(struct nvkm_pmu *pmu, u32 ctrl, int size)
+{
+ nv_wr32(pmu, 0x00c800, 0x00000000);
+ nv_wr32(pmu, 0x00c808, 0x00000000);
+ nv_wr32(pmu, 0x00c800, ctrl);
+ if (nv_wait(pmu, 0x00c800, 0x40000000, 0x40000000)) {
+ while (size--)
+ nv_wr32(pmu, 0x00c804, 0x00000000);
+ }
+ nv_wr32(pmu, 0x00c800, 0x00000000);
+}
+
static void
gk104_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
{
@@ -48,6 +63,15 @@ gk104_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
nv_mask(pmu, 0x000200, 0x08000000, 0x00000000);
nv_mask(pmu, 0x000200, 0x00001000, 0x00001000);
nv_rd32(pmu, 0x000200);
+
+ if (1) {
+ magic(pmu, 0x8200a41f, 6);
+ magic(pmu, 0x82000421, 1);
+ magic(pmu, 0x8400a41f, 6);
+ magic(pmu, 0x84000421, 1);
+ magic(pmu, 0x8a00a41f, 6);
+ magic(pmu, 0x8a000421, 1);
+ }
}
struct nvkm_oclass *