* [PATCH v2 0/4] PMU engine counters
@ 2016-02-16 16:54 Karol Herbst
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Karol Herbst @ 2016-02-16 16:54 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
these are usually used for dynamic reclocking on gt215 and newer
The counters are used to get the load of the core, memory, video and pcie loads
currently I expose the loads through a debugfs "current_load" file, but I want
to move that to nvif and just add a wrapper around that in debugfs for
convenience. Using nvif would have the advantage, that userspace tools can
easily get loads without requiring root access.
Karol Herbst (4):
subdev/pmu/fuc: add gk104
pmu/fuc: add macros for pdaemon pwr counters
subdev/pmu/fuc: implement counter readout
nouveau/debugfs: add interface for current load
drm/nouveau/include/nvif/device.h | 1 +
drm/nouveau/include/nvkm/subdev/pmu.h | 10 +
drm/nouveau/nouveau_debugfs.c | 23 +
drm/nouveau/nvkm/subdev/pmu/base.c | 18 +
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 411 +++---
drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 745 +++++-----
drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4 | 70 +
drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h | 1866 ++++++++++++++++++++++++++
drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 725 ++++++----
drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 732 ++++++----
drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 25 +
drm/nouveau/nvkm/subdev/pmu/fuc/os.h | 10 +
drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc | 156 +++
drm/nouveau/nvkm/subdev/pmu/gk104.c | 4 +-
drm/nouveau/nvkm/subdev/pmu/gk110.c | 6 +-
15 files changed, 3699 insertions(+), 1103 deletions(-)
create mode 100644 drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4
create mode 100644 drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
--
2.7.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/4] subdev/pmu/fuc: add gk104
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
@ 2016-02-16 16:54 ` Karol Herbst
2016-02-16 16:54 ` [PATCH v2 2/4] pmu/fuc: add macros for pdaemon pwr counters Karol Herbst
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Karol Herbst @ 2016-02-16 16:54 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
we need this, because since kepler there is PCOPY2 and this is needed for the counters later in this series
NOTE: gk104.fuc4 is just a copy or gf119.fuc4, so the copyright stays the same
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
---
drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4 | 70 +
drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h | 1793 ++++++++++++++++++++++++++
drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 1 +
drm/nouveau/nvkm/subdev/pmu/gk104.c | 4 +-
drm/nouveau/nvkm/subdev/pmu/gk110.c | 6 +-
5 files changed, 1868 insertions(+), 6 deletions(-)
create mode 100644 drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4
create mode 100644 drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4 b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4
new file mode 100644
index 0000000..01e37ce
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2013 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Ben Skeggs
+ */
+
+#define NVKM_PPWR_CHIPSET GK104
+#define HW_TICKS_PER_US 324
+
+//#define NVKM_FALCON_PC24
+#define NVKM_FALCON_UNSHIFTED_IO
+//#define NVKM_FALCON_MMIO_UAS
+//#define NVKM_FALCON_MMIO_TRAP
+
+#include "macros.fuc"
+
+.section #gk104_pmu_data
+#define INCLUDE_PROC
+#include "kernel.fuc"
+#include "arith.fuc"
+#include "host.fuc"
+#include "memx.fuc"
+#include "perf.fuc"
+#include "i2c_.fuc"
+#include "test.fuc"
+#include "idle.fuc"
+#undef INCLUDE_PROC
+
+#define INCLUDE_DATA
+#include "kernel.fuc"
+#include "arith.fuc"
+#include "host.fuc"
+#include "memx.fuc"
+#include "perf.fuc"
+#include "i2c_.fuc"
+#include "test.fuc"
+#include "idle.fuc"
+#undef INCLUDE_DATA
+.align 256
+
+.section #gk104_pmu_code
+#define INCLUDE_CODE
+#include "kernel.fuc"
+#include "arith.fuc"
+#include "host.fuc"
+#include "memx.fuc"
+#include "perf.fuc"
+#include "i2c_.fuc"
+#include "test.fuc"
+#include "idle.fuc"
+#undef INCLUDE_CODE
+.align 256
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
new file mode 100644
index 0000000..61893b1
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
@@ -0,0 +1,1793 @@
+uint32_t gk104_pmu_data[] = {
+/* 0x0000: proc_kern */
+ 0x52544e49,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x0058: proc_list_head */
+ 0x54534f48,
+ 0x00000492,
+ 0x0000043b,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x584d454d,
+ 0x00000680,
+ 0x00000672,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x46524550,
+ 0x00000684,
+ 0x00000682,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x5f433249,
+ 0x00000a9f,
+ 0x00000942,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x54534554,
+ 0x00000ac2,
+ 0x00000aa1,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x454c4449,
+ 0x00000ace,
+ 0x00000acc,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x0268: proc_list_tail */
+/* 0x0268: time_prev */
+ 0x00000000,
+/* 0x026c: time_next */
+ 0x00000000,
+/* 0x0270: fifo_queue */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x02f0: rfifo_queue */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x0370: memx_func_head */
+ 0x00000001,
+ 0x00000000,
+ 0x000004c8,
+/* 0x037c: memx_func_next */
+ 0x00000002,
+ 0x00000000,
+ 0x00000549,
+ 0x00000003,
+ 0x00000002,
+ 0x000005cd,
+ 0x00040004,
+ 0x00000000,
+ 0x000005e9,
+ 0x00010005,
+ 0x00000000,
+ 0x00000603,
+ 0x00010006,
+ 0x00000000,
+ 0x000005c8,
+ 0x00000007,
+ 0x00000000,
+ 0x0000060e,
+/* 0x03c4: memx_func_tail */
+/* 0x03c4: memx_ts_start */
+ 0x00000000,
+/* 0x03c8: memx_ts_end */
+ 0x00000000,
+/* 0x03cc: memx_data_head */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x0bcc: memx_data_tail */
+/* 0x0bcc: memx_train_head */
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+/* 0x0ccc: memx_train_tail */
+/* 0x0ccc: i2c_scl_map */
+ 0x00000400,
+ 0x00000800,
+ 0x00001000,
+ 0x00002000,
+ 0x00004000,
+ 0x00008000,
+ 0x00010000,
+ 0x00020000,
+ 0x00040000,
+ 0x00080000,
+/* 0x0cf4: i2c_sda_map */
+ 0x00100000,
+ 0x00200000,
+ 0x00400000,
+ 0x00800000,
+ 0x01000000,
+ 0x02000000,
+ 0x04000000,
+ 0x08000000,
+ 0x10000000,
+ 0x20000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+};
+
+uint32_t gk104_pmu_code[] = {
+ 0x03420ef5,
+/* 0x0004: rd32 */
+ 0x07a007f1,
+ 0xbd000ed0,
+ 0x01d7f004,
+ 0xf101d3f0,
+ 0xd007ac07,
+ 0x04bd000d,
+/* 0x001c: rd32_wait */
+ 0x07acd7f1,
+ 0xf100ddcf,
+ 0xf47000d4,
+ 0xd7f1f51b,
+ 0xddcf07a4,
+/* 0x0033: wr32 */
+ 0xf100f800,
+ 0xd007a007,
+ 0x04bd000e,
+ 0x07a407f1,
+ 0xbd000dd0,
+ 0x02d7f004,
+ 0xf0f0d5f0,
+ 0x07f101d3,
+ 0x0dd007ac,
+/* 0x0057: wr32_wait */
+ 0xf104bd00,
+ 0xcf07acd7,
+ 0xd4f100dd,
+ 0x1bf47000,
+/* 0x0067: nsec */
+ 0xf900f8f5,
+ 0xf080f990,
+ 0x88cf2c87,
+/* 0x0071: nsec_loop */
+ 0x2c97f000,
+ 0xbb0099cf,
+ 0x9eb80298,
+ 0xf41ef406,
+ 0x90fc80fc,
+/* 0x0086: wait */
+ 0x90f900f8,
+ 0x87f080f9,
+ 0x0088cf2c,
+/* 0x0090: wait_loop */
+ 0xf402eeb9,
+ 0xdab90421,
+ 0x04adfd02,
+ 0xf406acb8,
+ 0x97f0120b,
+ 0x0099cf2c,
+ 0xb80298bb,
+ 0x1ef4069b,
+/* 0x00b1: wait_done */
+ 0xfc80fce2,
+/* 0x00b7: intr_watchdog */
+ 0x9800f890,
+ 0x96b003e9,
+ 0x2a0bf400,
+ 0xbb9a0a98,
+ 0x1cf4029a,
+ 0x01d7f00f,
+ 0x028121f5,
+ 0x0ef494bd,
+/* 0x00d5: intr_watchdog_next_time */
+ 0x9b0a9815,
+ 0xf400a6b0,
+ 0x9ab8090b,
+ 0x061cf406,
+/* 0x00e4: intr_watchdog_next_time_set */
+/* 0x00e7: intr_watchdog_next_proc */
+ 0x809b0980,
+ 0xe0b603e9,
+ 0x68e6b158,
+ 0xc61bf402,
+/* 0x00f6: intr */
+ 0x00f900f8,
+ 0x80f904bd,
+ 0xa0f990f9,
+ 0xc0f9b0f9,
+ 0xe0f9d0f9,
+ 0xf7f0f0f9,
+ 0x0188fe00,
+ 0x87f180f9,
+ 0x88cf05d0,
+ 0x0180b600,
+ 0x05d007f1,
+ 0xbd0008d0,
+ 0x0887f004,
+ 0xc40088cf,
+ 0x0bf40289,
+ 0x9b008020,
+ 0xf458e7f0,
+ 0x0998b721,
+ 0x0096b09b,
+ 0xf00e0bf4,
+ 0x09d03407,
+ 0x8004bd00,
+/* 0x014e: intr_skip_watchdog */
+ 0x89e49a09,
+ 0x0bf40800,
+ 0x8897f13c,
+ 0x0099cf06,
+ 0xf4029ac4,
+ 0xc7f1260b,
+ 0xcccf04c0,
+ 0xf1c0f900,
+ 0xf14f48e7,
+ 0xf05453e3,
+ 0x21f500d7,
+ 0xc0fc02e6,
+ 0x04c007f1,
+ 0xbd000cd0,
+/* 0x0185: intr_subintr_skip_fifo */
+ 0x8807f104,
+ 0x0009d006,
+/* 0x018e: intr_skip_subintr */
+ 0x97f104bd,
+ 0x90bd00e0,
+ 0xf00489fd,
+ 0x08d00407,
+ 0xfc04bd00,
+ 0x0088fe80,
+ 0xe0fcf0fc,
+ 0xc0fcd0fc,
+ 0xa0fcb0fc,
+ 0x80fc90fc,
+ 0x32f400fc,
+/* 0x01bb: ticks_from_ns */
+ 0xf901f800,
+ 0xf1b0f9c0,
+ 0xf00144d7,
+ 0x21f500d3,
+ 0xccec03a8,
+ 0xb4b003e8,
+ 0x120bf400,
+ 0x03e8eeec,
+ 0x0144d7f1,
+ 0xf500d3f0,
+/* 0x01e3: ticks_from_ns_quit */
+ 0xb903a821,
+ 0xb0fc02ce,
+ 0x00f8c0fc,
+/* 0x01ec: ticks_from_us */
+ 0xb0f9c0f9,
+ 0x0144d7f1,
+ 0xf500d3f0,
+ 0xb903a821,
+ 0xb4b002ce,
+ 0x050bf400,
+/* 0x0206: ticks_from_us_quit */
+ 0xb0fce4bd,
+ 0x00f8c0fc,
+/* 0x020c: ticks_to_us */
+ 0x0144d7f1,
+ 0xff00d3f0,
+ 0x00f8eced,
+/* 0x0218: timer */
+ 0x80f990f9,
+ 0x981032f4,
+ 0x86b003f8,
+ 0x531cf400,
+ 0x07f084bd,
+ 0x0008d038,
+ 0x87f004bd,
+ 0x0088cf34,
+ 0xbb9a0998,
+ 0xe9bb0298,
+ 0x03fe8000,
+ 0xcf0887f0,
+ 0x84f00088,
+ 0x201bf402,
+ 0xcf3487f0,
+ 0xe0b80088,
+ 0x090bf406,
+ 0xf406e8b8,
+/* 0x0262: timer_reset */
+ 0x07f00e1c,
+ 0x000ed034,
+ 0x0e8004bd,
+/* 0x026d: timer_enable */
+ 0x0187f09a,
+ 0xd03807f0,
+ 0x04bd0008,
+/* 0x0278: timer_done */
+ 0xfc1031f4,
+ 0xf890fc80,
+/* 0x0281: send_proc */
+ 0xf980f900,
+ 0x05e89890,
+ 0xf004e998,
+ 0x89b80486,
+ 0x2a0bf406,
+ 0x940398c4,
+ 0x80b60488,
+ 0x008ebb18,
+ 0x8000fa98,
+ 0x8d80008a,
+ 0x028c8001,
+ 0xb6038b80,
+ 0x94f00190,
+ 0x04e98007,
+/* 0x02bb: send_done */
+ 0xfc0231f4,
+ 0xf880fc90,
+/* 0x02c1: find */
+ 0xf080f900,
+ 0x31f45887,
+/* 0x02c9: find_loop */
+ 0x008a9801,
+ 0xf406aeb8,
+ 0x80b6100b,
+ 0x6886b158,
+ 0xf01bf402,
+/* 0x02df: find_done */
+ 0xb90132f4,
+ 0x80fc028e,
+/* 0x02e6: send */
+ 0x21f500f8,
+ 0x01f402c1,
+/* 0x02ef: recv */
+ 0xf900f897,
+ 0x9880f990,
+ 0xe99805e8,
+ 0x0132f404,
+ 0xf40689b8,
+ 0x89c43d0b,
+ 0x0180b603,
+ 0x800784f0,
+ 0xea9805e8,
+ 0xfef0f902,
+ 0xf0f9018f,
+ 0x9402efb9,
+ 0xe9bb0499,
+ 0x18e0b600,
+ 0x9803eb98,
+ 0xed9802ec,
+ 0x00ee9801,
+ 0xf0fca5f9,
+ 0xf400f8fe,
+ 0xf0fc0131,
+/* 0x033c: recv_done */
+ 0x90fc80fc,
+/* 0x0342: init */
+ 0x17f100f8,
+ 0x11cf0108,
+ 0x0911e700,
+ 0x0814b601,
+ 0xf10014fe,
+ 0xf000e017,
+ 0x07f00013,
+ 0x0001d01c,
+ 0x17f004bd,
+ 0x1407f0ff,
+ 0xbd0001d0,
+ 0x0217f004,
+ 0x080015f1,
+ 0xd01007f0,
+ 0x04bd0001,
+ 0x00f617f1,
+ 0xfe0013f0,
+ 0x31f40010,
+ 0x0117f010,
+ 0xd03807f0,
+ 0x04bd0001,
+/* 0x0397: init_proc */
+ 0x9858f7f0,
+ 0x16b001f1,
+ 0xfa0bf400,
+ 0xf0b615f9,
+ 0xf20ef458,
+/* 0x03a8: mulu32_32_64 */
+ 0x20f910f9,
+ 0x40f930f9,
+ 0x9510e195,
+ 0xc4bd10d2,
+ 0xedffb4bd,
+ 0x301dffc0,
+ 0xf10234b9,
+ 0xb6ffff34,
+ 0x45b61034,
+ 0x00c3bb10,
+ 0xff01b4bb,
+ 0x34b930e2,
+ 0xff34f102,
+ 0x1034b6ff,
+ 0xbb1045b6,
+ 0xb4bb00c3,
+ 0x3012ff01,
+ 0xfc00b3bb,
+ 0xfc30fc40,
+ 0xf810fc20,
+/* 0x03f9: host_send */
+ 0xb017f100,
+ 0x0011cf04,
+ 0x04a027f1,
+ 0xb80022cf,
+ 0x0bf40612,
+ 0x071ec42f,
+ 0xb704ee94,
+ 0x980270e0,
+ 0xec9803eb,
+ 0x01ed9802,
+ 0xf500ee98,
+ 0xb602e621,
+ 0x1ec40110,
+ 0xb007f10f,
+ 0x000ed004,
+ 0x0ef404bd,
+/* 0x0439: host_send_done */
+/* 0x043b: host_recv */
+ 0xf100f8c3,
+ 0xf14e4917,
+ 0xb8525413,
+ 0x0bf406e1,
+/* 0x0449: host_recv_wait */
+ 0xcc17f1b3,
+ 0x0011cf04,
+ 0x04c827f1,
+ 0xf00022cf,
+ 0x12b80816,
+ 0xec0bf406,
+ 0xb60723c4,
+ 0x30b70434,
+ 0x3b8002f0,
+ 0x023c8003,
+ 0x80013d80,
+ 0x20b6003e,
+ 0x0f24f001,
+ 0x04c807f1,
+ 0xbd0002d0,
+ 0x4027f004,
+ 0xd00007f0,
+ 0x04bd0002,
+/* 0x0492: host_init */
+ 0x17f100f8,
+ 0x14b60080,
+ 0x7015f110,
+ 0xd007f102,
+ 0x0001d004,
+ 0x17f104bd,
+ 0x14b60080,
+ 0xf015f110,
+ 0xdc07f102,
+ 0x0001d004,
+ 0x17f004bd,
+ 0xc407f101,
+ 0x0001d004,
+ 0x00f804bd,
+/* 0x04c8: memx_func_enter */
+ 0x162067f1,
+ 0xf55d77f1,
+ 0xffff73f1,
+ 0xf4026eb9,
+ 0xd8b90421,
+ 0x0487fd02,
+ 0x80f960f9,
+ 0xe0fcd0fc,
+ 0xf13321f4,
+ 0xf1fffe77,
+ 0xb9ffff73,
+ 0x21f4026e,
+ 0x02d8b904,
+ 0xf90487fd,
+ 0xfc80f960,
+ 0xf4e0fcd0,
+ 0x67f13321,
+ 0x6eb926f0,
+ 0x0421f402,
+ 0xfd02d8b9,
+ 0x60f90487,
+ 0xd0fc80f9,
+ 0x21f4e0fc,
+ 0x0467f033,
+ 0x07e007f1,
+ 0xbd0006d0,
+/* 0x0531: memx_func_enter_wait */
+ 0xc067f104,
+ 0x0066cf07,
+ 0xf40464f0,
+ 0x67f0f60b,
+ 0x0066cf2c,
+ 0xf8f10680,
+/* 0x0549: memx_func_leave */
+ 0x2c67f000,
+ 0x800066cf,
+ 0x67f0f206,
+ 0xe407f104,
+ 0x0006d007,
+/* 0x055e: memx_func_leave_wait */
+ 0x67f104bd,
+ 0x66cf07c0,
+ 0x0464f000,
+ 0xf1f61bf4,
+ 0xf126f067,
+ 0xf0000177,
+ 0x6eb90073,
+ 0x0421f402,
+ 0xfd02d8b9,
+ 0x60f90587,
+ 0xd0fc80f9,
+ 0x21f4e0fc,
+ 0x2067f133,
+ 0x026eb916,
+ 0xb90421f4,
+ 0x87fd02d8,
+ 0xf960f905,
+ 0xfcd0fc80,
+ 0x3321f4e0,
+ 0x0aa277f1,
+ 0xb90073f0,
+ 0x21f4026e,
+ 0x02d8b904,
+ 0xf90587fd,
+ 0xfc80f960,
+ 0xf4e0fcd0,
+ 0x00f83321,
+/* 0x05c8: memx_func_wait_vblank */
+ 0xf80410b6,
+/* 0x05cd: memx_func_wr32 */
+ 0x00169800,
+ 0xb6011598,
+ 0x60f90810,
+ 0xd0fc50f9,
+ 0x21f4e0fc,
+ 0x0242b633,
+ 0xf8e91bf4,
+/* 0x05e9: memx_func_wait */
+ 0x2c87f000,
+ 0x980088cf,
+ 0x1d98001e,
+ 0x021c9801,
+ 0xb6031b98,
+ 0x21f41010,
+/* 0x0603: memx_func_delay */
+ 0x9800f886,
+ 0x10b6001e,
+ 0x6721f404,
+/* 0x060e: memx_func_train */
+ 0x00f800f8,
+/* 0x0610: memx_exec */
+ 0xd0f9e0f9,
+ 0xb902c1b9,
+/* 0x061a: memx_exec_next */
+ 0x139802b2,
+ 0x0410b600,
+ 0x01f034e7,
+ 0x01e033e7,
+ 0xf00132b6,
+ 0x35980c30,
+ 0xb855f9de,
+ 0x1ef40612,
+ 0xf10b98e4,
+ 0xbbf20c98,
+ 0xb7f102cb,
+ 0xbbcf07c4,
+ 0xfcd0fc00,
+ 0xe621f5e0,
+/* 0x0653: memx_info */
+ 0x7000f802,
+ 0x0bf401c6,
+/* 0x0659: memx_info_data */
+ 0xccc7f10e,
+ 0x00b7f103,
+ 0x0b0ef408,
+/* 0x0664: memx_info_train */
+ 0x0bccc7f1,
+ 0x0100b7f1,
+/* 0x066c: memx_info_send */
+ 0x02e621f5,
+/* 0x0672: memx_recv */
+ 0xd6b000f8,
+ 0x9b0bf401,
+ 0xf400d6b0,
+ 0x00f8d80b,
+/* 0x0680: memx_init */
+/* 0x0682: perf_recv */
+ 0x00f800f8,
+/* 0x0684: perf_init */
+/* 0x0686: i2c_drive_scl */
+ 0x36b000f8,
+ 0x0e0bf400,
+ 0x07e007f1,
+ 0xbd0001d0,
+/* 0x0697: i2c_drive_scl_lo */
+ 0xf100f804,
+ 0xd007e407,
+ 0x04bd0001,
+/* 0x06a2: i2c_drive_sda */
+ 0x36b000f8,
+ 0x0e0bf400,
+ 0x07e007f1,
+ 0xbd0002d0,
+/* 0x06b3: i2c_drive_sda_lo */
+ 0xf100f804,
+ 0xd007e407,
+ 0x04bd0002,
+/* 0x06be: i2c_sense_scl */
+ 0x32f400f8,
+ 0xc437f101,
+ 0x0033cf07,
+ 0xf40431fd,
+ 0x31f4060b,
+/* 0x06d1: i2c_sense_scl_done */
+/* 0x06d3: i2c_sense_sda */
+ 0xf400f801,
+ 0x37f10132,
+ 0x33cf07c4,
+ 0x0432fd00,
+ 0xf4060bf4,
+/* 0x06e6: i2c_sense_sda_done */
+ 0x00f80131,
+/* 0x06e8: i2c_raise_scl */
+ 0x47f140f9,
+ 0x37f00898,
+ 0x8621f501,
+/* 0x06f5: i2c_raise_scl_wait */
+ 0xe8e7f106,
+ 0x6721f403,
+ 0x06be21f5,
+ 0xb60901f4,
+ 0x1bf40142,
+/* 0x0709: i2c_raise_scl_done */
+ 0xf840fcef,
+/* 0x070d: i2c_start */
+ 0xbe21f500,
+ 0x0d11f406,
+ 0x06d321f5,
+ 0xf40611f4,
+/* 0x071e: i2c_start_rep */
+ 0x37f0300e,
+ 0x8621f500,
+ 0x0137f006,
+ 0x06a221f5,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0xe821f550,
+ 0x0464b606,
+/* 0x074b: i2c_start_send */
+ 0xf01f11f4,
+ 0x21f50037,
+ 0xe7f106a2,
+ 0x21f41388,
+ 0x0037f067,
+ 0x068621f5,
+ 0x1388e7f1,
+/* 0x0767: i2c_start_out */
+ 0xf86721f4,
+/* 0x0769: i2c_stop */
+ 0x0037f000,
+ 0x068621f5,
+ 0xf50037f0,
+ 0xf106a221,
+ 0xf403e8e7,
+ 0x37f06721,
+ 0x8621f501,
+ 0x88e7f106,
+ 0x6721f413,
+ 0xf50137f0,
+ 0xf106a221,
+ 0xf41388e7,
+ 0x00f86721,
+/* 0x079c: i2c_bitw */
+ 0x06a221f5,
+ 0x03e8e7f1,
+ 0xbb6721f4,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x06e821f5,
+ 0xf40464b6,
+ 0xe7f11811,
+ 0x21f41388,
+ 0x0037f067,
+ 0x068621f5,
+ 0x1388e7f1,
+/* 0x07db: i2c_bitw_out */
+ 0xf86721f4,
+/* 0x07dd: i2c_bitr */
+ 0x0137f000,
+ 0x06a221f5,
+ 0x03e8e7f1,
+ 0xbb6721f4,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x06e821f5,
+ 0xf40464b6,
+ 0x21f51b11,
+ 0x37f006d3,
+ 0x8621f500,
+ 0x88e7f106,
+ 0x6721f413,
+ 0xf4013cf0,
+/* 0x0822: i2c_bitr_done */
+ 0x00f80131,
+/* 0x0824: i2c_get_byte */
+ 0xf00057f0,
+/* 0x082a: i2c_get_byte_next */
+ 0x54b60847,
+ 0x0076bb01,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b607dd,
+ 0x2b11f404,
+ 0xb60553fd,
+ 0x1bf40142,
+ 0x0137f0d8,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0x9c21f550,
+ 0x0464b607,
+/* 0x0874: i2c_get_byte_done */
+/* 0x0876: i2c_put_byte */
+ 0x47f000f8,
+/* 0x0879: i2c_put_byte_next */
+ 0x0142b608,
+ 0xbb3854ff,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x079c21f5,
+ 0xf40464b6,
+ 0x46b03411,
+ 0xd81bf400,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0xdd21f550,
+ 0x0464b607,
+ 0xbb0f11f4,
+ 0x36b00076,
+ 0x061bf401,
+/* 0x08cf: i2c_put_byte_done */
+ 0xf80132f4,
+/* 0x08d1: i2c_addr */
+ 0x0076bb00,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b6070d,
+ 0x2911f404,
+ 0x012ec3e7,
+ 0xfd0134b6,
+ 0x76bb0553,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6087621,
+/* 0x0916: i2c_addr_done */
+ 0x00f80464,
+/* 0x0918: i2c_acquire_addr */
+ 0xb6f8cec7,
+ 0xe0b705e4,
+ 0x00f8d014,
+/* 0x0924: i2c_acquire */
+ 0x091821f5,
+ 0xf00421f4,
+ 0x21f403d9,
+/* 0x0933: i2c_release */
+ 0xf500f833,
+ 0xf4091821,
+ 0xdaf00421,
+ 0x3321f403,
+/* 0x0942: i2c_recv */
+ 0x32f400f8,
+ 0xf8c1c701,
+ 0xb00214b6,
+ 0x1ff52816,
+ 0x13a0013a,
+ 0x32980cf4,
+ 0xcc13a000,
+ 0x0031980c,
+ 0xf90231f4,
+ 0xf9e0f9d0,
+ 0x0067f1d0,
+ 0x0063f100,
+ 0x01679210,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0x2421f550,
+ 0x0464b609,
+ 0xd6b0d0fc,
+ 0xb31bf500,
+ 0x0057f000,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0xd121f550,
+ 0x0464b608,
+ 0x00d011f5,
+ 0xbbe0c5c7,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x087621f5,
+ 0xf50464b6,
+ 0xf000ad11,
+ 0x76bb0157,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb608d121,
+ 0x11f50464,
+ 0x76bb008a,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6082421,
+ 0x11f40464,
+ 0xe05bcb6a,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0x6921f550,
+ 0x0464b607,
+ 0xbd025bb9,
+ 0x430ef474,
+/* 0x0a48: i2c_recv_not_rd08 */
+ 0xf401d6b0,
+ 0x57f03d1b,
+ 0xd121f500,
+ 0x3311f408,
+ 0xf5e0c5c7,
+ 0xf4087621,
+ 0x57f02911,
+ 0xd121f500,
+ 0x1f11f408,
+ 0xf5e0b5c7,
+ 0xf4087621,
+ 0x21f51511,
+ 0x74bd0769,
+ 0xf408c5c7,
+ 0x32f4091b,
+ 0x030ef402,
+/* 0x0a88: i2c_recv_not_wr08 */
+/* 0x0a88: i2c_recv_done */
+ 0xf5f8cec7,
+ 0xfc093321,
+ 0xf4d0fce0,
+ 0x7cb90a12,
+ 0xe621f502,
+/* 0x0a9d: i2c_recv_exit */
+/* 0x0a9f: i2c_init */
+ 0xf800f802,
+/* 0x0aa1: test_recv */
+ 0xd817f100,
+ 0x0011cf05,
+ 0xf10110b6,
+ 0xd005d807,
+ 0x04bd0001,
+ 0xd900e7f1,
+ 0x134fe3f1,
+ 0x021821f5,
+/* 0x0ac2: test_init */
+ 0xe7f100f8,
+ 0x21f50800,
+ 0x00f80218,
+/* 0x0acc: idle_recv */
+/* 0x0ace: idle */
+ 0x31f400f8,
+ 0xd417f100,
+ 0x0011cf05,
+ 0xf10110b6,
+ 0xd005d407,
+ 0x04bd0001,
+/* 0x0ae4: idle_loop */
+ 0xf45817f0,
+/* 0x0aea: idle_proc */
+/* 0x0aea: idle_proc_exec */
+ 0x10f90232,
+ 0xf5021eb9,
+ 0xfc02ef21,
+ 0x0911f410,
+ 0xf40231f4,
+/* 0x0afe: idle_proc_next */
+ 0x10b6ef0e,
+ 0x061fb858,
+ 0xf4e61bf4,
+ 0x28f4dd02,
+ 0xc10ef400,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+};
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
index 96fc984..c5ec61f 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
@@ -25,6 +25,7 @@
#define GT215 0xa3
#define GF100 0xc0
#define GF119 0xd9
+#define GK104 0xe4
#define GK208 0x108
#include "os.h"
diff --git a/drm/nouveau/nvkm/subdev/pmu/gk104.c b/drm/nouveau/nvkm/subdev/pmu/gk104.c
index 86f9f3b..20558aa 100644
--- a/drm/nouveau/nvkm/subdev/pmu/gk104.c
+++ b/drm/nouveau/nvkm/subdev/pmu/gk104.c
@@ -21,10 +21,8 @@
*
* Authors: Ben Skeggs
*/
-#define gf119_pmu_code gk104_pmu_code
-#define gf119_pmu_data gk104_pmu_data
#include "priv.h"
-#include "fuc/gf119.fuc4.h"
+#include "fuc/gk104.fuc4.h"
#include <core/option.h>
#include <subdev/fuse.h>
diff --git a/drm/nouveau/nvkm/subdev/pmu/gk110.c b/drm/nouveau/nvkm/subdev/pmu/gk110.c
index ae25524..5b0796a 100644
--- a/drm/nouveau/nvkm/subdev/pmu/gk110.c
+++ b/drm/nouveau/nvkm/subdev/pmu/gk110.c
@@ -21,10 +21,10 @@
*
* Authors: Ben Skeggs
*/
-#define gf119_pmu_code gk110_pmu_code
-#define gf119_pmu_data gk110_pmu_data
+#define gk104_pmu_code gk110_pmu_code
+#define gk104_pmu_data gk110_pmu_data
#include "priv.h"
-#include "fuc/gf119.fuc4.h"
+#include "fuc/gk104.fuc4.h"
#include <subdev/timer.h>
--
2.7.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/4] pmu/fuc: add macros for pdaemon pwr counters
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-02-16 16:54 ` [PATCH v2 1/4] subdev/pmu/fuc: add gk104 Karol Herbst
@ 2016-02-16 16:54 ` Karol Herbst
2016-02-16 16:54 ` [PATCH v2 3/4] subdev/pmu/fuc: implement counter readout Karol Herbst
2016-02-16 16:54 ` [PATCH v2 4/4] nouveau/debugfs: add interface for current load Karol Herbst
3 siblings, 0 replies; 5+ messages in thread
From: Karol Herbst @ 2016-02-16 16:54 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Reviewed-by: Martin Peres <martin.peres@free.fr>
---
drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
index c5ec61f..7b7afcb 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc
@@ -66,6 +66,30 @@
#define NV_PPWR_RFIFO_GET 0x04cc
#define NV_PPWR_H2D 0x04d0
#define NV_PPWR_D2H 0x04dc
+#define NV_PPWR_COUNTER_MASK(i) (0x10 * (i) + 0x0504)
+#define NV_PPWR_COUNTER_COUNT(i) (0x10 * (i) + 0x0508)
+#define NV_PPWR_COUNTER_COUNT_RESET 0x80000000
+#define NV_PPWR_COUNTER_MODE(i) (0x10 * (i) + 0x050c)
+#define NV_PPWR_COUNTER_MODE_NEVER 0
+#define NV_PPWR_COUNTER_MODE_IF_ALL 1
+#define NV_PPWR_COUNTER_MODE_IF_NOT_ALL 2
+#define NV_PPWR_COUNTER_MODE_ALWAYS 3
+#define NV_PPWR_COUNTER_SIG_GR 0x00000001
+#define NV_PPWR_COUNTER_SIG_GR_HUB 0x00000002
+#define NV_PPWR_COUNTER_SIG_GR_GPC 0x00000004
+#define NV_PPWR_COUNTER_SIG_GR_ROP 0x00000008
+#define NV_PPWR_COUNTER_SIG_PVLD 0x00000010
+#define NV_PPWR_COUNTER_SIG_PPDEC 0x00000020
+#define NV_PPWR_COUNTER_SIG_PPPP 0x00000040
+#define NV_PPWR_COUNTER_SIG_BFB_PART0_REQ 0x00000080
+#define NV_PPWR_COUNTER_SIG_FB_PART0_REQ 0x00000100
+#define NV_PPWR_COUNTER_SIG_BFB_NISO 0x00000200
+#define NV_PPWR_COUNTER_SIG_PMFB 0x00001000
+#define NV_PPWR_COUNTER_SIG_PVENC 0x00020000
+#define NV_PPWR_COUNTER_SIG_PCOPY0 0x00080000
+#define NV_PPWR_COUNTER_SIG_PCOPY1 0x00100000
+#define NV_PPWR_COUNTER_SIG_PCOPY2 0x00200000
+#define NV_PPWR_COUNTER_SIG_PCIE 0x20000000
#if NVKM_PPWR_CHIPSET < GK208
#define NV_PPWR_DSCRATCH(i) (4 * (i) + 0x05d0)
#endif
--
2.7.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/4] subdev/pmu/fuc: implement counter readout
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-02-16 16:54 ` [PATCH v2 1/4] subdev/pmu/fuc: add gk104 Karol Herbst
2016-02-16 16:54 ` [PATCH v2 2/4] pmu/fuc: add macros for pdaemon pwr counters Karol Herbst
@ 2016-02-16 16:54 ` Karol Herbst
2016-02-16 16:54 ` [PATCH v2 4/4] nouveau/debugfs: add interface for current load Karol Herbst
3 siblings, 0 replies; 5+ messages in thread
From: Karol Herbst @ 2016-02-16 16:54 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
v2: read and reset counters faster
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
---
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 411 +++++++++------
drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 745 +++++++++++++++------------
drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h | 745 +++++++++++++++------------
drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 725 +++++++++++++++-----------
drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 732 +++++++++++++++-----------
drm/nouveau/nvkm/subdev/pmu/fuc/os.h | 10 +
drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc | 156 ++++++
7 files changed, 2091 insertions(+), 1433 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
index 7702944..43f4135 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
@@ -68,7 +68,7 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
- 0x00000757,
+ 0x00000877,
0x00000755,
0x00000000,
0x00000000,
@@ -90,8 +90,8 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
- 0x00000b87,
- 0x00000a2a,
+ 0x00000d53,
+ 0x00000bf6,
0x00000000,
0x00000000,
0x00000000,
@@ -112,8 +112,8 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
- 0x00000bb0,
- 0x00000b89,
+ 0x00000d7c,
+ 0x00000d55,
0x00000000,
0x00000000,
0x00000000,
@@ -134,8 +134,8 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
- 0x00000bbc,
- 0x00000bba,
+ 0x00000d88,
+ 0x00000d86,
0x00000000,
0x00000000,
0x00000000,
@@ -834,7 +834,15 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
/* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_attr_start */
+/* 0x0ccc: perf_polling_period_us */
+ 0x000186a0,
+/* 0x0cd0: perf_eng_gr */
+/* 0x0cd1: perf_eng_vid */
+/* 0x0cd2: perf_eng_mc */
+/* 0x0cd3: perf_eng_pcie */
+ 0x00000000,
+/* 0x0cd4: i2c_scl_map */
0x00001000,
0x00004000,
0x00010000,
@@ -845,7 +853,7 @@ uint32_t gf100_pmu_data[] = {
0x01000000,
0x04000000,
0x10000000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
0x00002000,
0x00008000,
0x00020000,
@@ -856,7 +864,7 @@ uint32_t gf100_pmu_data[] = {
0x02000000,
0x08000000,
0x20000000,
-/* 0x0d1c: i2c_ctrl */
+/* 0x0d24: i2c_ctrl */
0x0000e138,
0x0000e150,
0x0000e168,
@@ -912,8 +920,6 @@ uint32_t gf100_pmu_data[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
};
uint32_t gf100_pmu_code[] = {
@@ -1451,139 +1457,257 @@ uint32_t gf100_pmu_code[] = {
/* 0x0753: memx_init */
0xf800f8d8,
/* 0x0755: perf_recv */
-/* 0x0757: perf_init */
- 0xf800f800,
-/* 0x0759: i2c_drive_scl */
+ 0x48a7f100,
+ 0x53a3f14f,
+ 0x06eab854,
+ 0xb0411bf4,
+ 0x1bf401d6,
+ 0xbdb4bd50,
+ 0xd307f1c4,
+ 0x000c180c,
+ 0xc4b604bd,
+ 0xd207f108,
+ 0x000c180c,
+ 0xc4b604bd,
+ 0xd107f108,
+ 0x000c180c,
+ 0xc4b604bd,
+ 0xd007f108,
+ 0x000c180c,
+ 0x21f504bd,
+ 0x0ef40337,
+/* 0x07a1: perf_recv_not_host */
+ 0xb821f518,
+ 0xcc07f107,
+ 0x000e980c,
+ 0x21f504bd,
+ 0x21f5022b,
+/* 0x07b6: perf_recv_exit */
+ 0x00f80257,
+/* 0x07b8: perf_counter_readout */
+ 0x20f910f9,
+ 0x40f930f9,
+ 0x17f150f9,
+ 0x14b60508,
+ 0x0011cf06,
+ 0x051827f1,
+ 0xcf0624b6,
+ 0x37f10022,
+ 0x34b60528,
+ 0x0033cf06,
+ 0x053847f1,
+ 0xcf0644b6,
+ 0x57f10044,
+ 0x54b60548,
+ 0x0055cf06,
+ 0x0000e7f1,
+ 0x8000e3f1,
+ 0x050807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x051807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x052807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x053807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x054807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0xffff11cc,
+ 0x07f12c21,
+ 0x02000cd0,
+ 0xff04bd00,
+ 0x07f13c31,
+ 0x03000cd1,
+ 0xff04bd00,
+ 0x07f14c41,
+ 0x04000cd2,
+ 0xff04bd00,
+ 0x07f15c51,
+ 0x05000cd3,
+ 0xfc04bd00,
+ 0xfc40fc50,
+ 0xfc20fc30,
+/* 0x0877: perf_init */
+ 0xf100f810,
+ 0xf00003e7,
+ 0x07f100e3,
+ 0x04b6050c,
+ 0x000ed006,
+ 0xe7f104bd,
+ 0xe3f00002,
+ 0x1c07f100,
+ 0x0604b605,
+ 0xbd000ed0,
+ 0x2c07f104,
+ 0x0604b605,
+ 0xbd000ed0,
+ 0x3c07f104,
+ 0x0604b605,
+ 0xbd000ed0,
+ 0x4c07f104,
+ 0x0604b605,
+ 0xbd000ed0,
+ 0x0fe7f104,
+ 0x18e3f000,
+ 0x051407f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x0070e7f1,
+ 0xf100e3f0,
+ 0xb6052407,
+ 0x0ed00604,
+ 0xf104bd00,
+ 0xf00080e7,
+ 0x07f100e3,
+ 0x04b60534,
+ 0x000ed006,
+ 0xe7f104bd,
+ 0xe3f10000,
+ 0x07f12000,
+ 0x04b60544,
+ 0x000ed006,
+ 0x21f504bd,
+ 0x07f107b8,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0xf5022b21,
+ 0xf8025721,
+/* 0x0925: i2c_drive_scl */
0x0036b000,
0xf1110bf4,
0xb607e007,
0x01d00604,
0xf804bd00,
-/* 0x076d: i2c_drive_scl_lo */
+/* 0x0939: i2c_drive_scl_lo */
0xe407f100,
0x0604b607,
0xbd0001d0,
-/* 0x077b: i2c_drive_sda */
+/* 0x0947: i2c_drive_sda */
0xb000f804,
0x0bf40036,
0xe007f111,
0x0604b607,
0xbd0002d0,
-/* 0x078f: i2c_drive_sda_lo */
+/* 0x095b: i2c_drive_sda_lo */
0xf100f804,
0xb607e407,
0x02d00604,
0xf804bd00,
-/* 0x079d: i2c_sense_scl */
+/* 0x0969: i2c_sense_scl */
0x0132f400,
0x07c437f1,
0xcf0634b6,
0x31fd0033,
0x060bf404,
-/* 0x07b3: i2c_sense_scl_done */
+/* 0x097f: i2c_sense_scl_done */
0xf80131f4,
-/* 0x07b5: i2c_sense_sda */
+/* 0x0981: i2c_sense_sda */
0x0132f400,
0x07c437f1,
0xcf0634b6,
0x32fd0033,
0x060bf404,
-/* 0x07cb: i2c_sense_sda_done */
+/* 0x0997: i2c_sense_sda_done */
0xf80131f4,
-/* 0x07cd: i2c_raise_scl */
+/* 0x0999: i2c_raise_scl */
0xf140f900,
0xf0089847,
0x21f50137,
-/* 0x07da: i2c_raise_scl_wait */
- 0xe7f10759,
+/* 0x09a6: i2c_raise_scl_wait */
+ 0xe7f10925,
0x21f403e8,
- 0x9d21f57f,
- 0x0901f407,
+ 0x6921f57f,
+ 0x0901f409,
0xf40142b6,
-/* 0x07ee: i2c_raise_scl_done */
+/* 0x09ba: i2c_raise_scl_done */
0x40fcef1b,
-/* 0x07f2: i2c_start */
+/* 0x09be: i2c_start */
0x21f500f8,
- 0x11f4079d,
- 0xb521f50d,
- 0x0611f407,
-/* 0x0803: i2c_start_rep */
+ 0x11f40969,
+ 0x8121f50d,
+ 0x0611f409,
+/* 0x09cf: i2c_start_rep */
0xf0300ef4,
0x21f50037,
- 0x37f00759,
- 0x7b21f501,
- 0x0076bb07,
+ 0x37f00925,
+ 0x4721f501,
+ 0x0076bb09,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
- 0x64b607cd,
+ 0x64b60999,
0x1f11f404,
-/* 0x0830: i2c_start_send */
+/* 0x09fc: i2c_start_send */
0xf50037f0,
- 0xf1077b21,
+ 0xf1094721,
0xf41388e7,
0x37f07f21,
- 0x5921f500,
- 0x88e7f107,
+ 0x2521f500,
+ 0x88e7f109,
0x7f21f413,
-/* 0x084c: i2c_start_out */
-/* 0x084e: i2c_stop */
+/* 0x0a18: i2c_start_out */
+/* 0x0a1a: i2c_stop */
0x37f000f8,
- 0x5921f500,
- 0x0037f007,
- 0x077b21f5,
+ 0x2521f500,
+ 0x0037f009,
+ 0x094721f5,
0x03e8e7f1,
0xf07f21f4,
0x21f50137,
- 0xe7f10759,
+ 0xe7f10925,
0x21f41388,
0x0137f07f,
- 0x077b21f5,
+ 0x094721f5,
0x1388e7f1,
0xf87f21f4,
-/* 0x0881: i2c_bitw */
- 0x7b21f500,
- 0xe8e7f107,
+/* 0x0a4d: i2c_bitw */
+ 0x4721f500,
+ 0xe8e7f109,
0x7f21f403,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0xcd21f550,
- 0x0464b607,
+ 0x9921f550,
+ 0x0464b609,
0xf11811f4,
0xf41388e7,
0x37f07f21,
- 0x5921f500,
- 0x88e7f107,
+ 0x2521f500,
+ 0x88e7f109,
0x7f21f413,
-/* 0x08c0: i2c_bitw_out */
-/* 0x08c2: i2c_bitr */
+/* 0x0a8c: i2c_bitw_out */
+/* 0x0a8e: i2c_bitr */
0x37f000f8,
- 0x7b21f501,
- 0xe8e7f107,
+ 0x4721f501,
+ 0xe8e7f109,
0x7f21f403,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0xcd21f550,
- 0x0464b607,
+ 0x9921f550,
+ 0x0464b609,
0xf51b11f4,
- 0xf007b521,
+ 0xf0098121,
0x21f50037,
- 0xe7f10759,
+ 0xe7f10925,
0x21f41388,
0x013cf07f,
-/* 0x0907: i2c_bitr_done */
+/* 0x0ad3: i2c_bitr_done */
0xf80131f4,
-/* 0x0909: i2c_get_byte */
+/* 0x0ad5: i2c_get_byte */
0x0057f000,
-/* 0x090f: i2c_get_byte_next */
+/* 0x0adb: i2c_get_byte_next */
0xb60847f0,
0x76bb0154,
0x0465b600,
@@ -1591,7 +1715,7 @@ uint32_t gf100_pmu_code[] = {
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb608c221,
+ 0xb60a8e21,
0x11f40464,
0x0553fd2b,
0xf40142b6,
@@ -1602,11 +1726,11 @@ uint32_t gf100_pmu_code[] = {
0xbd0256bb,
0x0475fd50,
0x21f550fc,
- 0x64b60881,
-/* 0x0959: i2c_get_byte_done */
-/* 0x095b: i2c_put_byte */
+ 0x64b60a4d,
+/* 0x0b25: i2c_get_byte_done */
+/* 0x0b27: i2c_put_byte */
0xf000f804,
-/* 0x095e: i2c_put_byte_next */
+/* 0x0b2a: i2c_put_byte_next */
0x42b60847,
0x3854ff01,
0xb60076bb,
@@ -1614,8 +1738,8 @@ uint32_t gf100_pmu_code[] = {
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x8121f550,
- 0x0464b608,
+ 0x4d21f550,
+ 0x0464b60a,
0xb03411f4,
0x1bf40046,
0x0076bbd8,
@@ -1624,20 +1748,20 @@ uint32_t gf100_pmu_code[] = {
0xbd0256bb,
0x0475fd50,
0x21f550fc,
- 0x64b608c2,
+ 0x64b60a8e,
0x0f11f404,
0xb00076bb,
0x1bf40136,
0x0132f406,
-/* 0x09b4: i2c_put_byte_done */
-/* 0x09b6: i2c_addr */
+/* 0x0b80: i2c_put_byte_done */
+/* 0x0b82: i2c_addr */
0x76bb00f8,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb607f221,
+ 0xb609be21,
0x11f40464,
0x2ec3e729,
0x0134b601,
@@ -1647,31 +1771,31 @@ uint32_t gf100_pmu_code[] = {
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x095b21f5,
-/* 0x09fb: i2c_addr_done */
+ 0x0b2721f5,
+/* 0x0bc7: i2c_addr_done */
0xf80464b6,
-/* 0x09fd: i2c_acquire_addr */
+/* 0x0bc9: i2c_acquire_addr */
0xf8cec700,
0xb702e4b6,
- 0x980d1ce0,
+ 0x980d24e0,
0x00f800ee,
-/* 0x0a0c: i2c_acquire */
- 0x09fd21f5,
+/* 0x0bd8: i2c_acquire */
+ 0x0bc921f5,
0xf00421f4,
0x21f403d9,
-/* 0x0a1b: i2c_release */
+/* 0x0be7: i2c_release */
0xf500f83f,
- 0xf409fd21,
+ 0xf40bc921,
0xdaf00421,
0x3f21f403,
-/* 0x0a2a: i2c_recv */
+/* 0x0bf6: i2c_recv */
0x32f400f8,
0xf8c1c701,
0xb00214b6,
0x1ff52816,
0x13a0013a,
- 0x32980cf4,
- 0xcc13a000,
+ 0x32980cfc,
+ 0xd413a000,
0x0031980c,
0xf90231f4,
0xf9e0f9d0,
@@ -1683,8 +1807,8 @@ uint32_t gf100_pmu_code[] = {
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x0c21f550,
- 0x0464b60a,
+ 0xd821f550,
+ 0x0464b60b,
0xd6b0d0fc,
0xb31bf500,
0x0057f000,
@@ -1693,8 +1817,8 @@ uint32_t gf100_pmu_code[] = {
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0xb621f550,
- 0x0464b609,
+ 0x8221f550,
+ 0x0464b60b,
0x00d011f5,
0xbbe0c5c7,
0x65b60076,
@@ -1702,7 +1826,7 @@ uint32_t gf100_pmu_code[] = {
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x095b21f5,
+ 0x0b2721f5,
0xf50464b6,
0xf000ad11,
0x76bb0157,
@@ -1711,7 +1835,7 @@ uint32_t gf100_pmu_code[] = {
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb609b621,
+ 0xb60b8221,
0x11f50464,
0x76bb008a,
0x0465b600,
@@ -1719,7 +1843,7 @@ uint32_t gf100_pmu_code[] = {
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb6090921,
+ 0xb60ad521,
0x11f40464,
0xe05bcb6a,
0xb60076bb,
@@ -1727,38 +1851,38 @@ uint32_t gf100_pmu_code[] = {
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x4e21f550,
- 0x0464b608,
+ 0x1a21f550,
+ 0x0464b60a,
0xbd025bb9,
0x430ef474,
-/* 0x0b30: i2c_recv_not_rd08 */
+/* 0x0cfc: i2c_recv_not_rd08 */
0xf401d6b0,
0x57f03d1b,
- 0xb621f500,
- 0x3311f409,
+ 0x8221f500,
+ 0x3311f40b,
0xf5e0c5c7,
- 0xf4095b21,
+ 0xf40b2721,
0x57f02911,
- 0xb621f500,
- 0x1f11f409,
+ 0x8221f500,
+ 0x1f11f40b,
0xf5e0b5c7,
- 0xf4095b21,
+ 0xf40b2721,
0x21f51511,
- 0x74bd084e,
+ 0x74bd0a1a,
0xf408c5c7,
0x32f4091b,
0x030ef402,
-/* 0x0b70: i2c_recv_not_wr08 */
-/* 0x0b70: i2c_recv_done */
+/* 0x0d3c: i2c_recv_not_wr08 */
+/* 0x0d3c: i2c_recv_done */
0xf5f8cec7,
- 0xfc0a1b21,
+ 0xfc0be721,
0xf4d0fce0,
0x7cb90a12,
0x3721f502,
-/* 0x0b85: i2c_recv_exit */
-/* 0x0b87: i2c_init */
+/* 0x0d51: i2c_recv_exit */
+/* 0x0d53: i2c_init */
0xf800f803,
-/* 0x0b89: test_recv */
+/* 0x0d55: test_recv */
0xd817f100,
0x0614b605,
0xb60011cf,
@@ -1769,12 +1893,12 @@ uint32_t gf100_pmu_code[] = {
0xe3f1d900,
0x21f5134f,
0x00f80257,
-/* 0x0bb0: test_init */
+/* 0x0d7c: test_init */
0x0800e7f1,
0x025721f5,
-/* 0x0bba: idle_recv */
+/* 0x0d86: idle_recv */
0x00f800f8,
-/* 0x0bbc: idle */
+/* 0x0d88: idle */
0xf10031f4,
0xb605d417,
0x11cf0614,
@@ -1782,16 +1906,16 @@ uint32_t gf100_pmu_code[] = {
0x05d407f1,
0xd00604b6,
0x04bd0001,
-/* 0x0bd8: idle_loop */
+/* 0x0da4: idle_loop */
0xf45817f0,
-/* 0x0bde: idle_proc */
-/* 0x0bde: idle_proc_exec */
+/* 0x0daa: idle_proc */
+/* 0x0daa: idle_proc_exec */
0x10f90232,
0xf5021eb9,
0xfc034021,
0x0911f410,
0xf40231f4,
-/* 0x0bf2: idle_proc_next */
+/* 0x0dbe: idle_proc_next */
0x10b6ef0e,
0x061fb858,
0xf4e61bf4,
@@ -1809,55 +1933,4 @@ uint32_t gf100_pmu_code[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
};
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
index 7bf6b39..47858cb 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
@@ -68,7 +68,7 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
- 0x00000684,
+ 0x00000786,
0x00000682,
0x00000000,
0x00000000,
@@ -90,8 +90,8 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
- 0x00000a9f,
- 0x00000942,
+ 0x00000c32,
+ 0x00000ad5,
0x00000000,
0x00000000,
0x00000000,
@@ -112,8 +112,8 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
- 0x00000ac2,
- 0x00000aa1,
+ 0x00000c55,
+ 0x00000c34,
0x00000000,
0x00000000,
0x00000000,
@@ -134,8 +134,8 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
- 0x00000ace,
- 0x00000acc,
+ 0x00000c61,
+ 0x00000c5f,
0x00000000,
0x00000000,
0x00000000,
@@ -834,7 +834,15 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
/* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_attr_start */
+/* 0x0ccc: perf_polling_period_us */
+ 0x000186a0,
+/* 0x0cd0: perf_eng_gr */
+/* 0x0cd1: perf_eng_vid */
+/* 0x0cd2: perf_eng_mc */
+/* 0x0cd3: perf_eng_pcie */
+ 0x00000000,
+/* 0x0cd4: i2c_scl_map */
0x00000400,
0x00000800,
0x00001000,
@@ -845,7 +853,7 @@ uint32_t gf119_pmu_data[] = {
0x00020000,
0x00040000,
0x00080000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
0x00100000,
0x00200000,
0x00400000,
@@ -911,8 +919,6 @@ uint32_t gf119_pmu_data[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
};
uint32_t gf119_pmu_code[] = {
@@ -1392,381 +1398,448 @@ uint32_t gf119_pmu_code[] = {
0x00f8d80b,
/* 0x0680: memx_init */
/* 0x0682: perf_recv */
- 0x00f800f8,
-/* 0x0684: perf_init */
-/* 0x0686: i2c_drive_scl */
- 0x36b000f8,
- 0x0e0bf400,
- 0x07e007f1,
- 0xbd0001d0,
-/* 0x0697: i2c_drive_scl_lo */
- 0xf100f804,
- 0xd007e407,
+ 0xa7f100f8,
+ 0xa3f14f48,
+ 0xeab85453,
+ 0x411bf406,
+ 0xf401d6b0,
+ 0xb4bd501b,
+ 0x07f1c4bd,
+ 0x0c180cd3,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd2,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd1,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd0,
+ 0xf504bd00,
+ 0xf402e621,
+/* 0x06ce: perf_recv_not_host */
+ 0x21f5180e,
+ 0x07f106e5,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0xf501ec21,
+/* 0x06e3: perf_recv_exit */
+ 0xf8021821,
+/* 0x06e5: perf_counter_readout */
+ 0xf910f900,
+ 0xf930f920,
+ 0xf150f940,
+ 0xcf050817,
+ 0x27f10011,
+ 0x22cf0518,
+ 0x2837f100,
+ 0x0033cf05,
+ 0x053847f1,
+ 0xf10044cf,
+ 0xcf054857,
+ 0xe7f10055,
+ 0xe3f10000,
+ 0x07f18000,
+ 0x0ed00508,
+ 0xf104bd00,
+ 0xd0051807,
+ 0x04bd000e,
+ 0x052807f1,
+ 0xbd000ed0,
+ 0x3807f104,
+ 0x000ed005,
+ 0x07f104bd,
+ 0x0ed00548,
+ 0xcc04bd00,
+ 0x21ffff11,
+ 0xd007f12c,
+ 0x0002000c,
+ 0x31ff04bd,
+ 0xd107f13c,
+ 0x0003000c,
+ 0x41ff04bd,
+ 0xd207f14c,
+ 0x0004000c,
+ 0x51ff04bd,
+ 0xd307f15c,
+ 0x0005000c,
+ 0x50fc04bd,
+ 0x30fc40fc,
+ 0x10fc20fc,
+/* 0x0786: perf_init */
+ 0xe7f100f8,
+ 0xe3f00003,
+ 0x0c07f100,
+ 0x000ed005,
+ 0xe7f104bd,
+ 0xe3f00002,
+ 0x1c07f100,
+ 0x000ed005,
+ 0x07f104bd,
+ 0x0ed0052c,
+ 0xf104bd00,
+ 0xd0053c07,
+ 0x04bd000e,
+ 0x054c07f1,
+ 0xbd000ed0,
+ 0x0fe7f104,
+ 0x18e3f000,
+ 0x051407f1,
+ 0xbd000ed0,
+ 0x70e7f104,
+ 0x00e3f000,
+ 0x052407f1,
+ 0xbd000ed0,
+ 0x80e7f104,
+ 0x00e3f000,
+ 0x053407f1,
+ 0xbd000ed0,
+ 0x00e7f104,
+ 0x00e3f100,
+ 0x4407f120,
+ 0x000ed005,
+ 0x21f504bd,
+ 0x07f106e5,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0xf501ec21,
+ 0xf8021821,
+/* 0x0819: i2c_drive_scl */
+ 0x0036b000,
+ 0xf10e0bf4,
+ 0xd007e007,
0x04bd0001,
-/* 0x06a2: i2c_drive_sda */
- 0x36b000f8,
- 0x0e0bf400,
- 0x07e007f1,
- 0xbd0002d0,
-/* 0x06b3: i2c_drive_sda_lo */
- 0xf100f804,
- 0xd007e407,
+/* 0x082a: i2c_drive_scl_lo */
+ 0x07f100f8,
+ 0x01d007e4,
+ 0xf804bd00,
+/* 0x0835: i2c_drive_sda */
+ 0x0036b000,
+ 0xf10e0bf4,
+ 0xd007e007,
0x04bd0002,
-/* 0x06be: i2c_sense_scl */
+/* 0x0846: i2c_drive_sda_lo */
+ 0x07f100f8,
+ 0x02d007e4,
+ 0xf804bd00,
+/* 0x0851: i2c_sense_scl */
+ 0x0132f400,
+ 0x07c437f1,
+ 0xfd0033cf,
+ 0x0bf40431,
+ 0x0131f406,
+/* 0x0864: i2c_sense_scl_done */
+/* 0x0866: i2c_sense_sda */
0x32f400f8,
0xc437f101,
0x0033cf07,
- 0xf40431fd,
+ 0xf40432fd,
0x31f4060b,
-/* 0x06d1: i2c_sense_scl_done */
-/* 0x06d3: i2c_sense_sda */
- 0xf400f801,
- 0x37f10132,
- 0x33cf07c4,
- 0x0432fd00,
- 0xf4060bf4,
-/* 0x06e6: i2c_sense_sda_done */
- 0x00f80131,
-/* 0x06e8: i2c_raise_scl */
- 0x47f140f9,
- 0x37f00898,
- 0x8621f501,
-/* 0x06f5: i2c_raise_scl_wait */
- 0xe8e7f106,
- 0x6721f403,
- 0x06be21f5,
- 0xb60901f4,
- 0x1bf40142,
-/* 0x0709: i2c_raise_scl_done */
- 0xf840fcef,
-/* 0x070d: i2c_start */
- 0xbe21f500,
- 0x0d11f406,
- 0x06d321f5,
- 0xf40611f4,
-/* 0x071e: i2c_start_rep */
- 0x37f0300e,
- 0x8621f500,
- 0x0137f006,
- 0x06a221f5,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xe821f550,
- 0x0464b606,
-/* 0x074b: i2c_start_send */
- 0xf01f11f4,
- 0x21f50037,
- 0xe7f106a2,
- 0x21f41388,
- 0x0037f067,
- 0x068621f5,
- 0x1388e7f1,
-/* 0x0767: i2c_start_out */
- 0xf86721f4,
-/* 0x0769: i2c_stop */
- 0x0037f000,
- 0x068621f5,
- 0xf50037f0,
- 0xf106a221,
- 0xf403e8e7,
- 0x37f06721,
- 0x8621f501,
- 0x88e7f106,
- 0x6721f413,
- 0xf50137f0,
- 0xf106a221,
- 0xf41388e7,
- 0x00f86721,
-/* 0x079c: i2c_bitw */
- 0x06a221f5,
+/* 0x0879: i2c_sense_sda_done */
+/* 0x087b: i2c_raise_scl */
+ 0xf900f801,
+ 0x9847f140,
+ 0x0137f008,
+ 0x081921f5,
+/* 0x0888: i2c_raise_scl_wait */
0x03e8e7f1,
- 0xbb6721f4,
+ 0xf56721f4,
+ 0xf4085121,
+ 0x42b60901,
+ 0xef1bf401,
+/* 0x089c: i2c_raise_scl_done */
+ 0x00f840fc,
+/* 0x08a0: i2c_start */
+ 0x085121f5,
+ 0xf50d11f4,
+ 0xf4086621,
+ 0x0ef40611,
+/* 0x08b1: i2c_start_rep */
+ 0x0037f030,
+ 0x081921f5,
+ 0xf50137f0,
+ 0xbb083521,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x06e821f5,
+ 0x087b21f5,
0xf40464b6,
- 0xe7f11811,
- 0x21f41388,
- 0x0037f067,
- 0x068621f5,
+/* 0x08de: i2c_start_send */
+ 0x37f01f11,
+ 0x3521f500,
+ 0x88e7f108,
+ 0x6721f413,
+ 0xf50037f0,
+ 0xf1081921,
+ 0xf41388e7,
+/* 0x08fa: i2c_start_out */
+ 0x00f86721,
+/* 0x08fc: i2c_stop */
+ 0xf50037f0,
+ 0xf0081921,
+ 0x21f50037,
+ 0xe7f10835,
+ 0x21f403e8,
+ 0x0137f067,
+ 0x081921f5,
0x1388e7f1,
-/* 0x07db: i2c_bitw_out */
- 0xf86721f4,
-/* 0x07dd: i2c_bitr */
- 0x0137f000,
- 0x06a221f5,
- 0x03e8e7f1,
- 0xbb6721f4,
- 0x65b60076,
- 0x9450f904,
- 0x56bb0465,
- 0xfd50bd02,
- 0x50fc0475,
- 0x06e821f5,
- 0xf40464b6,
- 0x21f51b11,
- 0x37f006d3,
- 0x8621f500,
- 0x88e7f106,
+ 0xf06721f4,
+ 0x21f50137,
+ 0xe7f10835,
+ 0x21f41388,
+/* 0x092f: i2c_bitw */
+ 0xf500f867,
+ 0xf1083521,
+ 0xf403e8e7,
+ 0x76bb6721,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6087b21,
+ 0x11f40464,
+ 0x88e7f118,
0x6721f413,
- 0xf4013cf0,
-/* 0x0822: i2c_bitr_done */
- 0x00f80131,
-/* 0x0824: i2c_get_byte */
- 0xf00057f0,
-/* 0x082a: i2c_get_byte_next */
- 0x54b60847,
- 0x0076bb01,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x21f550fc,
- 0x64b607dd,
- 0x2b11f404,
- 0xb60553fd,
- 0x1bf40142,
- 0x0137f0d8,
+ 0xf50037f0,
+ 0xf1081921,
+ 0xf41388e7,
+/* 0x096e: i2c_bitw_out */
+ 0x00f86721,
+/* 0x0970: i2c_bitr */
+ 0xf50137f0,
+ 0xf1083521,
+ 0xf403e8e7,
+ 0x76bb6721,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6087b21,
+ 0x11f40464,
+ 0x6621f51b,
+ 0x0037f008,
+ 0x081921f5,
+ 0x1388e7f1,
+ 0xf06721f4,
+ 0x31f4013c,
+/* 0x09b5: i2c_bitr_done */
+/* 0x09b7: i2c_get_byte */
+ 0xf000f801,
+ 0x47f00057,
+/* 0x09bd: i2c_get_byte_next */
+ 0x0154b608,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x9c21f550,
- 0x0464b607,
-/* 0x0874: i2c_get_byte_done */
-/* 0x0876: i2c_put_byte */
- 0x47f000f8,
-/* 0x0879: i2c_put_byte_next */
- 0x0142b608,
- 0xbb3854ff,
+ 0x7021f550,
+ 0x0464b609,
+ 0xfd2b11f4,
+ 0x42b60553,
+ 0xd81bf401,
+ 0xbb0137f0,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x079c21f5,
+ 0x092f21f5,
+/* 0x0a07: i2c_get_byte_done */
+ 0xf80464b6,
+/* 0x0a09: i2c_put_byte */
+ 0x0847f000,
+/* 0x0a0c: i2c_put_byte_next */
+ 0xff0142b6,
+ 0x76bb3854,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6092f21,
+ 0x11f40464,
+ 0x0046b034,
+ 0xbbd81bf4,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x097021f5,
0xf40464b6,
- 0x46b03411,
- 0xd81bf400,
+ 0x76bb0f11,
+ 0x0136b000,
+ 0xf4061bf4,
+/* 0x0a62: i2c_put_byte_done */
+ 0x00f80132,
+/* 0x0a64: i2c_addr */
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0xdd21f550,
- 0x0464b607,
- 0xbb0f11f4,
- 0x36b00076,
- 0x061bf401,
-/* 0x08cf: i2c_put_byte_done */
- 0xf80132f4,
-/* 0x08d1: i2c_addr */
- 0x0076bb00,
+ 0xa021f550,
+ 0x0464b608,
+ 0xe72911f4,
+ 0xb6012ec3,
+ 0x53fd0134,
+ 0x0076bb05,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
- 0x64b6070d,
- 0x2911f404,
- 0x012ec3e7,
- 0xfd0134b6,
- 0x76bb0553,
- 0x0465b600,
- 0x659450f9,
- 0x0256bb04,
- 0x75fd50bd,
- 0xf550fc04,
- 0xb6087621,
-/* 0x0916: i2c_addr_done */
- 0x00f80464,
-/* 0x0918: i2c_acquire_addr */
- 0xb6f8cec7,
- 0xe0b705e4,
- 0x00f8d014,
-/* 0x0924: i2c_acquire */
- 0x091821f5,
- 0xf00421f4,
- 0x21f403d9,
-/* 0x0933: i2c_release */
- 0xf500f833,
- 0xf4091821,
- 0xdaf00421,
+ 0x64b60a09,
+/* 0x0aa9: i2c_addr_done */
+/* 0x0aab: i2c_acquire_addr */
+ 0xc700f804,
+ 0xe4b6f8ce,
+ 0x14e0b705,
+/* 0x0ab7: i2c_acquire */
+ 0xf500f8d0,
+ 0xf40aab21,
+ 0xd9f00421,
0x3321f403,
-/* 0x0942: i2c_recv */
- 0x32f400f8,
- 0xf8c1c701,
- 0xb00214b6,
- 0x1ff52816,
- 0x13a0013a,
- 0x32980cf4,
- 0xcc13a000,
- 0x0031980c,
- 0xf90231f4,
- 0xf9e0f9d0,
- 0x0067f1d0,
- 0x0063f100,
- 0x01679210,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x2421f550,
- 0x0464b609,
- 0xd6b0d0fc,
- 0xb31bf500,
- 0x0057f000,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xd121f550,
- 0x0464b608,
- 0x00d011f5,
- 0xbbe0c5c7,
+/* 0x0ac6: i2c_release */
+ 0x21f500f8,
+ 0x21f40aab,
+ 0x03daf004,
+ 0xf83321f4,
+/* 0x0ad5: i2c_recv */
+ 0x0132f400,
+ 0xb6f8c1c7,
+ 0x16b00214,
+ 0x3a1ff528,
+ 0xfc13a001,
+ 0x0032980c,
+ 0x0cd413a0,
+ 0xf4003198,
+ 0xd0f90231,
+ 0xd0f9e0f9,
+ 0x000067f1,
+ 0x100063f1,
+ 0xbb016792,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x087621f5,
+ 0x0ab721f5,
+ 0xfc0464b6,
+ 0x00d6b0d0,
+ 0x00b31bf5,
+ 0xbb0057f0,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x0a6421f5,
0xf50464b6,
- 0xf000ad11,
- 0x76bb0157,
+ 0xc700d011,
+ 0x76bbe0c5,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb608d121,
+ 0xb60a0921,
0x11f50464,
- 0x76bb008a,
- 0x0465b600,
- 0x659450f9,
- 0x0256bb04,
- 0x75fd50bd,
- 0xf550fc04,
- 0xb6082421,
- 0x11f40464,
- 0xe05bcb6a,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x6921f550,
- 0x0464b607,
- 0xbd025bb9,
- 0x430ef474,
-/* 0x0a48: i2c_recv_not_rd08 */
- 0xf401d6b0,
- 0x57f03d1b,
- 0xd121f500,
- 0x3311f408,
- 0xf5e0c5c7,
- 0xf4087621,
- 0x57f02911,
- 0xd121f500,
- 0x1f11f408,
- 0xf5e0b5c7,
- 0xf4087621,
- 0x21f51511,
- 0x74bd0769,
- 0xf408c5c7,
- 0x32f4091b,
- 0x030ef402,
-/* 0x0a88: i2c_recv_not_wr08 */
-/* 0x0a88: i2c_recv_done */
- 0xf5f8cec7,
- 0xfc093321,
- 0xf4d0fce0,
- 0x7cb90a12,
- 0xe621f502,
-/* 0x0a9d: i2c_recv_exit */
-/* 0x0a9f: i2c_init */
+ 0x57f000ad,
+ 0x0076bb01,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b60a64,
+ 0x8a11f504,
+ 0x0076bb00,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b609b7,
+ 0x6a11f404,
+ 0xbbe05bcb,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x08fc21f5,
+ 0xb90464b6,
+ 0x74bd025b,
+/* 0x0bdb: i2c_recv_not_rd08 */
+ 0xb0430ef4,
+ 0x1bf401d6,
+ 0x0057f03d,
+ 0x0a6421f5,
+ 0xc73311f4,
+ 0x21f5e0c5,
+ 0x11f40a09,
+ 0x0057f029,
+ 0x0a6421f5,
+ 0xc71f11f4,
+ 0x21f5e0b5,
+ 0x11f40a09,
+ 0xfc21f515,
+ 0xc774bd08,
+ 0x1bf408c5,
+ 0x0232f409,
+/* 0x0c1b: i2c_recv_not_wr08 */
+/* 0x0c1b: i2c_recv_done */
+ 0xc7030ef4,
+ 0x21f5f8ce,
+ 0xe0fc0ac6,
+ 0x12f4d0fc,
+ 0x027cb90a,
+ 0x02e621f5,
+/* 0x0c30: i2c_recv_exit */
+/* 0x0c32: i2c_init */
+ 0x00f800f8,
+/* 0x0c34: test_recv */
+ 0x05d817f1,
+ 0xb60011cf,
+ 0x07f10110,
+ 0x01d005d8,
+ 0xf104bd00,
+ 0xf1d900e7,
+ 0xf5134fe3,
+ 0xf8021821,
+/* 0x0c55: test_init */
+ 0x00e7f100,
+ 0x1821f508,
+/* 0x0c5f: idle_recv */
0xf800f802,
-/* 0x0aa1: test_recv */
- 0xd817f100,
- 0x0011cf05,
- 0xf10110b6,
- 0xd005d807,
- 0x04bd0001,
- 0xd900e7f1,
- 0x134fe3f1,
- 0x021821f5,
-/* 0x0ac2: test_init */
- 0xe7f100f8,
- 0x21f50800,
- 0x00f80218,
-/* 0x0acc: idle_recv */
-/* 0x0ace: idle */
- 0x31f400f8,
- 0xd417f100,
- 0x0011cf05,
- 0xf10110b6,
- 0xd005d407,
- 0x04bd0001,
-/* 0x0ae4: idle_loop */
- 0xf45817f0,
-/* 0x0aea: idle_proc */
-/* 0x0aea: idle_proc_exec */
- 0x10f90232,
- 0xf5021eb9,
- 0xfc02ef21,
- 0x0911f410,
- 0xf40231f4,
-/* 0x0afe: idle_proc_next */
- 0x10b6ef0e,
- 0x061fb858,
- 0xf4e61bf4,
- 0x28f4dd02,
- 0xc10ef400,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
+/* 0x0c61: idle */
+ 0x0031f400,
+ 0x05d417f1,
+ 0xb60011cf,
+ 0x07f10110,
+ 0x01d005d4,
+/* 0x0c77: idle_loop */
+ 0xf004bd00,
+ 0x32f45817,
+/* 0x0c7d: idle_proc */
+/* 0x0c7d: idle_proc_exec */
+ 0xb910f902,
+ 0x21f5021e,
+ 0x10fc02ef,
+ 0xf40911f4,
+ 0x0ef40231,
+/* 0x0c91: idle_proc_next */
+ 0x5810b6ef,
+ 0xf4061fb8,
+ 0x02f4e61b,
+ 0x0028f4dd,
+ 0x00c10ef4,
0x00000000,
0x00000000,
0x00000000,
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
index 61893b1..4c8f5d4 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gk104.fuc4.h
@@ -68,7 +68,7 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
- 0x00000684,
+ 0x00000786,
0x00000682,
0x00000000,
0x00000000,
@@ -90,8 +90,8 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
- 0x00000a9f,
- 0x00000942,
+ 0x00000c32,
+ 0x00000ad5,
0x00000000,
0x00000000,
0x00000000,
@@ -112,8 +112,8 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
- 0x00000ac2,
- 0x00000aa1,
+ 0x00000c55,
+ 0x00000c34,
0x00000000,
0x00000000,
0x00000000,
@@ -134,8 +134,8 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
- 0x00000ace,
- 0x00000acc,
+ 0x00000c61,
+ 0x00000c5f,
0x00000000,
0x00000000,
0x00000000,
@@ -834,7 +834,15 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
/* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_attr_start */
+/* 0x0ccc: perf_polling_period_us */
+ 0x000186a0,
+/* 0x0cd0: perf_eng_gr */
+/* 0x0cd1: perf_eng_vid */
+/* 0x0cd2: perf_eng_mc */
+/* 0x0cd3: perf_eng_pcie */
+ 0x00000000,
+/* 0x0cd4: i2c_scl_map */
0x00000400,
0x00000800,
0x00001000,
@@ -845,7 +853,7 @@ uint32_t gk104_pmu_data[] = {
0x00020000,
0x00040000,
0x00080000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
0x00100000,
0x00200000,
0x00400000,
@@ -911,8 +919,6 @@ uint32_t gk104_pmu_data[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
};
uint32_t gk104_pmu_code[] = {
@@ -1392,381 +1398,448 @@ uint32_t gk104_pmu_code[] = {
0x00f8d80b,
/* 0x0680: memx_init */
/* 0x0682: perf_recv */
- 0x00f800f8,
-/* 0x0684: perf_init */
-/* 0x0686: i2c_drive_scl */
- 0x36b000f8,
- 0x0e0bf400,
- 0x07e007f1,
- 0xbd0001d0,
-/* 0x0697: i2c_drive_scl_lo */
- 0xf100f804,
- 0xd007e407,
+ 0xa7f100f8,
+ 0xa3f14f48,
+ 0xeab85453,
+ 0x411bf406,
+ 0xf401d6b0,
+ 0xb4bd501b,
+ 0x07f1c4bd,
+ 0x0c180cd3,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd2,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd1,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd0,
+ 0xf504bd00,
+ 0xf402e621,
+/* 0x06ce: perf_recv_not_host */
+ 0x21f5180e,
+ 0x07f106e5,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0xf501ec21,
+/* 0x06e3: perf_recv_exit */
+ 0xf8021821,
+/* 0x06e5: perf_counter_readout */
+ 0xf910f900,
+ 0xf930f920,
+ 0xf150f940,
+ 0xcf050817,
+ 0x27f10011,
+ 0x22cf0518,
+ 0x2837f100,
+ 0x0033cf05,
+ 0x053847f1,
+ 0xf10044cf,
+ 0xcf054857,
+ 0xe7f10055,
+ 0xe3f10000,
+ 0x07f18000,
+ 0x0ed00508,
+ 0xf104bd00,
+ 0xd0051807,
+ 0x04bd000e,
+ 0x052807f1,
+ 0xbd000ed0,
+ 0x3807f104,
+ 0x000ed005,
+ 0x07f104bd,
+ 0x0ed00548,
+ 0xcc04bd00,
+ 0x21ffff11,
+ 0xd007f12c,
+ 0x0002000c,
+ 0x31ff04bd,
+ 0xd107f13c,
+ 0x0003000c,
+ 0x41ff04bd,
+ 0xd207f14c,
+ 0x0004000c,
+ 0x51ff04bd,
+ 0xd307f15c,
+ 0x0005000c,
+ 0x50fc04bd,
+ 0x30fc40fc,
+ 0x10fc20fc,
+/* 0x0786: perf_init */
+ 0xe7f100f8,
+ 0xe3f00003,
+ 0x0c07f100,
+ 0x000ed005,
+ 0xe7f104bd,
+ 0xe3f00002,
+ 0x1c07f100,
+ 0x000ed005,
+ 0x07f104bd,
+ 0x0ed0052c,
+ 0xf104bd00,
+ 0xd0053c07,
+ 0x04bd000e,
+ 0x054c07f1,
+ 0xbd000ed0,
+ 0x0fe7f104,
+ 0x38e3f000,
+ 0x051407f1,
+ 0xbd000ed0,
+ 0x70e7f104,
+ 0x02e3f000,
+ 0x052407f1,
+ 0xbd000ed0,
+ 0x80e7f104,
+ 0x00e3f000,
+ 0x053407f1,
+ 0xbd000ed0,
+ 0x00e7f104,
+ 0x00e3f100,
+ 0x4407f120,
+ 0x000ed005,
+ 0x21f504bd,
+ 0x07f106e5,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0xf501ec21,
+ 0xf8021821,
+/* 0x0819: i2c_drive_scl */
+ 0x0036b000,
+ 0xf10e0bf4,
+ 0xd007e007,
0x04bd0001,
-/* 0x06a2: i2c_drive_sda */
- 0x36b000f8,
- 0x0e0bf400,
- 0x07e007f1,
- 0xbd0002d0,
-/* 0x06b3: i2c_drive_sda_lo */
- 0xf100f804,
- 0xd007e407,
+/* 0x082a: i2c_drive_scl_lo */
+ 0x07f100f8,
+ 0x01d007e4,
+ 0xf804bd00,
+/* 0x0835: i2c_drive_sda */
+ 0x0036b000,
+ 0xf10e0bf4,
+ 0xd007e007,
0x04bd0002,
-/* 0x06be: i2c_sense_scl */
+/* 0x0846: i2c_drive_sda_lo */
+ 0x07f100f8,
+ 0x02d007e4,
+ 0xf804bd00,
+/* 0x0851: i2c_sense_scl */
+ 0x0132f400,
+ 0x07c437f1,
+ 0xfd0033cf,
+ 0x0bf40431,
+ 0x0131f406,
+/* 0x0864: i2c_sense_scl_done */
+/* 0x0866: i2c_sense_sda */
0x32f400f8,
0xc437f101,
0x0033cf07,
- 0xf40431fd,
+ 0xf40432fd,
0x31f4060b,
-/* 0x06d1: i2c_sense_scl_done */
-/* 0x06d3: i2c_sense_sda */
- 0xf400f801,
- 0x37f10132,
- 0x33cf07c4,
- 0x0432fd00,
- 0xf4060bf4,
-/* 0x06e6: i2c_sense_sda_done */
- 0x00f80131,
-/* 0x06e8: i2c_raise_scl */
- 0x47f140f9,
- 0x37f00898,
- 0x8621f501,
-/* 0x06f5: i2c_raise_scl_wait */
- 0xe8e7f106,
- 0x6721f403,
- 0x06be21f5,
- 0xb60901f4,
- 0x1bf40142,
-/* 0x0709: i2c_raise_scl_done */
- 0xf840fcef,
-/* 0x070d: i2c_start */
- 0xbe21f500,
- 0x0d11f406,
- 0x06d321f5,
- 0xf40611f4,
-/* 0x071e: i2c_start_rep */
- 0x37f0300e,
- 0x8621f500,
- 0x0137f006,
- 0x06a221f5,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xe821f550,
- 0x0464b606,
-/* 0x074b: i2c_start_send */
- 0xf01f11f4,
- 0x21f50037,
- 0xe7f106a2,
- 0x21f41388,
- 0x0037f067,
- 0x068621f5,
- 0x1388e7f1,
-/* 0x0767: i2c_start_out */
- 0xf86721f4,
-/* 0x0769: i2c_stop */
- 0x0037f000,
- 0x068621f5,
- 0xf50037f0,
- 0xf106a221,
- 0xf403e8e7,
- 0x37f06721,
- 0x8621f501,
- 0x88e7f106,
- 0x6721f413,
- 0xf50137f0,
- 0xf106a221,
- 0xf41388e7,
- 0x00f86721,
-/* 0x079c: i2c_bitw */
- 0x06a221f5,
+/* 0x0879: i2c_sense_sda_done */
+/* 0x087b: i2c_raise_scl */
+ 0xf900f801,
+ 0x9847f140,
+ 0x0137f008,
+ 0x081921f5,
+/* 0x0888: i2c_raise_scl_wait */
0x03e8e7f1,
- 0xbb6721f4,
+ 0xf56721f4,
+ 0xf4085121,
+ 0x42b60901,
+ 0xef1bf401,
+/* 0x089c: i2c_raise_scl_done */
+ 0x00f840fc,
+/* 0x08a0: i2c_start */
+ 0x085121f5,
+ 0xf50d11f4,
+ 0xf4086621,
+ 0x0ef40611,
+/* 0x08b1: i2c_start_rep */
+ 0x0037f030,
+ 0x081921f5,
+ 0xf50137f0,
+ 0xbb083521,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x06e821f5,
+ 0x087b21f5,
0xf40464b6,
- 0xe7f11811,
- 0x21f41388,
- 0x0037f067,
- 0x068621f5,
+/* 0x08de: i2c_start_send */
+ 0x37f01f11,
+ 0x3521f500,
+ 0x88e7f108,
+ 0x6721f413,
+ 0xf50037f0,
+ 0xf1081921,
+ 0xf41388e7,
+/* 0x08fa: i2c_start_out */
+ 0x00f86721,
+/* 0x08fc: i2c_stop */
+ 0xf50037f0,
+ 0xf0081921,
+ 0x21f50037,
+ 0xe7f10835,
+ 0x21f403e8,
+ 0x0137f067,
+ 0x081921f5,
0x1388e7f1,
-/* 0x07db: i2c_bitw_out */
- 0xf86721f4,
-/* 0x07dd: i2c_bitr */
- 0x0137f000,
- 0x06a221f5,
- 0x03e8e7f1,
- 0xbb6721f4,
- 0x65b60076,
- 0x9450f904,
- 0x56bb0465,
- 0xfd50bd02,
- 0x50fc0475,
- 0x06e821f5,
- 0xf40464b6,
- 0x21f51b11,
- 0x37f006d3,
- 0x8621f500,
- 0x88e7f106,
+ 0xf06721f4,
+ 0x21f50137,
+ 0xe7f10835,
+ 0x21f41388,
+/* 0x092f: i2c_bitw */
+ 0xf500f867,
+ 0xf1083521,
+ 0xf403e8e7,
+ 0x76bb6721,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6087b21,
+ 0x11f40464,
+ 0x88e7f118,
0x6721f413,
- 0xf4013cf0,
-/* 0x0822: i2c_bitr_done */
- 0x00f80131,
-/* 0x0824: i2c_get_byte */
- 0xf00057f0,
-/* 0x082a: i2c_get_byte_next */
- 0x54b60847,
- 0x0076bb01,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x21f550fc,
- 0x64b607dd,
- 0x2b11f404,
- 0xb60553fd,
- 0x1bf40142,
- 0x0137f0d8,
+ 0xf50037f0,
+ 0xf1081921,
+ 0xf41388e7,
+/* 0x096e: i2c_bitw_out */
+ 0x00f86721,
+/* 0x0970: i2c_bitr */
+ 0xf50137f0,
+ 0xf1083521,
+ 0xf403e8e7,
+ 0x76bb6721,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6087b21,
+ 0x11f40464,
+ 0x6621f51b,
+ 0x0037f008,
+ 0x081921f5,
+ 0x1388e7f1,
+ 0xf06721f4,
+ 0x31f4013c,
+/* 0x09b5: i2c_bitr_done */
+/* 0x09b7: i2c_get_byte */
+ 0xf000f801,
+ 0x47f00057,
+/* 0x09bd: i2c_get_byte_next */
+ 0x0154b608,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x9c21f550,
- 0x0464b607,
-/* 0x0874: i2c_get_byte_done */
-/* 0x0876: i2c_put_byte */
- 0x47f000f8,
-/* 0x0879: i2c_put_byte_next */
- 0x0142b608,
- 0xbb3854ff,
+ 0x7021f550,
+ 0x0464b609,
+ 0xfd2b11f4,
+ 0x42b60553,
+ 0xd81bf401,
+ 0xbb0137f0,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x079c21f5,
+ 0x092f21f5,
+/* 0x0a07: i2c_get_byte_done */
+ 0xf80464b6,
+/* 0x0a09: i2c_put_byte */
+ 0x0847f000,
+/* 0x0a0c: i2c_put_byte_next */
+ 0xff0142b6,
+ 0x76bb3854,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb6092f21,
+ 0x11f40464,
+ 0x0046b034,
+ 0xbbd81bf4,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x097021f5,
0xf40464b6,
- 0x46b03411,
- 0xd81bf400,
+ 0x76bb0f11,
+ 0x0136b000,
+ 0xf4061bf4,
+/* 0x0a62: i2c_put_byte_done */
+ 0x00f80132,
+/* 0x0a64: i2c_addr */
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0xdd21f550,
- 0x0464b607,
- 0xbb0f11f4,
- 0x36b00076,
- 0x061bf401,
-/* 0x08cf: i2c_put_byte_done */
- 0xf80132f4,
-/* 0x08d1: i2c_addr */
- 0x0076bb00,
+ 0xa021f550,
+ 0x0464b608,
+ 0xe72911f4,
+ 0xb6012ec3,
+ 0x53fd0134,
+ 0x0076bb05,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
0x21f550fc,
- 0x64b6070d,
- 0x2911f404,
- 0x012ec3e7,
- 0xfd0134b6,
- 0x76bb0553,
- 0x0465b600,
- 0x659450f9,
- 0x0256bb04,
- 0x75fd50bd,
- 0xf550fc04,
- 0xb6087621,
-/* 0x0916: i2c_addr_done */
- 0x00f80464,
-/* 0x0918: i2c_acquire_addr */
- 0xb6f8cec7,
- 0xe0b705e4,
- 0x00f8d014,
-/* 0x0924: i2c_acquire */
- 0x091821f5,
- 0xf00421f4,
- 0x21f403d9,
-/* 0x0933: i2c_release */
- 0xf500f833,
- 0xf4091821,
- 0xdaf00421,
+ 0x64b60a09,
+/* 0x0aa9: i2c_addr_done */
+/* 0x0aab: i2c_acquire_addr */
+ 0xc700f804,
+ 0xe4b6f8ce,
+ 0x14e0b705,
+/* 0x0ab7: i2c_acquire */
+ 0xf500f8d0,
+ 0xf40aab21,
+ 0xd9f00421,
0x3321f403,
-/* 0x0942: i2c_recv */
- 0x32f400f8,
- 0xf8c1c701,
- 0xb00214b6,
- 0x1ff52816,
- 0x13a0013a,
- 0x32980cf4,
- 0xcc13a000,
- 0x0031980c,
- 0xf90231f4,
- 0xf9e0f9d0,
- 0x0067f1d0,
- 0x0063f100,
- 0x01679210,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x2421f550,
- 0x0464b609,
- 0xd6b0d0fc,
- 0xb31bf500,
- 0x0057f000,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xd121f550,
- 0x0464b608,
- 0x00d011f5,
- 0xbbe0c5c7,
+/* 0x0ac6: i2c_release */
+ 0x21f500f8,
+ 0x21f40aab,
+ 0x03daf004,
+ 0xf83321f4,
+/* 0x0ad5: i2c_recv */
+ 0x0132f400,
+ 0xb6f8c1c7,
+ 0x16b00214,
+ 0x3a1ff528,
+ 0xfc13a001,
+ 0x0032980c,
+ 0x0cd413a0,
+ 0xf4003198,
+ 0xd0f90231,
+ 0xd0f9e0f9,
+ 0x000067f1,
+ 0x100063f1,
+ 0xbb016792,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x087621f5,
+ 0x0ab721f5,
+ 0xfc0464b6,
+ 0x00d6b0d0,
+ 0x00b31bf5,
+ 0xbb0057f0,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x0a6421f5,
0xf50464b6,
- 0xf000ad11,
- 0x76bb0157,
+ 0xc700d011,
+ 0x76bbe0c5,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb608d121,
+ 0xb60a0921,
0x11f50464,
- 0x76bb008a,
- 0x0465b600,
- 0x659450f9,
- 0x0256bb04,
- 0x75fd50bd,
- 0xf550fc04,
- 0xb6082421,
- 0x11f40464,
- 0xe05bcb6a,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x6921f550,
- 0x0464b607,
- 0xbd025bb9,
- 0x430ef474,
-/* 0x0a48: i2c_recv_not_rd08 */
- 0xf401d6b0,
- 0x57f03d1b,
- 0xd121f500,
- 0x3311f408,
- 0xf5e0c5c7,
- 0xf4087621,
- 0x57f02911,
- 0xd121f500,
- 0x1f11f408,
- 0xf5e0b5c7,
- 0xf4087621,
- 0x21f51511,
- 0x74bd0769,
- 0xf408c5c7,
- 0x32f4091b,
- 0x030ef402,
-/* 0x0a88: i2c_recv_not_wr08 */
-/* 0x0a88: i2c_recv_done */
- 0xf5f8cec7,
- 0xfc093321,
- 0xf4d0fce0,
- 0x7cb90a12,
- 0xe621f502,
-/* 0x0a9d: i2c_recv_exit */
-/* 0x0a9f: i2c_init */
+ 0x57f000ad,
+ 0x0076bb01,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b60a64,
+ 0x8a11f504,
+ 0x0076bb00,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b609b7,
+ 0x6a11f404,
+ 0xbbe05bcb,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x08fc21f5,
+ 0xb90464b6,
+ 0x74bd025b,
+/* 0x0bdb: i2c_recv_not_rd08 */
+ 0xb0430ef4,
+ 0x1bf401d6,
+ 0x0057f03d,
+ 0x0a6421f5,
+ 0xc73311f4,
+ 0x21f5e0c5,
+ 0x11f40a09,
+ 0x0057f029,
+ 0x0a6421f5,
+ 0xc71f11f4,
+ 0x21f5e0b5,
+ 0x11f40a09,
+ 0xfc21f515,
+ 0xc774bd08,
+ 0x1bf408c5,
+ 0x0232f409,
+/* 0x0c1b: i2c_recv_not_wr08 */
+/* 0x0c1b: i2c_recv_done */
+ 0xc7030ef4,
+ 0x21f5f8ce,
+ 0xe0fc0ac6,
+ 0x12f4d0fc,
+ 0x027cb90a,
+ 0x02e621f5,
+/* 0x0c30: i2c_recv_exit */
+/* 0x0c32: i2c_init */
+ 0x00f800f8,
+/* 0x0c34: test_recv */
+ 0x05d817f1,
+ 0xb60011cf,
+ 0x07f10110,
+ 0x01d005d8,
+ 0xf104bd00,
+ 0xf1d900e7,
+ 0xf5134fe3,
+ 0xf8021821,
+/* 0x0c55: test_init */
+ 0x00e7f100,
+ 0x1821f508,
+/* 0x0c5f: idle_recv */
0xf800f802,
-/* 0x0aa1: test_recv */
- 0xd817f100,
- 0x0011cf05,
- 0xf10110b6,
- 0xd005d807,
- 0x04bd0001,
- 0xd900e7f1,
- 0x134fe3f1,
- 0x021821f5,
-/* 0x0ac2: test_init */
- 0xe7f100f8,
- 0x21f50800,
- 0x00f80218,
-/* 0x0acc: idle_recv */
-/* 0x0ace: idle */
- 0x31f400f8,
- 0xd417f100,
- 0x0011cf05,
- 0xf10110b6,
- 0xd005d407,
- 0x04bd0001,
-/* 0x0ae4: idle_loop */
- 0xf45817f0,
-/* 0x0aea: idle_proc */
-/* 0x0aea: idle_proc_exec */
- 0x10f90232,
- 0xf5021eb9,
- 0xfc02ef21,
- 0x0911f410,
- 0xf40231f4,
-/* 0x0afe: idle_proc_next */
- 0x10b6ef0e,
- 0x061fb858,
- 0xf4e61bf4,
- 0x28f4dd02,
- 0xc10ef400,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
+/* 0x0c61: idle */
+ 0x0031f400,
+ 0x05d417f1,
+ 0xb60011cf,
+ 0x07f10110,
+ 0x01d005d4,
+/* 0x0c77: idle_loop */
+ 0xf004bd00,
+ 0x32f45817,
+/* 0x0c7d: idle_proc */
+/* 0x0c7d: idle_proc_exec */
+ 0xb910f902,
+ 0x21f5021e,
+ 0x10fc02ef,
+ 0xf40911f4,
+ 0x0ef40231,
+/* 0x0c91: idle_proc_next */
+ 0x5810b6ef,
+ 0xf4061fb8,
+ 0x02f4e61b,
+ 0x0028f4dd,
+ 0x00c10ef4,
0x00000000,
0x00000000,
0x00000000,
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
index 8a2b628..9b0da65 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
@@ -68,7 +68,7 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
- 0x00000625,
+ 0x00000718,
0x00000623,
0x00000000,
0x00000000,
@@ -90,8 +90,8 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
- 0x00000a29,
- 0x000008d0,
+ 0x00000ba4,
+ 0x00000a4b,
0x00000000,
0x00000000,
0x00000000,
@@ -112,8 +112,8 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
- 0x00000a4a,
- 0x00000a2b,
+ 0x00000bc5,
+ 0x00000ba6,
0x00000000,
0x00000000,
0x00000000,
@@ -134,8 +134,8 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
- 0x00000a55,
- 0x00000a53,
+ 0x00000bd0,
+ 0x00000bce,
0x00000000,
0x00000000,
0x00000000,
@@ -834,7 +834,15 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
/* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_attr_start */
+/* 0x0ccc: perf_polling_period_us */
+ 0x000186a0,
+/* 0x0cd0: perf_eng_gr */
+/* 0x0cd1: perf_eng_vid */
+/* 0x0cd2: perf_eng_mc */
+/* 0x0cd3: perf_eng_pcie */
+ 0x00000000,
+/* 0x0cd4: i2c_scl_map */
0x00000400,
0x00000800,
0x00001000,
@@ -845,7 +853,7 @@ uint32_t gk208_pmu_data[] = {
0x00020000,
0x00040000,
0x00080000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
0x00100000,
0x00200000,
0x00400000,
@@ -911,8 +919,6 @@ uint32_t gk208_pmu_data[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
};
uint32_t gk208_pmu_code[] = {
@@ -1368,337 +1374,468 @@ uint32_t gk208_pmu_code[] = {
0xf8dc0bf4,
/* 0x0621: memx_init */
/* 0x0623: perf_recv */
- 0xf800f800,
-/* 0x0625: perf_init */
-/* 0x0627: i2c_drive_scl */
- 0xb000f800,
- 0x0bf40036,
- 0x07e0400d,
- 0xbd0001f6,
-/* 0x0637: i2c_drive_scl_lo */
- 0x4000f804,
- 0x01f607e4,
- 0xf804bd00,
-/* 0x0641: i2c_drive_sda */
- 0x0036b000,
- 0x400d0bf4,
- 0x02f607e0,
- 0xf804bd00,
-/* 0x0651: i2c_drive_sda_lo */
- 0x07e44000,
- 0xbd0002f6,
-/* 0x065b: i2c_sense_scl */
- 0xf400f804,
- 0xc4430132,
- 0x0033cf07,
- 0xf40431fd,
- 0x31f4060b,
-/* 0x066d: i2c_sense_scl_done */
-/* 0x066f: i2c_sense_sda */
- 0xf400f801,
- 0xc4430132,
- 0x0033cf07,
- 0xf40432fd,
- 0x31f4060b,
-/* 0x0681: i2c_sense_sda_done */
-/* 0x0683: i2c_raise_scl */
- 0xf900f801,
- 0x08984440,
- 0x277e0103,
-/* 0x068e: i2c_raise_scl_wait */
- 0xe84e0006,
- 0x005d7e03,
- 0x065b7e00,
- 0x0901f400,
- 0xf40142b6,
-/* 0x06a2: i2c_raise_scl_done */
- 0x40fcef1b,
-/* 0x06a6: i2c_start */
- 0x5b7e00f8,
- 0x11f40006,
- 0x066f7e0d,
- 0x0611f400,
-/* 0x06b7: i2c_start_rep */
- 0x032e0ef4,
- 0x06277e00,
+ 0xf100f800,
+ 0xf14f48a7,
+ 0xa65453a3,
+ 0x411bf4ea,
+ 0xf401d6b0,
+ 0xb4bd501b,
+ 0x07f1c4bd,
+ 0x0c180cd3,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd2,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd1,
+ 0xb604bd00,
+ 0x07f108c4,
+ 0x0c180cd0,
+ 0x7e04bd00,
+ 0xf40002b6,
+/* 0x066e: perf_recv_not_host */
+ 0x857e180e,
+ 0x07f10006,
+ 0x0e980ccc,
+ 0xf504bd00,
+ 0x7e01ca21,
+/* 0x0683: perf_recv_exit */
+ 0xf80001f5,
+/* 0x0685: perf_counter_readout */
+ 0xf910f900,
+ 0xf930f920,
+ 0x4150f940,
+ 0x11cf0508,
+ 0x05184200,
+ 0x430022cf,
+ 0x33cf0528,
+ 0x05384400,
+ 0x450044cf,
+ 0x55cf0548,
+ 0x00e7f100,
+ 0x00e3f100,
+ 0x05084080,
+ 0xbd000ef6,
+ 0x05184004,
+ 0xbd000ef6,
+ 0x05284004,
+ 0xbd000ef6,
+ 0x05384004,
+ 0xbd000ef6,
+ 0x05484004,
+ 0xbd000ef6,
+ 0xff11cc04,
+ 0xf12c21ff,
+ 0x200cd007,
+ 0xff04bd02,
+ 0x07f13c31,
+ 0x03200cd1,
+ 0x41ff04bd,
+ 0xd207f14c,
+ 0xbd04200c,
+ 0x5c51ff04,
+ 0x0cd307f1,
+ 0x04bd0520,
+ 0x40fc50fc,
+ 0x20fc30fc,
+ 0x00f810fc,
+/* 0x0718: perf_init */
+ 0x0003e7f1,
+ 0x4000e3f0,
+ 0x0ef6050c,
+ 0xf104bd00,
+ 0xf00002e7,
+ 0x1c4000e3,
+ 0x000ef605,
+ 0x2c4004bd,
+ 0x000ef605,
+ 0x3c4004bd,
+ 0x000ef605,
+ 0x4c4004bd,
+ 0x000ef605,
+ 0xe7f104bd,
+ 0xe3f0000f,
+ 0x05144038,
+ 0xbd000ef6,
+ 0x70e7f104,
+ 0x02e3f000,
+ 0xf6052440,
+ 0x04bd000e,
+ 0x0080e7f1,
+ 0x4000e3f0,
+ 0x0ef60534,
+ 0xf104bd00,
+ 0xf10000e7,
+ 0x402000e3,
+ 0x0ef60544,
+ 0x7e04bd00,
+ 0xf1000685,
+ 0x980ccc07,
+ 0x04bd000e,
+ 0x01ca21f5,
+ 0x0001f57e,
+/* 0x07a2: i2c_drive_scl */
+ 0x36b000f8,
+ 0x0d0bf400,
+ 0xf607e040,
+ 0x04bd0001,
+/* 0x07b2: i2c_drive_scl_lo */
+ 0xe44000f8,
+ 0x0001f607,
+ 0x00f804bd,
+/* 0x07bc: i2c_drive_sda */
+ 0xf40036b0,
+ 0xe0400d0b,
+ 0x0002f607,
+ 0x00f804bd,
+/* 0x07cc: i2c_drive_sda_lo */
+ 0xf607e440,
+ 0x04bd0002,
+/* 0x07d6: i2c_sense_scl */
+ 0x32f400f8,
+ 0x07c44301,
+ 0xfd0033cf,
+ 0x0bf40431,
+ 0x0131f406,
+/* 0x07e8: i2c_sense_scl_done */
+/* 0x07ea: i2c_sense_sda */
+ 0x32f400f8,
+ 0x07c44301,
+ 0xfd0033cf,
+ 0x0bf40432,
+ 0x0131f406,
+/* 0x07fc: i2c_sense_sda_done */
+/* 0x07fe: i2c_raise_scl */
+ 0x40f900f8,
+ 0x03089844,
+ 0x07a27e01,
+/* 0x0809: i2c_raise_scl_wait */
+ 0x03e84e00,
+ 0x00005d7e,
+ 0x0007d67e,
+ 0xb60901f4,
+ 0x1bf40142,
+/* 0x081d: i2c_raise_scl_done */
+ 0xf840fcef,
+/* 0x0821: i2c_start */
+ 0x07d67e00,
+ 0x0d11f400,
+ 0x0007ea7e,
+ 0xf40611f4,
+/* 0x0832: i2c_start_rep */
+ 0x00032e0e,
+ 0x0007a27e,
+ 0xbc7e0103,
+ 0x76bb0007,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0x7e50fc04,
+ 0xb60007fe,
+ 0x11f40464,
+/* 0x085d: i2c_start_send */
+ 0x7e00031d,
+ 0x4e0007bc,
+ 0x5d7e1388,
+ 0x00030000,
+ 0x0007a27e,
+ 0x7e13884e,
+/* 0x0877: i2c_start_out */
+ 0xf800005d,
+/* 0x0879: i2c_stop */
+ 0x7e000300,
+ 0x030007a2,
+ 0x07bc7e00,
+ 0x03e84e00,
+ 0x00005d7e,
+ 0xa27e0103,
+ 0x884e0007,
+ 0x005d7e13,
0x7e010300,
- 0xbb000641,
+ 0x4e0007bc,
+ 0x5d7e1388,
+ 0x00f80000,
+/* 0x08a8: i2c_bitw */
+ 0x0007bc7e,
+ 0x7e03e84e,
+ 0xbb00005d,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x0006837e,
+ 0x0007fe7e,
0xf40464b6,
-/* 0x06e2: i2c_start_send */
- 0x00031d11,
- 0x0006417e,
- 0x7e13884e,
- 0x0300005d,
- 0x06277e00,
- 0x13884e00,
- 0x00005d7e,
-/* 0x06fc: i2c_start_out */
-/* 0x06fe: i2c_stop */
- 0x000300f8,
- 0x0006277e,
- 0x417e0003,
- 0xe84e0006,
- 0x005d7e03,
- 0x7e010300,
- 0x4e000627,
+ 0x884e1711,
+ 0x005d7e13,
+ 0x7e000300,
+ 0x4e0007a2,
0x5d7e1388,
- 0x01030000,
- 0x0006417e,
- 0x7e13884e,
- 0xf800005d,
-/* 0x072d: i2c_bitw */
- 0x06417e00,
- 0x03e84e00,
- 0x00005d7e,
+/* 0x08e6: i2c_bitw_out */
+ 0x00f80000,
+/* 0x08e8: i2c_bitr */
+ 0xbc7e0103,
+ 0xe84e0007,
+ 0x005d7e03,
+ 0x0076bb00,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0xfe7e50fc,
+ 0x64b60007,
+ 0x1a11f404,
+ 0x0007ea7e,
+ 0xa27e0003,
+ 0x884e0007,
+ 0x005d7e13,
+ 0x013cf000,
+/* 0x092b: i2c_bitr_done */
+ 0xf80131f4,
+/* 0x092d: i2c_get_byte */
+ 0x04000500,
+/* 0x0931: i2c_get_byte_next */
+ 0x0154b608,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x06837e50,
+ 0x08e87e50,
0x0464b600,
- 0x4e1711f4,
- 0x5d7e1388,
- 0x00030000,
- 0x0006277e,
- 0x7e13884e,
-/* 0x076b: i2c_bitw_out */
- 0xf800005d,
-/* 0x076d: i2c_bitr */
- 0x7e010300,
- 0x4e000641,
- 0x5d7e03e8,
- 0x76bb0000,
+ 0xfd2a11f4,
+ 0x42b60553,
+ 0xd81bf401,
+ 0x76bb0103,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
- 0xb6000683,
- 0x11f40464,
- 0x066f7e1a,
- 0x7e000300,
- 0x4e000627,
- 0x5d7e1388,
- 0x3cf00000,
- 0x0131f401,
-/* 0x07b0: i2c_bitr_done */
-/* 0x07b2: i2c_get_byte */
- 0x000500f8,
-/* 0x07b6: i2c_get_byte_next */
- 0x54b60804,
- 0x0076bb01,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x6d7e50fc,
- 0x64b60007,
- 0x2a11f404,
- 0xb60553fd,
- 0x1bf40142,
- 0xbb0103d8,
- 0x65b60076,
- 0x9450f904,
- 0x56bb0465,
- 0xfd50bd02,
- 0x50fc0475,
- 0x00072d7e,
-/* 0x07ff: i2c_get_byte_done */
- 0xf80464b6,
-/* 0x0801: i2c_put_byte */
-/* 0x0803: i2c_put_byte_next */
- 0xb6080400,
- 0x54ff0142,
- 0x0076bb38,
+ 0xb60008a8,
+/* 0x097a: i2c_get_byte_done */
+ 0x00f80464,
+/* 0x097c: i2c_put_byte */
+/* 0x097e: i2c_put_byte_next */
+ 0x42b60804,
+ 0x3854ff01,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0x08a87e50,
+ 0x0464b600,
+ 0xb03411f4,
+ 0x1bf40046,
+ 0x0076bbd8,
0xf90465b6,
0x04659450,
0xbd0256bb,
0x0475fd50,
- 0x2d7e50fc,
- 0x64b60007,
- 0x3411f404,
- 0xf40046b0,
- 0x76bbd81b,
+ 0xe87e50fc,
+ 0x64b60008,
+ 0x0f11f404,
+ 0xb00076bb,
+ 0x1bf40136,
+ 0x0132f406,
+/* 0x09d4: i2c_put_byte_done */
+/* 0x09d6: i2c_addr */
+ 0x76bb00f8,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
- 0xb600076d,
+ 0xb6000821,
0x11f40464,
- 0x0076bb0f,
- 0xf40136b0,
- 0x32f4061b,
-/* 0x0859: i2c_put_byte_done */
-/* 0x085b: i2c_addr */
- 0xbb00f801,
+ 0x2ec3e729,
+ 0x0134b601,
+ 0xbb0553fd,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x0006a67e,
- 0xf40464b6,
- 0xc3e72911,
- 0x34b6012e,
- 0x0553fd01,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x08017e50,
- 0x0464b600,
-/* 0x08a0: i2c_addr_done */
-/* 0x08a2: i2c_acquire_addr */
- 0xcec700f8,
- 0x05e4b6f8,
- 0xd014e0b7,
-/* 0x08ae: i2c_acquire */
- 0xa27e00f8,
- 0x047e0008,
- 0xd9f00000,
+ 0x00097c7e,
+/* 0x0a1b: i2c_addr_done */
+ 0xf80464b6,
+/* 0x0a1d: i2c_acquire_addr */
+ 0xf8cec700,
+ 0xb705e4b6,
+ 0xf8d014e0,
+/* 0x0a29: i2c_acquire */
+ 0x0a1d7e00,
+ 0x00047e00,
+ 0x03d9f000,
+ 0x00002e7e,
+/* 0x0a3a: i2c_release */
+ 0x1d7e00f8,
+ 0x047e000a,
+ 0xdaf00000,
0x002e7e03,
-/* 0x08bf: i2c_release */
- 0x7e00f800,
- 0x7e0008a2,
- 0xf0000004,
- 0x2e7e03da,
- 0x00f80000,
-/* 0x08d0: i2c_recv */
- 0xc70132f4,
- 0x14b6f8c1,
- 0x2816b002,
- 0x01371ff5,
- 0x0cf413b8,
- 0x00329800,
- 0x0ccc13b8,
- 0x00319800,
- 0xf90231f4,
- 0xf9e0f9d0,
- 0x0067f1d0,
- 0x0063f100,
- 0x01679210,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x08ae7e50,
- 0x0464b600,
- 0xd6b0d0fc,
- 0xb01bf500,
- 0xbb000500,
+/* 0x0a4b: i2c_recv */
+ 0xf400f800,
+ 0xc1c70132,
+ 0x0214b6f8,
+ 0xf52816b0,
+ 0xb801371f,
+ 0x000cfc13,
+ 0xb8003298,
+ 0x000cd413,
+ 0xf4003198,
+ 0xd0f90231,
+ 0xd0f9e0f9,
+ 0x000067f1,
+ 0x100063f1,
+ 0xbb016792,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x00085b7e,
- 0xf50464b6,
- 0xc700cc11,
- 0x76bbe0c5,
+ 0x000a297e,
+ 0xfc0464b6,
+ 0x00d6b0d0,
+ 0x00b01bf5,
+ 0x76bb0005,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0x7e50fc04,
- 0xb6000801,
+ 0xb60009d6,
0x11f50464,
- 0x010500a9,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x085b7e50,
- 0x0464b600,
- 0x008711f5,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0x07b27e50,
- 0x0464b600,
- 0xcb6711f4,
- 0x76bbe05b,
- 0x0465b600,
- 0x659450f9,
- 0x0256bb04,
- 0x75fd50bd,
- 0x7e50fc04,
- 0xb60006fe,
- 0x5bb20464,
- 0x0ef474bd,
-/* 0x09d5: i2c_recv_not_rd08 */
- 0x01d6b041,
- 0x053b1bf4,
- 0x085b7e00,
- 0x3211f400,
- 0x7ee0c5c7,
- 0xf4000801,
- 0x00052811,
- 0x00085b7e,
- 0xc71f11f4,
- 0x017ee0b5,
- 0x11f40008,
- 0x06fe7e15,
- 0xc774bd00,
- 0x1bf408c5,
- 0x0232f409,
-/* 0x0a13: i2c_recv_not_wr08 */
-/* 0x0a13: i2c_recv_done */
- 0xc7030ef4,
- 0xbf7ef8ce,
- 0xe0fc0008,
- 0x12f4d0fc,
- 0x7e7cb209,
-/* 0x0a27: i2c_recv_exit */
- 0xf80002b6,
-/* 0x0a29: i2c_init */
-/* 0x0a2b: test_recv */
- 0x4100f800,
- 0x11cf0458,
+ 0xc5c700cc,
+ 0x0076bbe0,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x7c7e50fc,
+ 0x64b60009,
+ 0xa911f504,
+ 0xbb010500,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x0009d67e,
+ 0xf50464b6,
+ 0xbb008711,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x00092d7e,
+ 0xf40464b6,
+ 0x5bcb6711,
+ 0x0076bbe0,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x797e50fc,
+ 0x64b60008,
+ 0xbd5bb204,
+ 0x410ef474,
+/* 0x0b50: i2c_recv_not_rd08 */
+ 0xf401d6b0,
+ 0x00053b1b,
+ 0x0009d67e,
+ 0xc73211f4,
+ 0x7c7ee0c5,
+ 0x11f40009,
+ 0x7e000528,
+ 0xf40009d6,
+ 0xb5c71f11,
+ 0x097c7ee0,
+ 0x1511f400,
+ 0x0008797e,
+ 0xc5c774bd,
+ 0x091bf408,
+ 0xf40232f4,
+/* 0x0b8e: i2c_recv_not_wr08 */
+/* 0x0b8e: i2c_recv_done */
+ 0xcec7030e,
+ 0x0a3a7ef8,
+ 0xfce0fc00,
+ 0x0912f4d0,
+ 0xb67e7cb2,
+/* 0x0ba2: i2c_recv_exit */
+ 0x00f80002,
+/* 0x0ba4: i2c_init */
+/* 0x0ba6: test_recv */
+ 0x584100f8,
+ 0x0011cf04,
+ 0x400110b6,
+ 0x01f60458,
+ 0xf104bd00,
+ 0xf1d900e7,
+ 0x7e134fe3,
+ 0xf80001f5,
+/* 0x0bc5: test_init */
+ 0x08004e00,
+ 0x0001f57e,
+/* 0x0bce: idle_recv */
+ 0x00f800f8,
+/* 0x0bd0: idle */
+ 0x410031f4,
+ 0x11cf0454,
0x0110b600,
- 0xf6045840,
+ 0xf6045440,
0x04bd0001,
- 0xd900e7f1,
- 0x134fe3f1,
- 0x0001f57e,
-/* 0x0a4a: test_init */
- 0x004e00f8,
- 0x01f57e08,
-/* 0x0a53: idle_recv */
- 0xf800f800,
-/* 0x0a55: idle */
- 0x0031f400,
- 0xcf045441,
- 0x10b60011,
- 0x04544001,
- 0xbd0001f6,
-/* 0x0a69: idle_loop */
- 0xf4580104,
-/* 0x0a6e: idle_proc */
-/* 0x0a6e: idle_proc_exec */
- 0x10f90232,
- 0xbf7e1eb2,
- 0x10fc0002,
- 0xf40911f4,
- 0x0ef40231,
-/* 0x0a81: idle_proc_next */
- 0x5810b6f0,
- 0x1bf41fa6,
- 0xe002f4e8,
- 0xf40028f4,
- 0x0000c60e,
+/* 0x0be4: idle_loop */
+ 0x32f45801,
+/* 0x0be9: idle_proc */
+/* 0x0be9: idle_proc_exec */
+ 0xb210f902,
+ 0x02bf7e1e,
+ 0xf410fc00,
+ 0x31f40911,
+ 0xf00ef402,
+/* 0x0bfc: idle_proc_next */
+ 0xa65810b6,
+ 0xe81bf41f,
+ 0xf4e002f4,
+ 0x0ef40028,
+ 0x000000c6,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h b/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
index 5165692..ca36297 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
@@ -68,7 +68,7 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
0x46524550,
- 0x0000083b,
+ 0x00000929,
0x00000839,
0x00000000,
0x00000000,
@@ -90,8 +90,8 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
0x5f433249,
- 0x00000c6b,
- 0x00000b0e,
+ 0x00000de5,
+ 0x00000c88,
0x00000000,
0x00000000,
0x00000000,
@@ -112,8 +112,8 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
0x54534554,
- 0x00000c94,
- 0x00000c6d,
+ 0x00000e0e,
+ 0x00000de7,
0x00000000,
0x00000000,
0x00000000,
@@ -134,8 +134,8 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
0x454c4449,
- 0x00000ca0,
- 0x00000c9e,
+ 0x00000e1a,
+ 0x00000e18,
0x00000000,
0x00000000,
0x00000000,
@@ -834,7 +834,14 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
/* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_attr_start */
+/* 0x0ccc: perf_polling_period_us */
+ 0x000186a0,
+/* 0x0cd0: perf_eng_gr */
+/* 0x0cd1: perf_eng_vid */
+/* 0x0cd2: perf_eng_mc */
+ 0x00000000,
+/* 0x0cd4: i2c_scl_map */
0x00001000,
0x00004000,
0x00010000,
@@ -845,7 +852,7 @@ uint32_t gt215_pmu_data[] = {
0x01000000,
0x04000000,
0x10000000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
0x00002000,
0x00008000,
0x00020000,
@@ -856,7 +863,7 @@ uint32_t gt215_pmu_data[] = {
0x02000000,
0x08000000,
0x20000000,
-/* 0x0d1c: i2c_ctrl */
+/* 0x0d24: i2c_ctrl */
0x0000e138,
0x0000e150,
0x0000e168,
@@ -912,8 +919,6 @@ uint32_t gt215_pmu_data[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000000,
- 0x00000000,
};
uint32_t gt215_pmu_code[] = {
@@ -1511,352 +1516,483 @@ uint32_t gt215_pmu_code[] = {
/* 0x0837: memx_init */
0xf800f8d8,
/* 0x0839: perf_recv */
-/* 0x083b: perf_init */
- 0xf800f800,
-/* 0x083d: i2c_drive_scl */
- 0x0036b000,
- 0xf1110bf4,
- 0xb607e007,
- 0x01d00604,
- 0xf804bd00,
-/* 0x0851: i2c_drive_scl_lo */
- 0xe407f100,
- 0x0604b607,
- 0xbd0001d0,
-/* 0x085f: i2c_drive_sda */
- 0xb000f804,
+ 0x48a7f100,
+ 0x53a3f14f,
+ 0x06eab854,
+ 0xb0351bf4,
+ 0x1bf401d6,
+ 0xbdb4bd44,
+ 0xd207f1c4,
+ 0x000c180c,
+ 0xc4b604bd,
+ 0xd107f108,
+ 0x000c180c,
+ 0xc4b604bd,
+ 0xd007f108,
+ 0x000c180c,
+ 0x21f504bd,
+ 0x0ef40337,
+/* 0x0879: perf_recv_not_host */
+ 0x9021f518,
+ 0xcc07f108,
+ 0x000e980c,
+ 0x21f504bd,
+ 0x21f5022b,
+/* 0x088e: perf_recv_exit */
+ 0x00f80257,
+/* 0x0890: perf_counter_readout */
+ 0x20f910f9,
+ 0x40f930f9,
+ 0x050817f1,
+ 0xcf0614b6,
+ 0x27f10011,
+ 0x24b60518,
+ 0x0022cf06,
+ 0x052837f1,
+ 0xcf0634b6,
+ 0x47f10033,
+ 0x44b60538,
+ 0x0044cf06,
+ 0x0000e7f1,
+ 0x8000e3f1,
+ 0x050807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x051807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x052807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x053807f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0xffff11cc,
+ 0x07f12c21,
+ 0x02000cd0,
+ 0xff04bd00,
+ 0x07f13c31,
+ 0x03000cd1,
+ 0xff04bd00,
+ 0x07f14c41,
+ 0x04000cd2,
+ 0xfc04bd00,
+ 0xfc30fc40,
+ 0xf810fc20,
+/* 0x0929: perf_init */
+ 0x03e7f100,
+ 0x00e3f000,
+ 0x050c07f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x0002e7f1,
+ 0xf100e3f0,
+ 0xb6051c07,
+ 0x0ed00604,
+ 0xf104bd00,
+ 0xb6052c07,
+ 0x0ed00604,
+ 0xf104bd00,
+ 0xb6053c07,
+ 0x0ed00604,
+ 0xf104bd00,
+ 0xf0000de7,
+ 0x07f100e3,
+ 0x04b60514,
+ 0x000ed006,
+ 0xe7f104bd,
+ 0xe3f00070,
+ 0x2407f100,
+ 0x0604b605,
+ 0xbd000ed0,
+ 0x00e7f104,
+ 0x00e3f001,
+ 0x053407f1,
+ 0xd00604b6,
+ 0x04bd000e,
+ 0x089021f5,
+ 0x0ccc07f1,
+ 0xbd000e98,
+ 0x2b21f504,
+ 0x5721f502,
+/* 0x09b7: i2c_drive_scl */
+ 0xb000f802,
0x0bf40036,
0xe007f111,
0x0604b607,
- 0xbd0002d0,
-/* 0x0873: i2c_drive_sda_lo */
+ 0xbd0001d0,
+/* 0x09cb: i2c_drive_scl_lo */
0xf100f804,
0xb607e407,
+ 0x01d00604,
+ 0xf804bd00,
+/* 0x09d9: i2c_drive_sda */
+ 0x0036b000,
+ 0xf1110bf4,
+ 0xb607e007,
0x02d00604,
0xf804bd00,
-/* 0x0881: i2c_sense_scl */
- 0x0132f400,
- 0x07c437f1,
- 0xcf0634b6,
- 0x31fd0033,
- 0x060bf404,
-/* 0x0897: i2c_sense_scl_done */
- 0xf80131f4,
-/* 0x0899: i2c_sense_sda */
- 0x0132f400,
- 0x07c437f1,
- 0xcf0634b6,
- 0x32fd0033,
- 0x060bf404,
-/* 0x08af: i2c_sense_sda_done */
- 0xf80131f4,
-/* 0x08b1: i2c_raise_scl */
- 0xf140f900,
- 0xf0089847,
- 0x21f50137,
-/* 0x08be: i2c_raise_scl_wait */
- 0xe7f1083d,
- 0x21f403e8,
- 0x8121f57f,
- 0x0901f408,
- 0xf40142b6,
-/* 0x08d2: i2c_raise_scl_done */
- 0x40fcef1b,
-/* 0x08d6: i2c_start */
- 0x21f500f8,
- 0x11f40881,
- 0x9921f50d,
- 0x0611f408,
-/* 0x08e7: i2c_start_rep */
- 0xf0300ef4,
- 0x21f50037,
- 0x37f0083d,
- 0x5f21f501,
- 0x0076bb08,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x21f550fc,
- 0x64b608b1,
- 0x1f11f404,
-/* 0x0914: i2c_start_send */
+/* 0x09ed: i2c_drive_sda_lo */
+ 0xe407f100,
+ 0x0604b607,
+ 0xbd0002d0,
+/* 0x09fb: i2c_sense_scl */
+ 0xf400f804,
+ 0x37f10132,
+ 0x34b607c4,
+ 0x0033cf06,
+ 0xf40431fd,
+ 0x31f4060b,
+/* 0x0a11: i2c_sense_scl_done */
+/* 0x0a13: i2c_sense_sda */
+ 0xf400f801,
+ 0x37f10132,
+ 0x34b607c4,
+ 0x0033cf06,
+ 0xf40432fd,
+ 0x31f4060b,
+/* 0x0a29: i2c_sense_sda_done */
+/* 0x0a2b: i2c_raise_scl */
+ 0xf900f801,
+ 0x9847f140,
+ 0x0137f008,
+ 0x09b721f5,
+/* 0x0a38: i2c_raise_scl_wait */
+ 0x03e8e7f1,
+ 0xf57f21f4,
+ 0xf409fb21,
+ 0x42b60901,
+ 0xef1bf401,
+/* 0x0a4c: i2c_raise_scl_done */
+ 0x00f840fc,
+/* 0x0a50: i2c_start */
+ 0x09fb21f5,
+ 0xf50d11f4,
+ 0xf40a1321,
+ 0x0ef40611,
+/* 0x0a61: i2c_start_rep */
+ 0x0037f030,
+ 0x09b721f5,
+ 0xf50137f0,
+ 0xbb09d921,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x0a2b21f5,
+ 0xf40464b6,
+/* 0x0a8e: i2c_start_send */
+ 0x37f01f11,
+ 0xd921f500,
+ 0x88e7f109,
+ 0x7f21f413,
0xf50037f0,
- 0xf1085f21,
+ 0xf109b721,
0xf41388e7,
- 0x37f07f21,
- 0x3d21f500,
- 0x88e7f108,
- 0x7f21f413,
-/* 0x0930: i2c_start_out */
-/* 0x0932: i2c_stop */
- 0x37f000f8,
- 0x3d21f500,
- 0x0037f008,
- 0x085f21f5,
- 0x03e8e7f1,
+/* 0x0aaa: i2c_start_out */
+ 0x00f87f21,
+/* 0x0aac: i2c_stop */
+ 0xf50037f0,
+ 0xf009b721,
+ 0x21f50037,
+ 0xe7f109d9,
+ 0x21f403e8,
+ 0x0137f07f,
+ 0x09b721f5,
+ 0x1388e7f1,
0xf07f21f4,
0x21f50137,
- 0xe7f1083d,
+ 0xe7f109d9,
0x21f41388,
- 0x0137f07f,
- 0x085f21f5,
- 0x1388e7f1,
- 0xf87f21f4,
-/* 0x0965: i2c_bitw */
- 0x5f21f500,
- 0xe8e7f108,
- 0x7f21f403,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xb121f550,
- 0x0464b608,
- 0xf11811f4,
- 0xf41388e7,
- 0x37f07f21,
- 0x3d21f500,
- 0x88e7f108,
+/* 0x0adf: i2c_bitw */
+ 0xf500f87f,
+ 0xf109d921,
+ 0xf403e8e7,
+ 0x76bb7f21,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb60a2b21,
+ 0x11f40464,
+ 0x88e7f118,
0x7f21f413,
-/* 0x09a4: i2c_bitw_out */
-/* 0x09a6: i2c_bitr */
- 0x37f000f8,
- 0x5f21f501,
- 0xe8e7f108,
- 0x7f21f403,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xb121f550,
- 0x0464b608,
- 0xf51b11f4,
- 0xf0089921,
- 0x21f50037,
- 0xe7f1083d,
- 0x21f41388,
- 0x013cf07f,
-/* 0x09eb: i2c_bitr_done */
- 0xf80131f4,
-/* 0x09ed: i2c_get_byte */
- 0x0057f000,
-/* 0x09f3: i2c_get_byte_next */
- 0xb60847f0,
- 0x76bb0154,
+ 0xf50037f0,
+ 0xf109b721,
+ 0xf41388e7,
+/* 0x0b1e: i2c_bitw_out */
+ 0x00f87f21,
+/* 0x0b20: i2c_bitr */
+ 0xf50137f0,
+ 0xf109d921,
+ 0xf403e8e7,
+ 0x76bb7f21,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb609a621,
+ 0xb60a2b21,
0x11f40464,
- 0x0553fd2b,
- 0xf40142b6,
- 0x37f0d81b,
- 0x0076bb01,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x21f550fc,
- 0x64b60965,
-/* 0x0a3d: i2c_get_byte_done */
-/* 0x0a3f: i2c_put_byte */
- 0xf000f804,
-/* 0x0a42: i2c_put_byte_next */
- 0x42b60847,
- 0x3854ff01,
+ 0x1321f51b,
+ 0x0037f00a,
+ 0x09b721f5,
+ 0x1388e7f1,
+ 0xf07f21f4,
+ 0x31f4013c,
+/* 0x0b65: i2c_bitr_done */
+/* 0x0b67: i2c_get_byte */
+ 0xf000f801,
+ 0x47f00057,
+/* 0x0b6d: i2c_get_byte_next */
+ 0x0154b608,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x6521f550,
- 0x0464b609,
- 0xb03411f4,
- 0x1bf40046,
- 0x0076bbd8,
- 0xf90465b6,
- 0x04659450,
- 0xbd0256bb,
- 0x0475fd50,
- 0x21f550fc,
- 0x64b609a6,
- 0x0f11f404,
- 0xb00076bb,
- 0x1bf40136,
- 0x0132f406,
-/* 0x0a98: i2c_put_byte_done */
-/* 0x0a9a: i2c_addr */
- 0x76bb00f8,
+ 0x2021f550,
+ 0x0464b60b,
+ 0xfd2b11f4,
+ 0x42b60553,
+ 0xd81bf401,
+ 0xbb0137f0,
+ 0x65b60076,
+ 0x9450f904,
+ 0x56bb0465,
+ 0xfd50bd02,
+ 0x50fc0475,
+ 0x0adf21f5,
+/* 0x0bb7: i2c_get_byte_done */
+ 0xf80464b6,
+/* 0x0bb9: i2c_put_byte */
+ 0x0847f000,
+/* 0x0bbc: i2c_put_byte_next */
+ 0xff0142b6,
+ 0x76bb3854,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb608d621,
+ 0xb60adf21,
0x11f40464,
- 0x2ec3e729,
- 0x0134b601,
- 0xbb0553fd,
+ 0x0046b034,
+ 0xbbd81bf4,
0x65b60076,
0x9450f904,
0x56bb0465,
0xfd50bd02,
0x50fc0475,
- 0x0a3f21f5,
-/* 0x0adf: i2c_addr_done */
- 0xf80464b6,
-/* 0x0ae1: i2c_acquire_addr */
- 0xf8cec700,
- 0xb702e4b6,
- 0x980d1ce0,
- 0x00f800ee,
-/* 0x0af0: i2c_acquire */
- 0x0ae121f5,
- 0xf00421f4,
- 0x21f403d9,
-/* 0x0aff: i2c_release */
- 0xf500f83f,
- 0xf40ae121,
- 0xdaf00421,
- 0x3f21f403,
-/* 0x0b0e: i2c_recv */
- 0x32f400f8,
- 0xf8c1c701,
- 0xb00214b6,
- 0x1ff52816,
- 0x13a0013a,
- 0x32980cf4,
- 0xcc13a000,
- 0x0031980c,
- 0xf90231f4,
- 0xf9e0f9d0,
- 0x0067f1d0,
- 0x0063f100,
- 0x01679210,
- 0xb60076bb,
- 0x50f90465,
- 0xbb046594,
- 0x50bd0256,
- 0xfc0475fd,
- 0xf021f550,
- 0x0464b60a,
- 0xd6b0d0fc,
- 0xb31bf500,
- 0x0057f000,
+ 0x0b2021f5,
+ 0xf40464b6,
+ 0x76bb0f11,
+ 0x0136b000,
+ 0xf4061bf4,
+/* 0x0c12: i2c_put_byte_done */
+ 0x00f80132,
+/* 0x0c14: i2c_addr */
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x9a21f550,
+ 0x5021f550,
0x0464b60a,
- 0x00d011f5,
- 0xbbe0c5c7,
- 0x65b60076,
- 0x9450f904,
- 0x56bb0465,
- 0xfd50bd02,
- 0x50fc0475,
- 0x0a3f21f5,
- 0xf50464b6,
- 0xf000ad11,
- 0x76bb0157,
+ 0xe72911f4,
+ 0xb6012ec3,
+ 0x53fd0134,
+ 0x0076bb05,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b60bb9,
+/* 0x0c59: i2c_addr_done */
+/* 0x0c5b: i2c_acquire_addr */
+ 0xc700f804,
+ 0xe4b6f8ce,
+ 0x24e0b702,
+ 0x00ee980d,
+/* 0x0c6a: i2c_acquire */
+ 0x21f500f8,
+ 0x21f40c5b,
+ 0x03d9f004,
+ 0xf83f21f4,
+/* 0x0c79: i2c_release */
+ 0x5b21f500,
+ 0x0421f40c,
+ 0xf403daf0,
+ 0x00f83f21,
+/* 0x0c88: i2c_recv */
+ 0xc70132f4,
+ 0x14b6f8c1,
+ 0x2816b002,
+ 0x013a1ff5,
+ 0x0cfc13a0,
+ 0xa0003298,
+ 0x980cd413,
+ 0x31f40031,
+ 0xf9d0f902,
+ 0xf1d0f9e0,
+ 0xf1000067,
+ 0x92100063,
+ 0x76bb0167,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb60a9a21,
- 0x11f50464,
- 0x76bb008a,
+ 0xb60c6a21,
+ 0xd0fc0464,
+ 0xf500d6b0,
+ 0xf000b31b,
+ 0x76bb0057,
0x0465b600,
0x659450f9,
0x0256bb04,
0x75fd50bd,
0xf550fc04,
- 0xb609ed21,
- 0x11f40464,
- 0xe05bcb6a,
+ 0xb60c1421,
+ 0x11f50464,
+ 0xc5c700d0,
+ 0x0076bbe0,
+ 0xf90465b6,
+ 0x04659450,
+ 0xbd0256bb,
+ 0x0475fd50,
+ 0x21f550fc,
+ 0x64b60bb9,
+ 0xad11f504,
+ 0x0157f000,
0xb60076bb,
0x50f90465,
0xbb046594,
0x50bd0256,
0xfc0475fd,
- 0x3221f550,
- 0x0464b609,
- 0xbd025bb9,
- 0x430ef474,
-/* 0x0c14: i2c_recv_not_rd08 */
- 0xf401d6b0,
- 0x57f03d1b,
- 0x9a21f500,
- 0x3311f40a,
- 0xf5e0c5c7,
- 0xf40a3f21,
- 0x57f02911,
- 0x9a21f500,
- 0x1f11f40a,
- 0xf5e0b5c7,
- 0xf40a3f21,
- 0x21f51511,
- 0x74bd0932,
- 0xf408c5c7,
- 0x32f4091b,
- 0x030ef402,
-/* 0x0c54: i2c_recv_not_wr08 */
-/* 0x0c54: i2c_recv_done */
- 0xf5f8cec7,
- 0xfc0aff21,
- 0xf4d0fce0,
- 0x7cb90a12,
- 0x3721f502,
-/* 0x0c69: i2c_recv_exit */
-/* 0x0c6b: i2c_init */
- 0xf800f803,
-/* 0x0c6d: test_recv */
- 0xd817f100,
- 0x0614b605,
- 0xb60011cf,
- 0x07f10110,
- 0x04b605d8,
- 0x0001d006,
- 0xe7f104bd,
- 0xe3f1d900,
- 0x21f5134f,
- 0x00f80257,
-/* 0x0c94: test_init */
- 0x0800e7f1,
- 0x025721f5,
-/* 0x0c9e: idle_recv */
- 0x00f800f8,
-/* 0x0ca0: idle */
- 0xf10031f4,
- 0xb605d417,
+ 0x1421f550,
+ 0x0464b60c,
+ 0x008a11f5,
+ 0xb60076bb,
+ 0x50f90465,
+ 0xbb046594,
+ 0x50bd0256,
+ 0xfc0475fd,
+ 0x6721f550,
+ 0x0464b60b,
+ 0xcb6a11f4,
+ 0x76bbe05b,
+ 0x0465b600,
+ 0x659450f9,
+ 0x0256bb04,
+ 0x75fd50bd,
+ 0xf550fc04,
+ 0xb60aac21,
+ 0x5bb90464,
+ 0xf474bd02,
+/* 0x0d8e: i2c_recv_not_rd08 */
+ 0xd6b0430e,
+ 0x3d1bf401,
+ 0xf50057f0,
+ 0xf40c1421,
+ 0xc5c73311,
+ 0xb921f5e0,
+ 0x2911f40b,
+ 0xf50057f0,
+ 0xf40c1421,
+ 0xb5c71f11,
+ 0xb921f5e0,
+ 0x1511f40b,
+ 0x0aac21f5,
+ 0xc5c774bd,
+ 0x091bf408,
+ 0xf40232f4,
+/* 0x0dce: i2c_recv_not_wr08 */
+/* 0x0dce: i2c_recv_done */
+ 0xcec7030e,
+ 0x7921f5f8,
+ 0xfce0fc0c,
+ 0x0a12f4d0,
+ 0xf5027cb9,
+/* 0x0de3: i2c_recv_exit */
+ 0xf8033721,
+/* 0x0de5: i2c_init */
+/* 0x0de7: test_recv */
+ 0xf100f800,
+ 0xb605d817,
0x11cf0614,
0x0110b600,
- 0x05d407f1,
+ 0x05d807f1,
0xd00604b6,
0x04bd0001,
-/* 0x0cbc: idle_loop */
- 0xf45817f0,
-/* 0x0cc2: idle_proc */
-/* 0x0cc2: idle_proc_exec */
- 0x10f90232,
- 0xf5021eb9,
- 0xfc034021,
- 0x0911f410,
- 0xf40231f4,
-/* 0x0cd6: idle_proc_next */
- 0x10b6ef0e,
- 0x061fb858,
- 0xf4e61bf4,
- 0x28f4dd02,
- 0xbb0ef400,
+ 0xd900e7f1,
+ 0x134fe3f1,
+ 0x025721f5,
+/* 0x0e0e: test_init */
+ 0xe7f100f8,
+ 0x21f50800,
+ 0x00f80257,
+/* 0x0e18: idle_recv */
+/* 0x0e1a: idle */
+ 0x31f400f8,
+ 0xd417f100,
+ 0x0614b605,
+ 0xb60011cf,
+ 0x07f10110,
+ 0x04b605d4,
+ 0x0001d006,
+/* 0x0e36: idle_loop */
+ 0x17f004bd,
+ 0x0232f458,
+/* 0x0e3c: idle_proc */
+/* 0x0e3c: idle_proc_exec */
+ 0x1eb910f9,
+ 0x4021f502,
+ 0xf410fc03,
+ 0x31f40911,
+ 0xef0ef402,
+/* 0x0e50: idle_proc_next */
+ 0xb85810b6,
+ 0x1bf4061f,
+ 0xdd02f4e6,
+ 0xf40028f4,
+ 0x0000bb0e,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/os.h b/drm/nouveau/nvkm/subdev/pmu/fuc/os.h
index c8b06cb..1633825 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/os.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/os.h
@@ -49,4 +49,14 @@
#define I2C__MSG_DATA0_WR08_REG 0:7
#define I2C__MSG_DATA1_WR08_VAL 0:7
+
+/* PERF: message identifiers */
+
+// OUT: load 0x0 - 0xff
+// - byte 3: PCIe load (GF100+)
+// - byte 2: Memory load
+// - byte 1: Video engines' load
+// - byte 0: GR load
+#define PERF_MSG_LOAD 1
+
#endif
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc b/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc
index 38eadf7..4b17b3e 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc
@@ -30,6 +30,18 @@ process(PROC_PERF, #perf_init, #perf_recv)
* PERF data segment
*****************************************************************************/
#ifdef INCLUDE_DATA
+perf_attr_start:
+// parameters
+perf_polling_period_us: .b32 100000
+
+// engine usage (0x0-0xff)
+perf_eng_gr: .b8 0
+perf_eng_vid: .b8 0
+perf_eng_mc: .b8 0
+#if NVKM_PPWR_CHIPSET >= GF100
+perf_eng_pcie: .b8 0
+#endif
+.align 4
#endif
/******************************************************************************
@@ -46,6 +58,86 @@ process(PROC_PERF, #perf_init, #perf_recv)
// $r11 - data1
// $r0 - zero
perf_recv:
+ imm32($r10, PROC_HOST)
+ cmp b32 $r14 $r10
+ bra ne #perf_recv_not_host
+ cmp b32 $r13 PERF_MSG_LOAD
+ bra ne #perf_recv_exit
+ clear b32 $r11
+ clear b32 $r12
+#if NVKM_PPWR_CHIPSET >= GF100
+ ld(b8, $r12, #perf_eng_pcie)
+ shl b32 $r12 8
+#endif
+ ld(b8, $r12, #perf_eng_mc)
+ shl b32 $r12 8
+ ld(b8, $r12, #perf_eng_vid)
+ shl b32 $r12 8
+ ld(b8, $r12, #perf_eng_gr)
+ call(send)
+ bra #perf_recv_exit
+perf_recv_not_host:
+ call(perf_counter_readout)
+ ld(b32, $r14, #perf_polling_period_us)
+ call #ticks_from_us
+ call(timer)
+perf_recv_exit:
+ ret
+
+// description
+//
+// $r15 - current (perf)
+// $r0 - zero
+perf_counter_readout:
+ push $r1 // ticks
+ push $r2 // gr
+ push $r3 // video
+ push $r4 // mc
+#if NVKM_PPWR_CHIPSET >= GF100
+ push $r5 // pcie
+#endif
+
+ nv_iord($r1, NV_PPWR_COUNTER_COUNT(0))
+ nv_iord($r2, NV_PPWR_COUNTER_COUNT(1))
+ nv_iord($r3, NV_PPWR_COUNTER_COUNT(2))
+ nv_iord($r4, NV_PPWR_COUNTER_COUNT(3))
+#if NVKM_PPWR_CHIPSET >= GF100
+ nv_iord($r5, NV_PPWR_COUNTER_COUNT(4))
+#endif
+
+ // reset the counters
+ imm32($r14, NV_PPWR_COUNTER_COUNT_RESET)
+ nv_iowr(NV_PPWR_COUNTER_COUNT(0), $r14)
+ nv_iowr(NV_PPWR_COUNTER_COUNT(1), $r14)
+ nv_iowr(NV_PPWR_COUNTER_COUNT(2), $r14)
+ nv_iowr(NV_PPWR_COUNTER_COUNT(3), $r14)
+#if NVKM_PPWR_CHIPSET >= GF100
+ nv_iowr(NV_PPWR_COUNTER_COUNT(4), $r14)
+#endif
+
+ div $r1 $r1 0xff
+
+ div $r2 $r2 $r1
+ st(b8, #perf_eng_gr, $r2)
+
+ div $r3 $r3 $r1
+ st(b8, #perf_eng_vid, $r3)
+
+ div $r4 $r4 $r1
+ st(b8, #perf_eng_mc, $r4)
+
+#if NVKM_PPWR_CHIPSET >= GF100
+ div $r5 $r5 $r1
+ st(b8, #perf_eng_pcie, $r5)
+#endif
+
+#if NVKM_PPWR_CHIPSET >= GF100
+ pop $r5
+#endif
+ pop $r4
+ pop $r3
+ pop $r2
+ pop $r1
ret
// description
@@ -53,5 +145,69 @@ perf_recv:
// $r15 - current (perf)
// $r0 - zero
perf_init:
+ // set up the total ticks counter first
+ imm32($r14, NV_PPWR_COUNTER_MODE_ALWAYS)
+ nv_iowr(NV_PPWR_COUNTER_MODE(0), $r14)
+
+ // set up the other counters, with fermi there are more
+ imm32($r14, NV_PPWR_COUNTER_MODE_IF_NOT_ALL)
+ nv_iowr(NV_PPWR_COUNTER_MODE(1), $r14)
+ nv_iowr(NV_PPWR_COUNTER_MODE(2), $r14)
+ nv_iowr(NV_PPWR_COUNTER_MODE(3), $r14)
+#if NVKM_PPWR_CHIPSET >= GF100
+ nv_iowr(NV_PPWR_COUNTER_MODE(4), $r14)
+#endif
+
+ // core load counter
+ imm32($r14,
+ NV_PPWR_COUNTER_SIG_GR
+ | NV_PPWR_COUNTER_SIG_GR_GPC
+ | NV_PPWR_COUNTER_SIG_GR_ROP
+#if NVKM_PPWR_CHIPSET >= GF100
+ | NV_PPWR_COUNTER_SIG_GR_HUB
+ | NV_PPWR_COUNTER_SIG_PCOPY0
+ | NV_PPWR_COUNTER_SIG_PCOPY1
+#endif
+#if NVKM_PPWR_CHIPSET >= GK104
+ | NV_PPWR_COUNTER_SIG_PCOPY2
+#endif
+ )
+ nv_iowr(NV_PPWR_COUNTER_MASK(1), $r14)
+
+ // video load counter
+ imm32($r14,
+ NV_PPWR_COUNTER_SIG_PVLD
+ | NV_PPWR_COUNTER_SIG_PPDEC
+ | NV_PPWR_COUNTER_SIG_PPPP
+#if NVKM_PPWR_CHIPSET >= GK104
+ | NV_PPWR_COUNTER_SIG_PVENC
+#endif
+ )
+ nv_iowr(NV_PPWR_COUNTER_MASK(2), $r14)
+
+ // memory load counter
+ imm32($r14,
+#if NVKM_PPWR_CHIPSET >= GF100
+ NV_PPWR_COUNTER_SIG_BFB_PART0_REQ
+#else
+ NV_PPWR_COUNTER_SIG_FB_PART0_REQ
+#endif
+ )
+ nv_iowr(NV_PPWR_COUNTER_MASK(3), $r14)
+
+ // pcie load counter
+#if NVKM_PPWR_CHIPSET >= GF100
+ imm32($r14, NV_PPWR_COUNTER_SIG_PCIE)
+ nv_iowr(NV_PPWR_COUNTER_MASK(4), $r14)
+#endif
+
+ // initial read out
+ call(perf_counter_readout)
+
+ // schedule the next read out
+ ld(b32, $r14, #perf_polling_period_us)
+ call #ticks_from_us
+ call(timer)
+
ret
#endif
--
2.7.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 4/4] nouveau/debugfs: add interface for current load
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
` (2 preceding siblings ...)
2016-02-16 16:54 ` [PATCH v2 3/4] subdev/pmu/fuc: implement counter readout Karol Herbst
@ 2016-02-16 16:54 ` Karol Herbst
3 siblings, 0 replies; 5+ messages in thread
From: Karol Herbst @ 2016-02-16 16:54 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
output of the file will be something like that:
core, mem, vid, pci
0xfd, 0x15, 0x00, 0xa2
v2: relayout the debugfs file
Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
---
drm/nouveau/include/nvif/device.h | 1 +
drm/nouveau/include/nvkm/subdev/pmu.h | 10 ++++++++++
drm/nouveau/nouveau_debugfs.c | 23 +++++++++++++++++++++++
drm/nouveau/nvkm/subdev/pmu/base.c | 18 ++++++++++++++++++
4 files changed, 52 insertions(+)
diff --git a/drm/nouveau/include/nvif/device.h b/drm/nouveau/include/nvif/device.h
index e0ed2f4..cba6d0f 100644
--- a/drm/nouveau/include/nvif/device.h
+++ b/drm/nouveau/include/nvif/device.h
@@ -64,6 +64,7 @@ u64 nvif_device_time(struct nvif_device *);
#define nvxx_i2c(a) nvxx_device(a)->i2c
#define nvxx_therm(a) nvxx_device(a)->therm
#define nvxx_volt(a) nvxx_device(a)->volt
+#define nvxx_pmu(a) nvxx_device(a)->pmu
#include <core/device.h>
#include <engine/fifo.h>
diff --git a/drm/nouveau/include/nvkm/subdev/pmu.h b/drm/nouveau/include/nvkm/subdev/pmu.h
index e61923d..be3c60e 100644
--- a/drm/nouveau/include/nvkm/subdev/pmu.h
+++ b/drm/nouveau/include/nvkm/subdev/pmu.h
@@ -23,6 +23,13 @@ struct nvkm_pmu {
} recv;
};
+struct nvkm_pmu_load_data {
+ u8 core;
+ u8 mem;
+ u8 video;
+ u8 pcie;
+};
+
int nvkm_pmu_send(struct nvkm_pmu *, u32 reply[2], u32 process,
u32 message, u32 data0, u32 data1);
void nvkm_pmu_pgob(struct nvkm_pmu *, bool enable);
@@ -48,4 +55,7 @@ void nvkm_memx_train(struct nvkm_memx *);
int nvkm_memx_train_result(struct nvkm_pmu *, u32 *, int);
void nvkm_memx_block(struct nvkm_memx *);
void nvkm_memx_unblock(struct nvkm_memx *);
+
+/* interface to PERF process running on PMU */
+int nvkm_pmu_get_perf_data(struct nvkm_pmu *, struct nvkm_pmu_load_data *);
#endif
diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c
index 3d0dc19..1c725a3 100644
--- a/drm/nouveau/nouveau_debugfs.c
+++ b/drm/nouveau/nouveau_debugfs.c
@@ -31,6 +31,8 @@
#include <linux/debugfs.h>
#include <nvif/class.h>
#include <nvif/if0001.h>
+#include <nvkm/subdev/pmu.h>
+
#include "nouveau_debugfs.h"
#include "nouveau_drm.h"
@@ -180,8 +182,29 @@ static const struct file_operations nouveau_pstate_fops = {
.write = nouveau_debugfs_pstate_set,
};
+static int
+nouveau_debugfs_current_load(struct seq_file *m, void *data)
+{
+ struct drm_info_node *node = (struct drm_info_node *) m->private;
+ struct nouveau_drm *drm = nouveau_drm(node->minor->dev);
+ struct nvkm_pmu *pmu = nvxx_pmu(&drm->device);
+ struct nvkm_pmu_load_data load_data = { 0 };
+
+ if (!pm_runtime_suspended(drm->dev->dev)) {
+ int ret = nvkm_pmu_get_perf_data(pmu, &load_data);
+ if (ret < 0)
+ return ret;
+ }
+
+ seq_printf(m, "core, mem, vid, pci\n");
+ seq_printf(m, "0x%2.2x, 0x%2.2x, 0x%2.2x, 0x%2.2x\n", load_data.core,
+ load_data.mem, load_data.video, load_data.pcie);
+ return 0;
+}
+
static struct drm_info_list nouveau_debugfs_list[] = {
{ "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL },
+ { "current_load", nouveau_debugfs_current_load, 0, NULL },
};
#define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list)
diff --git a/drm/nouveau/nvkm/subdev/pmu/base.c b/drm/nouveau/nvkm/subdev/pmu/base.c
index d95eb86..6594812 100644
--- a/drm/nouveau/nvkm/subdev/pmu/base.c
+++ b/drm/nouveau/nvkm/subdev/pmu/base.c
@@ -140,6 +140,24 @@ nvkm_pmu_recv(struct work_struct *work)
process, message, data0, data1);
}
+#define get_counter_index(v, i) (((v) >> ((i)*8)) & 0xff)
+
+int
+nvkm_pmu_get_perf_data(struct nvkm_pmu *pmu, struct nvkm_pmu_load_data *data)
+{
+ u32 result[2];
+
+ int ret = nvkm_pmu_send(pmu, result, PROC_PERF, PERF_MSG_LOAD, 0, 0);
+ if (ret < 0)
+ return ret;
+
+ data->core = get_counter_index(result[0], 0);
+ data->video = get_counter_index(result[0], 1);
+ data->mem = get_counter_index(result[0], 2);
+ data->pcie = get_counter_index(result[0], 3);
+ return 0;
+}
+
static void
nvkm_pmu_intr(struct nvkm_subdev *subdev)
{
--
2.7.1
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-16 16:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 16:54 [PATCH v2 0/4] PMU engine counters Karol Herbst
[not found] ` <1455641660-2571-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-02-16 16:54 ` [PATCH v2 1/4] subdev/pmu/fuc: add gk104 Karol Herbst
2016-02-16 16:54 ` [PATCH v2 2/4] pmu/fuc: add macros for pdaemon pwr counters Karol Herbst
2016-02-16 16:54 ` [PATCH v2 3/4] subdev/pmu/fuc: implement counter readout Karol Herbst
2016-02-16 16:54 ` [PATCH v2 4/4] nouveau/debugfs: add interface for current load Karol Herbst
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.