The counter values are read out periodically and divided by the total
amount of ticks divided by 255 to have nice 8 bit values. A higher
precision won't be needed. This way we can have simple PMU-host
interfaces.

The polling is designed in such a way so that we can change the polling
period later if we need it.

Signed-off-by: Karol Herbst <karolher...@gmail.com>
---
 drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 821 +++++++++++++++------------
 drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 763 ++++++++++++++-----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 711 ++++++++++++-----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 757 ++++++++++++++----------
 drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc     | 120 ++++
 5 files changed, 1826 insertions(+), 1346 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h 
b/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
index 0bcf0b30..9ed8e313 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
@@ -1,4 +1,4 @@
-static uint32_t gf100_pmu_data[] = {
+uint32_t gf100_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
        0x00000000,
@@ -68,7 +68,7 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x46524550,
-       0x0000075a,
+       0x000008c9,
        0x00000758,
        0x00000000,
        0x00000000,
@@ -90,8 +90,8 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x5f433249,
-       0x00000b8a,
-       0x00000a2d,
+       0x00000d7f,
+       0x00000c22,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -112,8 +112,8 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x54534554,
-       0x00000bb3,
-       0x00000b8c,
+       0x00000da8,
+       0x00000d81,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -134,8 +134,8 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x454c4449,
-       0x00000bbf,
-       0x00000bbd,
+       0x00000db4,
+       0x00000db2,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -834,7 +834,18 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
 /* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_polling_period_us */
+       0x000186a0,
+/* 0x0cd0: perf_slot1 */
+/* 0x0cd1: perf_slot2 */
+/* 0x0cd2: perf_slot3 */
+/* 0x0cd3: perf_slot4 */
+       0x00000000,
+/* 0x0cd4: perf_slot5 */
+/* 0x0cd5: perf_slot6 */
+/* 0x0cd6: perf_slot7 */
+       0x00000000,
+/* 0x0cd8: i2c_scl_map */
        0x00001000,
        0x00004000,
        0x00010000,
@@ -845,7 +856,7 @@ static uint32_t gf100_pmu_data[] = {
        0x01000000,
        0x04000000,
        0x10000000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0d00: i2c_sda_map */
        0x00002000,
        0x00008000,
        0x00020000,
@@ -856,7 +867,7 @@ static uint32_t gf100_pmu_data[] = {
        0x02000000,
        0x08000000,
        0x20000000,
-/* 0x0d1c: i2c_ctrl */
+/* 0x0d28: i2c_ctrl */
        0x0000e138,
        0x0000e150,
        0x0000e168,
@@ -911,12 +922,9 @@ static uint32_t gf100_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
 };
 
-static uint32_t gf100_pmu_code[] = {
+uint32_t gf100_pmu_code[] = {
        0x03920ef5,
 /* 0x0004: rd32 */
        0x07a007f1,
@@ -1452,412 +1460,479 @@ static uint32_t gf100_pmu_code[] = {
 /* 0x0756: memx_init */
        0x00f800f8,
 /* 0x0758: perf_recv */
-/* 0x075a: perf_init */
-       0x00f800f8,
-/* 0x075c: i2c_drive_scl */
-       0xf40036b0,
-       0x07f1110b,
-       0x04b607e0,
-       0x0001d006,
-       0x00f804bd,
-/* 0x0770: i2c_drive_scl_lo */
-       0x07e407f1,
-       0xd00604b6,
-       0x04bd0001,
-/* 0x077e: i2c_drive_sda */
-       0x36b000f8,
-       0x110bf400,
-       0x07e007f1,
-       0xd00604b6,
-       0x04bd0002,
-/* 0x0792: i2c_drive_sda_lo */
-       0x07f100f8,
-       0x04b607e4,
-       0x0002d006,
-       0x00f804bd,
-/* 0x07a0: i2c_sense_scl */
-       0xf10132f4,
-       0xb607c437,
-       0x33cf0634,
-       0x0431fd00,
-       0xf4060bf4,
-/* 0x07b6: i2c_sense_scl_done */
-       0x00f80131,
-/* 0x07b8: i2c_sense_sda */
-       0xf10132f4,
-       0xb607c437,
+       0x4f48a7f1,
+       0x5453a3f1,
+       0xf406eab8,
+       0x0ef4061b,
+/* 0x0769: perf_recv_not_host */
+       0x8321f51b,
+       0xcc07f107,
+       0x0003f00c,
+       0xbd000e98,
+       0x2a21f504,
+       0x5621f502,
+/* 0x0781: perf_recv_exit */
+/* 0x0783: perf_counter_readout */
+       0xf900f802,
+       0xf920f910,
+       0xf940f930,
+       0xf960f950,
+       0xf180f970,
+       0xb6050817,
+       0x11cf0614,
+       0x1827f100,
+       0x0624b605,
+       0xf10022cf,
+       0xb6052837,
        0x33cf0634,
-       0x0432fd00,
-       0xf4060bf4,
-/* 0x07ce: i2c_sense_sda_done */
-       0x00f80131,
-/* 0x07d0: i2c_raise_scl */
-       0x47f140f9,
-       0x37f00898,
-       0x5c21f501,
-/* 0x07dd: i2c_raise_scl_wait */
-       0xe8e7f107,
-       0x7e21f403,
-       0x07a021f5,
-       0xb60901f4,
-       0x1bf40142,
-/* 0x07f1: i2c_raise_scl_done */
-       0xf840fcef,
-/* 0x07f5: i2c_start */
-       0xa021f500,
-       0x0d11f407,
-       0x07b821f5,
-       0xf40611f4,
-/* 0x0806: i2c_start_rep */
-       0x37f0300e,
-       0x5c21f500,
-       0x0137f007,
-       0x077e21f5,
-       0xb60076bb,
-       0x50f90465,
-       0xbb046594,
-       0x50bd0256,
-       0xfc0475fd,
-       0xd021f550,
-       0x0464b607,
-/* 0x0833: i2c_start_send */
-       0xf01f11f4,
+       0x3847f100,
+       0x0644b605,
+       0xf10044cf,
+       0xb6054857,
+       0x55cf0654,
+       0x5867f100,
+       0x0664b605,
+       0xf10066cf,
+       0xb6056877,
+       0x77cf0674,
+       0x7887f100,
+       0x0684b605,
+       0xf10088cf,
+       0xf10000e7,
+       0xf18000e3,
+       0xb6050807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6051807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6052807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6053807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6054807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6055807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6056807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6057807,
+       0x0ed00604,
+       0xcc04bd00,
+       0x21ffff11,
+       0x3c31ff2c,
+       0xff4c41ff,
+       0x61ff5c51,
+       0x7c71ff6c,
+       0xf18c81ff,
+       0xf00cd007,
+       0x02000003,
+       0xf104bd00,
+       0xf00cd107,
+       0x03000003,
+       0xf104bd00,
+       0xf00cd207,
+       0x04000003,
+       0xf104bd00,
+       0xf00cd307,
+       0x05000003,
+       0xf104bd00,
+       0xf00cd407,
+       0x06000003,
+       0xf104bd00,
+       0xf00cd507,
+       0x07000003,
+       0xf104bd00,
+       0xf00cd607,
+       0x08000003,
+       0xfc04bd00,
+       0xfc70fc80,
+       0xfc50fc60,
+       0xfc30fc40,
+       0xf810fc20,
+/* 0x08c9: perf_init */
+       0x03e7f100,
+       0x00e3f000,
+       0x050c07f1,
+       0xd00604b6,
+       0x04bd000e,
+       0x0002e7f1,
+       0xf100e3f0,
+       0xb6051c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6052c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6053c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6054c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6055c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6056c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6057c07,
+       0x0ed00604,
+       0xf504bd00,
+       0xf1078321,
+       0xf00ccc07,
+       0x0e980003,
+       0xf504bd00,
+       0xf5022a21,
+       0xf8025621,
+/* 0x0951: i2c_drive_scl */
+       0x0036b000,
+       0xf1110bf4,
+       0xb607e007,
+       0x01d00604,
+       0xf804bd00,
+/* 0x0965: i2c_drive_scl_lo */
+       0xe407f100,
+       0x0604b607,
+       0xbd0001d0,
+/* 0x0973: i2c_drive_sda */
+       0xb000f804,
+       0x0bf40036,
+       0xe007f111,
+       0x0604b607,
+       0xbd0002d0,
+/* 0x0987: i2c_drive_sda_lo */
+       0xf100f804,
+       0xb607e407,
+       0x02d00604,
+       0xf804bd00,
+/* 0x0995: i2c_sense_scl */
+       0x0132f400,
+       0x07c437f1,
+       0xcf0634b6,
+       0x31fd0033,
+       0x060bf404,
+/* 0x09ab: i2c_sense_scl_done */
+       0xf80131f4,
+/* 0x09ad: i2c_sense_sda */
+       0x0132f400,
+       0x07c437f1,
+       0xcf0634b6,
+       0x32fd0033,
+       0x060bf404,
+/* 0x09c3: i2c_sense_sda_done */
+       0xf80131f4,
+/* 0x09c5: i2c_raise_scl */
+       0xf140f900,
+       0xf0089847,
+       0x21f50137,
+/* 0x09d2: i2c_raise_scl_wait */
+       0xe7f10951,
+       0x21f403e8,
+       0x9521f57e,
+       0x0901f409,
+       0xf40142b6,
+/* 0x09e6: i2c_raise_scl_done */
+       0x40fcef1b,
+/* 0x09ea: i2c_start */
+       0x21f500f8,
+       0x11f40995,
+       0xad21f50d,
+       0x0611f409,
+/* 0x09fb: i2c_start_rep */
+       0xf0300ef4,
        0x21f50037,
-       0xe7f1077e,
-       0x21f41388,
-       0x0037f07e,
-       0x075c21f5,
-       0x1388e7f1,
-/* 0x084f: i2c_start_out */
-       0xf87e21f4,
-/* 0x0851: i2c_stop */
-       0x0037f000,
-       0x075c21f5,
+       0x37f00951,
+       0x7321f501,
+       0x0076bb09,
+       0xf90465b6,
+       0x04659450,
+       0xbd0256bb,
+       0x0475fd50,
+       0x21f550fc,
+       0x64b609c5,
+       0x1f11f404,
+/* 0x0a28: i2c_start_send */
        0xf50037f0,
-       0xf1077e21,
-       0xf403e8e7,
+       0xf1097321,
+       0xf41388e7,
        0x37f07e21,
-       0x5c21f501,
-       0x88e7f107,
+       0x5121f500,
+       0x88e7f109,
        0x7e21f413,
-       0xf50137f0,
-       0xf1077e21,
-       0xf41388e7,
-       0x00f87e21,
-/* 0x0884: i2c_bitw */
-       0x077e21f5,
+/* 0x0a44: i2c_start_out */
+/* 0x0a46: i2c_stop */
+       0x37f000f8,
+       0x5121f500,
+       0x0037f009,
+       0x097321f5,
        0x03e8e7f1,
-       0xbb7e21f4,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x07d021f5,
-       0xf40464b6,
-       0xe7f11811,
+       0xf07e21f4,
+       0x21f50137,
+       0xe7f10951,
        0x21f41388,
-       0x0037f07e,
-       0x075c21f5,
+       0x0137f07e,
+       0x097321f5,
        0x1388e7f1,
-/* 0x08c3: i2c_bitw_out */
        0xf87e21f4,
-/* 0x08c5: i2c_bitr */
-       0x0137f000,
-       0x077e21f5,
-       0x03e8e7f1,
-       0xbb7e21f4,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x07d021f5,
-       0xf40464b6,
-       0x21f51b11,
-       0x37f007b8,
-       0x5c21f500,
-       0x88e7f107,
+/* 0x0a79: i2c_bitw */
+       0x7321f500,
+       0xe8e7f109,
+       0x7e21f403,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0xc521f550,
+       0x0464b609,
+       0xf11811f4,
+       0xf41388e7,
+       0x37f07e21,
+       0x5121f500,
+       0x88e7f109,
        0x7e21f413,
-       0xf4013cf0,
-/* 0x090a: i2c_bitr_done */
-       0x00f80131,
-/* 0x090c: i2c_get_byte */
-       0xf00057f0,
-/* 0x0912: i2c_get_byte_next */
-       0x54b60847,
+/* 0x0ab8: i2c_bitw_out */
+/* 0x0aba: i2c_bitr */
+       0x37f000f8,
+       0x7321f501,
+       0xe8e7f109,
+       0x7e21f403,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0xc521f550,
+       0x0464b609,
+       0xf51b11f4,
+       0xf009ad21,
+       0x21f50037,
+       0xe7f10951,
+       0x21f41388,
+       0x013cf07e,
+/* 0x0aff: i2c_bitr_done */
+       0xf80131f4,
+/* 0x0b01: i2c_get_byte */
+       0x0057f000,
+/* 0x0b07: i2c_get_byte_next */
+       0xb60847f0,
+       0x76bb0154,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb60aba21,
+       0x11f40464,
+       0x0553fd2b,
+       0xf40142b6,
+       0x37f0d81b,
        0x0076bb01,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
        0x21f550fc,
-       0x64b608c5,
-       0x2b11f404,
-       0xb60553fd,
-       0x1bf40142,
-       0x0137f0d8,
-       0xb60076bb,
-       0x50f90465,
-       0xbb046594,
-       0x50bd0256,
-       0xfc0475fd,
-       0x8421f550,
-       0x0464b608,
-/* 0x095c: i2c_get_byte_done */
-/* 0x095e: i2c_put_byte */
-       0x47f000f8,
-/* 0x0961: i2c_put_byte_next */
-       0x0142b608,
-       0xbb3854ff,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x088421f5,
-       0xf40464b6,
-       0x46b03411,
-       0xd81bf400,
+       0x64b60a79,
+/* 0x0b51: i2c_get_byte_done */
+/* 0x0b53: i2c_put_byte */
+       0xf000f804,
+/* 0x0b56: i2c_put_byte_next */
+       0x42b60847,
+       0x3854ff01,
        0xb60076bb,
        0x50f90465,
        0xbb046594,
        0x50bd0256,
        0xfc0475fd,
-       0xc521f550,
-       0x0464b608,
-       0xbb0f11f4,
-       0x36b00076,
-       0x061bf401,
-/* 0x09b7: i2c_put_byte_done */
-       0xf80132f4,
-/* 0x09b9: i2c_addr */
-       0x0076bb00,
+       0x7921f550,
+       0x0464b60a,
+       0xb03411f4,
+       0x1bf40046,
+       0x0076bbd8,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
        0x21f550fc,
-       0x64b607f5,
-       0x2911f404,
-       0x012ec3e7,
-       0xfd0134b6,
-       0x76bb0553,
+       0x64b60aba,
+       0x0f11f404,
+       0xb00076bb,
+       0x1bf40136,
+       0x0132f406,
+/* 0x0bac: i2c_put_byte_done */
+/* 0x0bae: i2c_addr */
+       0x76bb00f8,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0xf550fc04,
-       0xb6095e21,
-/* 0x09fe: i2c_addr_done */
-       0x00f80464,
-/* 0x0a00: i2c_acquire_addr */
-       0xb6f8cec7,
-       0xe0b702e4,
-       0xee980d1c,
-/* 0x0a0f: i2c_acquire */
-       0xf500f800,
-       0xf40a0021,
-       0xd9f00421,
-       0x4021f403,
-/* 0x0a1e: i2c_release */
-       0x21f500f8,
-       0x21f40a00,
-       0x03daf004,
-       0xf84021f4,
-/* 0x0a2d: i2c_recv */
-       0x0132f400,
-       0xb6f8c1c7,
-       0x16b00214,
-       0x3a1ff528,
-       0xf413a001,
-       0x0032980c,
-       0x0ccc13a0,
-       0xf4003198,
-       0xd0f90231,
-       0xd0f9e0f9,
-       0x000067f1,
-       0x100063f1,
-       0xbb016792,
+       0xb609ea21,
+       0x11f40464,
+       0x2ec3e729,
+       0x0134b601,
+       0xbb0553fd,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x0a0f21f5,
-       0xfc0464b6,
-       0x00d6b0d0,
-       0x00b31bf5,
-       0xbb0057f0,
+       0x0b5321f5,
+/* 0x0bf3: i2c_addr_done */
+       0xf80464b6,
+/* 0x0bf5: i2c_acquire_addr */
+       0xf8cec700,
+       0xb702e4b6,
+       0x980d28e0,
+       0x00f800ee,
+/* 0x0c04: i2c_acquire */
+       0x0bf521f5,
+       0xf00421f4,
+       0x21f403d9,
+/* 0x0c13: i2c_release */
+       0xf500f840,
+       0xf40bf521,
+       0xdaf00421,
+       0x4021f403,
+/* 0x0c22: i2c_recv */
+       0x32f400f8,
+       0xf8c1c701,
+       0xb00214b6,
+       0x1ff52816,
+       0x13a0013a,
+       0x32980d00,
+       0xd813a000,
+       0x0031980c,
+       0xf90231f4,
+       0xf9e0f9d0,
+       0x0067f1d0,
+       0x0063f100,
+       0x01679210,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x0421f550,
+       0x0464b60c,
+       0xd6b0d0fc,
+       0xb31bf500,
+       0x0057f000,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0xae21f550,
+       0x0464b60b,
+       0x00d011f5,
+       0xbbe0c5c7,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x09b921f5,
+       0x0b5321f5,
        0xf50464b6,
-       0xc700d011,
-       0x76bbe0c5,
+       0xf000ad11,
+       0x76bb0157,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0xf550fc04,
-       0xb6095e21,
+       0xb60bae21,
        0x11f50464,
-       0x57f000ad,
-       0x0076bb01,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b609b9,
-       0x8a11f504,
-       0x0076bb00,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b6090c,
-       0x6a11f404,
-       0xbbe05bcb,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x085121f5,
-       0xb90464b6,
-       0x74bd025b,
-/* 0x0b33: i2c_recv_not_rd08 */
-       0xb0430ef4,
-       0x1bf401d6,
-       0x0057f03d,
-       0x09b921f5,
-       0xc73311f4,
-       0x21f5e0c5,
-       0x11f4095e,
-       0x0057f029,
-       0x09b921f5,
-       0xc71f11f4,
-       0x21f5e0b5,
-       0x11f4095e,
-       0x5121f515,
-       0xc774bd08,
-       0x1bf408c5,
-       0x0232f409,
-/* 0x0b73: i2c_recv_not_wr08 */
-/* 0x0b73: i2c_recv_done */
-       0xc7030ef4,
-       0x21f5f8ce,
-       0xe0fc0a1e,
-       0x12f4d0fc,
-       0x027cb90a,
-       0x033621f5,
-/* 0x0b88: i2c_recv_exit */
-/* 0x0b8a: i2c_init */
+       0x76bb008a,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb60b0121,
+       0x11f40464,
+       0xe05bcb6a,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x4621f550,
+       0x0464b60a,
+       0xbd025bb9,
+       0x430ef474,
+/* 0x0d28: i2c_recv_not_rd08 */
+       0xf401d6b0,
+       0x57f03d1b,
+       0xae21f500,
+       0x3311f40b,
+       0xf5e0c5c7,
+       0xf40b5321,
+       0x57f02911,
+       0xae21f500,
+       0x1f11f40b,
+       0xf5e0b5c7,
+       0xf40b5321,
+       0x21f51511,
+       0x74bd0a46,
+       0xf408c5c7,
+       0x32f4091b,
+       0x030ef402,
+/* 0x0d68: i2c_recv_not_wr08 */
+/* 0x0d68: i2c_recv_done */
+       0xf5f8cec7,
+       0xfc0c1321,
+       0xf4d0fce0,
+       0x7cb90a12,
+       0x3621f502,
+/* 0x0d7d: i2c_recv_exit */
+/* 0x0d7f: i2c_init */
+       0xf800f803,
+/* 0x0d81: test_recv */
+       0xd817f100,
+       0x0614b605,
+       0xb60011cf,
+       0x07f10110,
+       0x04b605d8,
+       0x0001d006,
+       0xe7f104bd,
+       0xe3f1d900,
+       0x21f5134f,
+       0x00f80256,
+/* 0x0da8: test_init */
+       0x0800e7f1,
+       0x025621f5,
+/* 0x0db2: idle_recv */
        0x00f800f8,
-/* 0x0b8c: test_recv */
-       0x05d817f1,
-       0xcf0614b6,
-       0x10b60011,
-       0xd807f101,
-       0x0604b605,
-       0xbd0001d0,
-       0x00e7f104,
-       0x4fe3f1d9,
-       0x5621f513,
-/* 0x0bb3: test_init */
-       0xf100f802,
-       0xf50800e7,
-       0xf8025621,
-/* 0x0bbd: idle_recv */
-/* 0x0bbf: idle */
-       0xf400f800,
-       0x17f10031,
-       0x14b605d4,
-       0x0011cf06,
-       0xf10110b6,
-       0xb605d407,
-       0x01d00604,
-/* 0x0bdb: idle_loop */
-       0xf004bd00,
-       0x32f45817,
-/* 0x0be1: idle_proc */
-/* 0x0be1: idle_proc_exec */
-       0xb910f902,
-       0x21f5021e,
-       0x10fc033f,
-       0xf40911f4,
-       0x0ef40231,
-/* 0x0bf5: idle_proc_next */
-       0x5810b6ef,
-       0xf4061fb8,
-       0x02f4e61b,
-       0x0028f4dd,
-       0x00bb0ef4,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
+/* 0x0db4: idle */
+       0xf10031f4,
+       0xb605d417,
+       0x11cf0614,
+       0x0110b600,
+       0x05d407f1,
+       0xd00604b6,
+       0x04bd0001,
+/* 0x0dd0: idle_loop */
+       0xf45817f0,
+/* 0x0dd6: idle_proc */
+/* 0x0dd6: idle_proc_exec */
+       0x10f90232,
+       0xf5021eb9,
+       0xfc033f21,
+       0x0911f410,
+       0xf40231f4,
+/* 0x0dea: idle_proc_next */
+       0x10b6ef0e,
+       0x061fb858,
+       0xf4e61bf4,
+       0x28f4dd02,
+       0xbb0ef400,
        0x00000000,
 };
diff --git a/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h 
b/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
index fe890566..78f6379a 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
@@ -1,4 +1,4 @@
-static uint32_t gf119_pmu_data[] = {
+uint32_t gf119_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
        0x00000000,
@@ -68,7 +68,7 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x46524550,
-       0x00000687,
+       0x000007c6,
        0x00000685,
        0x00000000,
        0x00000000,
@@ -90,8 +90,8 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x5f433249,
-       0x00000aa2,
-       0x00000945,
+       0x00000c4f,
+       0x00000af2,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -112,8 +112,8 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x54534554,
-       0x00000ac5,
-       0x00000aa4,
+       0x00000c72,
+       0x00000c51,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -134,8 +134,8 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x454c4449,
-       0x00000ad1,
-       0x00000acf,
+       0x00000c7e,
+       0x00000c7c,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -834,7 +834,18 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
 /* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_polling_period_us */
+       0x000186a0,
+/* 0x0cd0: perf_slot1 */
+/* 0x0cd1: perf_slot2 */
+/* 0x0cd2: perf_slot3 */
+/* 0x0cd3: perf_slot4 */
+       0x00000000,
+/* 0x0cd4: perf_slot5 */
+/* 0x0cd5: perf_slot6 */
+/* 0x0cd6: perf_slot7 */
+       0x00000000,
+/* 0x0cd8: i2c_scl_map */
        0x00000400,
        0x00000800,
        0x00001000,
@@ -845,7 +856,7 @@ static uint32_t gf119_pmu_data[] = {
        0x00020000,
        0x00040000,
        0x00080000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0d00: i2c_sda_map */
        0x00100000,
        0x00200000,
        0x00400000,
@@ -910,12 +921,9 @@ static uint32_t gf119_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
 };
 
-static uint32_t gf119_pmu_code[] = {
+uint32_t gf119_pmu_code[] = {
        0x03410ef5,
 /* 0x0004: rd32 */
        0x07a007f1,
@@ -1393,387 +1401,454 @@ static uint32_t gf119_pmu_code[] = {
 /* 0x0683: memx_init */
        0xf800f8d8,
 /* 0x0685: perf_recv */
-/* 0x0687: perf_init */
-       0xf800f800,
-/* 0x0689: i2c_drive_scl */
-       0x0036b000,
-       0xf10e0bf4,
-       0xd007e007,
+       0x48a7f100,
+       0x53a3f14f,
+       0x06eab854,
+       0xf4061bf4,
+/* 0x0696: perf_recv_not_host */
+       0x21f51b0e,
+       0x07f106b0,
+       0x03f00ccc,
+       0x000e9800,
+       0x21f504bd,
+       0x21f501eb,
+/* 0x06ae: perf_recv_exit */
+       0x00f80217,
+/* 0x06b0: perf_counter_readout */
+       0x20f910f9,
+       0x40f930f9,
+       0x60f950f9,
+       0x80f970f9,
+       0x050817f1,
+       0xf10011cf,
+       0xcf051827,
+       0x37f10022,
+       0x33cf0528,
+       0x3847f100,
+       0x0044cf05,
+       0x054857f1,
+       0xf10055cf,
+       0xcf055867,
+       0x77f10066,
+       0x77cf0568,
+       0x7887f100,
+       0x0088cf05,
+       0x0000e7f1,
+       0x8000e3f1,
+       0x050807f1,
+       0xbd000ed0,
+       0x1807f104,
+       0x000ed005,
+       0x07f104bd,
+       0x0ed00528,
+       0xf104bd00,
+       0xd0053807,
+       0x04bd000e,
+       0x054807f1,
+       0xbd000ed0,
+       0x5807f104,
+       0x000ed005,
+       0x07f104bd,
+       0x0ed00568,
+       0xf104bd00,
+       0xd0057807,
+       0x04bd000e,
+       0xffff11cc,
+       0x31ff2c21,
+       0x4c41ff3c,
+       0xff5c51ff,
+       0x71ff6c61,
+       0x8c81ff7c,
+       0x0cd007f1,
+       0x000003f0,
+       0x04bd0002,
+       0x0cd107f1,
+       0x000003f0,
+       0x04bd0003,
+       0x0cd207f1,
+       0x000003f0,
+       0x04bd0004,
+       0x0cd307f1,
+       0x000003f0,
+       0x04bd0005,
+       0x0cd407f1,
+       0x000003f0,
+       0x04bd0006,
+       0x0cd507f1,
+       0x000003f0,
+       0x04bd0007,
+       0x0cd607f1,
+       0x000003f0,
+       0x04bd0008,
+       0x70fc80fc,
+       0x50fc60fc,
+       0x30fc40fc,
+       0x10fc20fc,
+/* 0x07c6: perf_init */
+       0xe7f100f8,
+       0xe3f00003,
+       0x0c07f100,
+       0x000ed005,
+       0xe7f104bd,
+       0xe3f00002,
+       0x1c07f100,
+       0x000ed005,
+       0x07f104bd,
+       0x0ed0052c,
+       0xf104bd00,
+       0xd0053c07,
+       0x04bd000e,
+       0x054c07f1,
+       0xbd000ed0,
+       0x5c07f104,
+       0x000ed005,
+       0x07f104bd,
+       0x0ed0056c,
+       0xf104bd00,
+       0xd0057c07,
+       0x04bd000e,
+       0x06b021f5,
+       0x0ccc07f1,
+       0x980003f0,
+       0x04bd000e,
+       0x01eb21f5,
+       0x021721f5,
+/* 0x0836: i2c_drive_scl */
+       0x36b000f8,
+       0x0e0bf400,
+       0x07e007f1,
+       0xbd0001d0,
+/* 0x0847: i2c_drive_scl_lo */
+       0xf100f804,
+       0xd007e407,
        0x04bd0001,
-/* 0x069a: i2c_drive_scl_lo */
-       0x07f100f8,
-       0x01d007e4,
-       0xf804bd00,
-/* 0x06a5: i2c_drive_sda */
-       0x0036b000,
-       0xf10e0bf4,
-       0xd007e007,
+/* 0x0852: i2c_drive_sda */
+       0x36b000f8,
+       0x0e0bf400,
+       0x07e007f1,
+       0xbd0002d0,
+/* 0x0863: i2c_drive_sda_lo */
+       0xf100f804,
+       0xd007e407,
        0x04bd0002,
-/* 0x06b6: i2c_drive_sda_lo */
-       0x07f100f8,
-       0x02d007e4,
-       0xf804bd00,
-/* 0x06c1: i2c_sense_scl */
-       0x0132f400,
-       0x07c437f1,
-       0xfd0033cf,
-       0x0bf40431,
-       0x0131f406,
-/* 0x06d4: i2c_sense_scl_done */
-/* 0x06d6: i2c_sense_sda */
+/* 0x086e: i2c_sense_scl */
        0x32f400f8,
        0xc437f101,
        0x0033cf07,
-       0xf40432fd,
+       0xf40431fd,
        0x31f4060b,
-/* 0x06e9: i2c_sense_sda_done */
-/* 0x06eb: i2c_raise_scl */
-       0xf900f801,
-       0x9847f140,
+/* 0x0881: i2c_sense_scl_done */
+/* 0x0883: i2c_sense_sda */
+       0xf400f801,
+       0x37f10132,
+       0x33cf07c4,
+       0x0432fd00,
+       0xf4060bf4,
+/* 0x0896: i2c_sense_sda_done */
+       0x00f80131,
+/* 0x0898: i2c_raise_scl */
+       0x47f140f9,
+       0x37f00898,
+       0x3621f501,
+/* 0x08a5: i2c_raise_scl_wait */
+       0xe8e7f108,
+       0x6621f403,
+       0x086e21f5,
+       0xb60901f4,
+       0x1bf40142,
+/* 0x08b9: i2c_raise_scl_done */
+       0xf840fcef,
+/* 0x08bd: i2c_start */
+       0x6e21f500,
+       0x0d11f408,
+       0x088321f5,
+       0xf40611f4,
+/* 0x08ce: i2c_start_rep */
+       0x37f0300e,
+       0x3621f500,
        0x0137f008,
-       0x068921f5,
-/* 0x06f8: i2c_raise_scl_wait */
-       0x03e8e7f1,
-       0xf56621f4,
-       0xf406c121,
-       0x42b60901,
-       0xef1bf401,
-/* 0x070c: i2c_raise_scl_done */
-       0x00f840fc,
-/* 0x0710: i2c_start */
-       0x06c121f5,
-       0xf50d11f4,
-       0xf406d621,
-       0x0ef40611,
-/* 0x0721: i2c_start_rep */
-       0x0037f030,
-       0x068921f5,
+       0x085221f5,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x9821f550,
+       0x0464b608,
+/* 0x08fb: i2c_start_send */
+       0xf01f11f4,
+       0x21f50037,
+       0xe7f10852,
+       0x21f41388,
+       0x0037f066,
+       0x083621f5,
+       0x1388e7f1,
+/* 0x0917: i2c_start_out */
+       0xf86621f4,
+/* 0x0919: i2c_stop */
+       0x0037f000,
+       0x083621f5,
+       0xf50037f0,
+       0xf1085221,
+       0xf403e8e7,
+       0x37f06621,
+       0x3621f501,
+       0x88e7f108,
+       0x6621f413,
        0xf50137f0,
-       0xbb06a521,
+       0xf1085221,
+       0xf41388e7,
+       0x00f86621,
+/* 0x094c: i2c_bitw */
+       0x085221f5,
+       0x03e8e7f1,
+       0xbb6621f4,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x06eb21f5,
+       0x089821f5,
        0xf40464b6,
-/* 0x074e: i2c_start_send */
-       0x37f01f11,
-       0xa521f500,
-       0x88e7f106,
-       0x6621f413,
-       0xf50037f0,
-       0xf1068921,
-       0xf41388e7,
-/* 0x076a: i2c_start_out */
-       0x00f86621,
-/* 0x076c: i2c_stop */
-       0xf50037f0,
-       0xf0068921,
-       0x21f50037,
-       0xe7f106a5,
-       0x21f403e8,
-       0x0137f066,
-       0x068921f5,
-       0x1388e7f1,
-       0xf06621f4,
-       0x21f50137,
-       0xe7f106a5,
+       0xe7f11811,
        0x21f41388,
-/* 0x079f: i2c_bitw */
-       0xf500f866,
-       0xf106a521,
-       0xf403e8e7,
-       0x76bb6621,
-       0x0465b600,
-       0x659450f9,
-       0x0256bb04,
-       0x75fd50bd,
-       0xf550fc04,
-       0xb606eb21,
-       0x11f40464,
-       0x88e7f118,
-       0x6621f413,
-       0xf50037f0,
-       0xf1068921,
-       0xf41388e7,
-/* 0x07de: i2c_bitw_out */
-       0x00f86621,
-/* 0x07e0: i2c_bitr */
-       0xf50137f0,
-       0xf106a521,
-       0xf403e8e7,
-       0x76bb6621,
-       0x0465b600,
-       0x659450f9,
-       0x0256bb04,
-       0x75fd50bd,
-       0xf550fc04,
-       0xb606eb21,
-       0x11f40464,
-       0xd621f51b,
-       0x0037f006,
-       0x068921f5,
+       0x0037f066,
+       0x083621f5,
        0x1388e7f1,
-       0xf06621f4,
-       0x31f4013c,
-/* 0x0825: i2c_bitr_done */
-/* 0x0827: i2c_get_byte */
-       0xf000f801,
-       0x47f00057,
-/* 0x082d: i2c_get_byte_next */
-       0x0154b608,
-       0xb60076bb,
-       0x50f90465,
-       0xbb046594,
-       0x50bd0256,
-       0xfc0475fd,
-       0xe021f550,
-       0x0464b607,
-       0xfd2b11f4,
-       0x42b60553,
-       0xd81bf401,
-       0xbb0137f0,
+/* 0x098b: i2c_bitw_out */
+       0xf86621f4,
+/* 0x098d: i2c_bitr */
+       0x0137f000,
+       0x085221f5,
+       0x03e8e7f1,
+       0xbb6621f4,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x079f21f5,
-/* 0x0877: i2c_get_byte_done */
-       0xf80464b6,
-/* 0x0879: i2c_put_byte */
-       0x0847f000,
-/* 0x087c: i2c_put_byte_next */
-       0xff0142b6,
-       0x76bb3854,
-       0x0465b600,
-       0x659450f9,
-       0x0256bb04,
-       0x75fd50bd,
-       0xf550fc04,
-       0xb6079f21,
-       0x11f40464,
-       0x0046b034,
-       0xbbd81bf4,
+       0x089821f5,
+       0xf40464b6,
+       0x21f51b11,
+       0x37f00883,
+       0x3621f500,
+       0x88e7f108,
+       0x6621f413,
+       0xf4013cf0,
+/* 0x09d2: i2c_bitr_done */
+       0x00f80131,
+/* 0x09d4: i2c_get_byte */
+       0xf00057f0,
+/* 0x09da: i2c_get_byte_next */
+       0x54b60847,
+       0x0076bb01,
+       0xf90465b6,
+       0x04659450,
+       0xbd0256bb,
+       0x0475fd50,
+       0x21f550fc,
+       0x64b6098d,
+       0x2b11f404,
+       0xb60553fd,
+       0x1bf40142,
+       0x0137f0d8,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x4c21f550,
+       0x0464b609,
+/* 0x0a24: i2c_get_byte_done */
+/* 0x0a26: i2c_put_byte */
+       0x47f000f8,
+/* 0x0a29: i2c_put_byte_next */
+       0x0142b608,
+       0xbb3854ff,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x07e021f5,
+       0x094c21f5,
        0xf40464b6,
-       0x76bb0f11,
-       0x0136b000,
-       0xf4061bf4,
-/* 0x08d2: i2c_put_byte_done */
-       0x00f80132,
-/* 0x08d4: i2c_addr */
+       0x46b03411,
+       0xd81bf400,
        0xb60076bb,
        0x50f90465,
        0xbb046594,
        0x50bd0256,
        0xfc0475fd,
-       0x1021f550,
-       0x0464b607,
-       0xe72911f4,
-       0xb6012ec3,
-       0x53fd0134,
-       0x0076bb05,
+       0x8d21f550,
+       0x0464b609,
+       0xbb0f11f4,
+       0x36b00076,
+       0x061bf401,
+/* 0x0a7f: i2c_put_byte_done */
+       0xf80132f4,
+/* 0x0a81: i2c_addr */
+       0x0076bb00,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
        0x21f550fc,
-       0x64b60879,
-/* 0x0919: i2c_addr_done */
-/* 0x091b: i2c_acquire_addr */
-       0xc700f804,
-       0xe4b6f8ce,
-       0x14e0b705,
-/* 0x0927: i2c_acquire */
-       0xf500f8d0,
-       0xf4091b21,
-       0xd9f00421,
+       0x64b608bd,
+       0x2911f404,
+       0x012ec3e7,
+       0xfd0134b6,
+       0x76bb0553,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb60a2621,
+/* 0x0ac6: i2c_addr_done */
+       0x00f80464,
+/* 0x0ac8: i2c_acquire_addr */
+       0xb6f8cec7,
+       0xe0b705e4,
+       0x00f8d014,
+/* 0x0ad4: i2c_acquire */
+       0x0ac821f5,
+       0xf00421f4,
+       0x21f403d9,
+/* 0x0ae3: i2c_release */
+       0xf500f834,
+       0xf40ac821,
+       0xdaf00421,
        0x3421f403,
-/* 0x0936: i2c_release */
-       0x21f500f8,
-       0x21f4091b,
-       0x03daf004,
-       0xf83421f4,
-/* 0x0945: i2c_recv */
-       0x0132f400,
-       0xb6f8c1c7,
-       0x16b00214,
-       0x3a1ff528,
-       0xf413a001,
-       0x0032980c,
-       0x0ccc13a0,
-       0xf4003198,
-       0xd0f90231,
-       0xd0f9e0f9,
-       0x000067f1,
-       0x100063f1,
-       0xbb016792,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x092721f5,
-       0xfc0464b6,
-       0x00d6b0d0,
-       0x00b31bf5,
-       0xbb0057f0,
+/* 0x0af2: i2c_recv */
+       0x32f400f8,
+       0xf8c1c701,
+       0xb00214b6,
+       0x1ff52816,
+       0x13a0013a,
+       0x32980d00,
+       0xd813a000,
+       0x0031980c,
+       0xf90231f4,
+       0xf9e0f9d0,
+       0x0067f1d0,
+       0x0063f100,
+       0x01679210,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0xd421f550,
+       0x0464b60a,
+       0xd6b0d0fc,
+       0xb31bf500,
+       0x0057f000,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x8121f550,
+       0x0464b60a,
+       0x00d011f5,
+       0xbbe0c5c7,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x08d421f5,
+       0x0a2621f5,
        0xf50464b6,
-       0xc700d011,
-       0x76bbe0c5,
+       0xf000ad11,
+       0x76bb0157,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0xf550fc04,
-       0xb6087921,
+       0xb60a8121,
        0x11f50464,
-       0x57f000ad,
-       0x0076bb01,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b608d4,
-       0x8a11f504,
-       0x0076bb00,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b60827,
-       0x6a11f404,
-       0xbbe05bcb,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x076c21f5,
-       0xb90464b6,
-       0x74bd025b,
-/* 0x0a4b: i2c_recv_not_rd08 */
-       0xb0430ef4,
-       0x1bf401d6,
-       0x0057f03d,
-       0x08d421f5,
-       0xc73311f4,
-       0x21f5e0c5,
-       0x11f40879,
-       0x0057f029,
-       0x08d421f5,
-       0xc71f11f4,
-       0x21f5e0b5,
-       0x11f40879,
-       0x6c21f515,
-       0xc774bd07,
-       0x1bf408c5,
-       0x0232f409,
-/* 0x0a8b: i2c_recv_not_wr08 */
-/* 0x0a8b: i2c_recv_done */
-       0xc7030ef4,
-       0x21f5f8ce,
-       0xe0fc0936,
-       0x12f4d0fc,
-       0x027cb90a,
-       0x02e521f5,
-/* 0x0aa0: i2c_recv_exit */
-/* 0x0aa2: i2c_init */
-       0x00f800f8,
-/* 0x0aa4: test_recv */
-       0x05d817f1,
-       0xb60011cf,
-       0x07f10110,
-       0x01d005d8,
-       0xf104bd00,
-       0xf1d900e7,
-       0xf5134fe3,
-       0xf8021721,
-/* 0x0ac5: test_init */
-       0x00e7f100,
-       0x1721f508,
-/* 0x0acf: idle_recv */
+       0x76bb008a,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb609d421,
+       0x11f40464,
+       0xe05bcb6a,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x1921f550,
+       0x0464b609,
+       0xbd025bb9,
+       0x430ef474,
+/* 0x0bf8: i2c_recv_not_rd08 */
+       0xf401d6b0,
+       0x57f03d1b,
+       0x8121f500,
+       0x3311f40a,
+       0xf5e0c5c7,
+       0xf40a2621,
+       0x57f02911,
+       0x8121f500,
+       0x1f11f40a,
+       0xf5e0b5c7,
+       0xf40a2621,
+       0x21f51511,
+       0x74bd0919,
+       0xf408c5c7,
+       0x32f4091b,
+       0x030ef402,
+/* 0x0c38: i2c_recv_not_wr08 */
+/* 0x0c38: i2c_recv_done */
+       0xf5f8cec7,
+       0xfc0ae321,
+       0xf4d0fce0,
+       0x7cb90a12,
+       0xe521f502,
+/* 0x0c4d: i2c_recv_exit */
+/* 0x0c4f: i2c_init */
        0xf800f802,
-/* 0x0ad1: idle */
-       0x0031f400,
-       0x05d417f1,
-       0xb60011cf,
-       0x07f10110,
-       0x01d005d4,
-/* 0x0ae7: idle_loop */
-       0xf004bd00,
-       0x32f45817,
-/* 0x0aed: idle_proc */
-/* 0x0aed: idle_proc_exec */
-       0xb910f902,
-       0x21f5021e,
-       0x10fc02ee,
-       0xf40911f4,
-       0x0ef40231,
-/* 0x0b01: idle_proc_next */
-       0x5810b6ef,
-       0xf4061fb8,
-       0x02f4e61b,
-       0x0028f4dd,
-       0x00c10ef4,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
+/* 0x0c51: test_recv */
+       0xd817f100,
+       0x0011cf05,
+       0xf10110b6,
+       0xd005d807,
+       0x04bd0001,
+       0xd900e7f1,
+       0x134fe3f1,
+       0x021721f5,
+/* 0x0c72: test_init */
+       0xe7f100f8,
+       0x21f50800,
+       0x00f80217,
+/* 0x0c7c: idle_recv */
+/* 0x0c7e: idle */
+       0x31f400f8,
+       0xd417f100,
+       0x0011cf05,
+       0xf10110b6,
+       0xd005d407,
+       0x04bd0001,
+/* 0x0c94: idle_loop */
+       0xf45817f0,
+/* 0x0c9a: idle_proc */
+/* 0x0c9a: idle_proc_exec */
+       0x10f90232,
+       0xf5021eb9,
+       0xfc02ee21,
+       0x0911f410,
+       0xf40231f4,
+/* 0x0cae: idle_proc_next */
+       0x10b6ef0e,
+       0x061fb858,
+       0xf4e61bf4,
+       0x28f4dd02,
+       0xc10ef400,
        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 9cf4e6fc..01f409ed 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
@@ -1,4 +1,4 @@
-static uint32_t gk208_pmu_data[] = {
+uint32_t gk208_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
        0x00000000,
@@ -68,7 +68,7 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x46524550,
-       0x000005f7,
+       0x000006f8,
        0x000005f5,
        0x00000000,
        0x00000000,
@@ -90,8 +90,8 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x5f433249,
-       0x000009f8,
-       0x000008a2,
+       0x00000b51,
+       0x000009fb,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -112,8 +112,8 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x54534554,
-       0x00000a16,
-       0x000009fa,
+       0x00000b6f,
+       0x00000b53,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -134,8 +134,8 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x454c4449,
-       0x00000a21,
-       0x00000a1f,
+       0x00000b7a,
+       0x00000b78,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -834,7 +834,18 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
 /* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_polling_period_us */
+       0x000186a0,
+/* 0x0cd0: perf_slot1 */
+/* 0x0cd1: perf_slot2 */
+/* 0x0cd2: perf_slot3 */
+/* 0x0cd3: perf_slot4 */
+       0x00000000,
+/* 0x0cd4: perf_slot5 */
+/* 0x0cd5: perf_slot6 */
+/* 0x0cd6: perf_slot7 */
+       0x00000000,
+/* 0x0cd8: i2c_scl_map */
        0x00000400,
        0x00000800,
        0x00001000,
@@ -845,7 +856,7 @@ static uint32_t gk208_pmu_data[] = {
        0x00020000,
        0x00040000,
        0x00080000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0d00: i2c_sda_map */
        0x00100000,
        0x00200000,
        0x00400000,
@@ -910,12 +921,9 @@ static uint32_t gk208_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
 };
 
-static uint32_t gk208_pmu_code[] = {
+uint32_t gk208_pmu_code[] = {
        0x02f90ef5,
 /* 0x0004: rd32 */
        0xf607a040,
@@ -1357,357 +1365,424 @@ static uint32_t gk208_pmu_code[] = {
 /* 0x05f3: memx_init */
        0xf800f8dc,
 /* 0x05f5: perf_recv */
-/* 0x05f7: perf_init */
-       0xf800f800,
-/* 0x05f9: i2c_drive_scl */
-       0x0036b000,
-       0x400d0bf4,
-       0x01f607e0,
-       0xf804bd00,
-/* 0x0609: i2c_drive_scl_lo */
-       0x07e44000,
-       0xbd0001f6,
-/* 0x0613: i2c_drive_sda */
-       0xb000f804,
-       0x0bf40036,
-       0x07e0400d,
-       0xbd0002f6,
-/* 0x0623: i2c_drive_sda_lo */
-       0x4000f804,
-       0x02f607e4,
-       0xf804bd00,
-/* 0x062d: i2c_sense_scl */
-       0x0132f400,
-       0xcf07c443,
-       0x31fd0033,
-       0x060bf404,
-/* 0x063f: i2c_sense_scl_done */
-       0xf80131f4,
-/* 0x0641: i2c_sense_sda */
-       0x0132f400,
-       0xcf07c443,
-       0x32fd0033,
-       0x060bf404,
-/* 0x0653: i2c_sense_sda_done */
-       0xf80131f4,
-/* 0x0655: i2c_raise_scl */
-       0x4440f900,
-       0x01030898,
-       0x0005f97e,
-/* 0x0660: i2c_raise_scl_wait */
-       0x7e03e84e,
-       0x7e000058,
-       0xf400062d,
-       0x42b60901,
-       0xef1bf401,
-/* 0x0674: i2c_raise_scl_done */
-       0x00f840fc,
-/* 0x0678: i2c_start */
-       0x00062d7e,
-       0x7e0d11f4,
-       0xf4000641,
-       0x0ef40611,
-/* 0x0689: i2c_start_rep */
-       0x7e00032e,
-       0x030005f9,
-       0x06137e01,
-       0x0076bb00,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x557e50fc,
-       0x64b60006,
-       0x1d11f404,
-/* 0x06b4: i2c_start_send */
-       0x137e0003,
-       0x884e0006,
-       0x00587e13,
-       0x7e000300,
-       0x4e0005f9,
-       0x587e1388,
-/* 0x06ce: i2c_start_out */
-       0x00f80000,
-/* 0x06d0: i2c_stop */
-       0xf97e0003,
-       0x00030005,
-       0x0006137e,
-       0x7e03e84e,
-       0x03000058,
-       0x05f97e01,
-       0x13884e00,
+       0x4f48da00,
+       0xeaa65453,
+       0xf4061bf4,
+/* 0x0602: perf_recv_not_host */
+       0x187e170e,
+       0xcc400006,
+       0x000e980c,
+       0xbb7e04bd,
+       0xde7e0001,
+/* 0x0616: perf_recv_exit */
+       0x00f80001,
+/* 0x0618: perf_counter_readout */
+       0x20f910f9,
+       0x40f930f9,
+       0x60f950f9,
+       0x80f970f9,
+       0xcf050841,
+       0x18420011,
+       0x0022cf05,
+       0xcf052843,
+       0x38440033,
+       0x0044cf05,
+       0xcf054845,
+       0x58460055,
+       0x0066cf05,
+       0xcf056847,
+       0x78480077,
+       0x0088cf05,
+       0x000000de,
+       0x05084080,
+       0xbd000ef6,
+       0x05184004,
+       0xbd000ef6,
+       0x05284004,
+       0xbd000ef6,
+       0x05384004,
+       0xbd000ef6,
+       0x05484004,
+       0xbd000ef6,
+       0x05584004,
+       0xbd000ef6,
+       0x05684004,
+       0xbd000ef6,
+       0x05784004,
+       0xbd000ef6,
+       0xff11cc04,
+       0xff2c21ff,
+       0x41ff3c31,
+       0x5c51ff4c,
+       0xff6c61ff,
+       0x81ff7c71,
+       0x0cd0408c,
+       0x04bd0220,
+       0x200cd140,
+       0x4004bd03,
+       0x04200cd2,
+       0xd34004bd,
+       0xbd05200c,
+       0x0cd44004,
+       0x04bd0620,
+       0x200cd540,
+       0x4004bd07,
+       0x08200cd6,
+       0x80fc04bd,
+       0x60fc70fc,
+       0x40fc50fc,
+       0x20fc30fc,
+       0x00f810fc,
+/* 0x06f8: perf_init */
+       0x0c40030e,
+       0x000ef605,
+       0x020e04bd,
+       0xf6051c40,
+       0x04bd000e,
+       0xf6052c40,
+       0x04bd000e,
+       0xf6053c40,
+       0x04bd000e,
+       0xf6054c40,
+       0x04bd000e,
+       0xf6055c40,
+       0x04bd000e,
+       0xf6056c40,
+       0x04bd000e,
+       0xf6057c40,
+       0x04bd000e,
+       0x0006187e,
+       0x980ccc40,
+       0x04bd000e,
+       0x01bb21f5,
+       0x0001de7e,
+/* 0x0752: i2c_drive_scl */
+       0x36b000f8,
+       0x0d0bf400,
+       0xf607e040,
+       0x04bd0001,
+/* 0x0762: i2c_drive_scl_lo */
+       0xe44000f8,
+       0x0001f607,
+       0x00f804bd,
+/* 0x076c: i2c_drive_sda */
+       0xf40036b0,
+       0xe0400d0b,
+       0x0002f607,
+       0x00f804bd,
+/* 0x077c: i2c_drive_sda_lo */
+       0xf607e440,
+       0x04bd0002,
+/* 0x0786: i2c_sense_scl */
+       0x32f400f8,
+       0x07c44301,
+       0xfd0033cf,
+       0x0bf40431,
+       0x0131f406,
+/* 0x0798: i2c_sense_scl_done */
+/* 0x079a: i2c_sense_sda */
+       0x32f400f8,
+       0x07c44301,
+       0xfd0033cf,
+       0x0bf40432,
+       0x0131f406,
+/* 0x07ac: i2c_sense_sda_done */
+/* 0x07ae: i2c_raise_scl */
+       0x40f900f8,
+       0x03089844,
+       0x07527e01,
+/* 0x07b9: i2c_raise_scl_wait */
+       0x03e84e00,
        0x0000587e,
-       0x137e0103,
-       0x884e0006,
-       0x00587e13,
-/* 0x06ff: i2c_bitw */
-       0x7e00f800,
-       0x4e000613,
-       0x587e03e8,
-       0x76bb0000,
+       0x0007867e,
+       0xb60901f4,
+       0x1bf40142,
+/* 0x07cd: i2c_raise_scl_done */
+       0xf840fcef,
+/* 0x07d1: i2c_start */
+       0x07867e00,
+       0x0d11f400,
+       0x00079a7e,
+       0xf40611f4,
+/* 0x07e2: i2c_start_rep */
+       0x00032e0e,
+       0x0007527e,
+       0x6c7e0103,
+       0x76bb0007,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0x7e50fc04,
-       0xb6000655,
+       0xb60007ae,
        0x11f40464,
-       0x13884e17,
-       0x0000587e,
-       0xf97e0003,
-       0x884e0005,
-       0x00587e13,
-/* 0x073d: i2c_bitw_out */
-/* 0x073f: i2c_bitr */
-       0x0300f800,
-       0x06137e01,
+/* 0x080d: i2c_start_send */
+       0x7e00031d,
+       0x4e00076c,
+       0x587e1388,
+       0x00030000,
+       0x0007527e,
+       0x7e13884e,
+/* 0x0827: i2c_start_out */
+       0xf8000058,
+/* 0x0829: i2c_stop */
+       0x7e000300,
+       0x03000752,
+       0x076c7e00,
        0x03e84e00,
        0x0000587e,
-       0xb60076bb,
-       0x50f90465,
-       0xbb046594,
-       0x50bd0256,
-       0xfc0475fd,
-       0x06557e50,
-       0x0464b600,
-       0x7e1a11f4,
-       0x03000641,
-       0x05f97e00,
-       0x13884e00,
-       0x0000587e,
-       0xf4013cf0,
-/* 0x0782: i2c_bitr_done */
-       0x00f80131,
-/* 0x0784: i2c_get_byte */
-       0x08040005,
-/* 0x0788: i2c_get_byte_next */
-       0xbb0154b6,
+       0x527e0103,
+       0x884e0007,
+       0x00587e13,
+       0x7e010300,
+       0x4e00076c,
+       0x587e1388,
+       0x00f80000,
+/* 0x0858: i2c_bitw */
+       0x00076c7e,
+       0x7e03e84e,
+       0xbb000058,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x00073f7e,
+       0x0007ae7e,
        0xf40464b6,
-       0x53fd2a11,
-       0x0142b605,
-       0x03d81bf4,
-       0x0076bb01,
+       0x884e1711,
+       0x00587e13,
+       0x7e000300,
+       0x4e000752,
+       0x587e1388,
+/* 0x0896: i2c_bitw_out */
+       0x00f80000,
+/* 0x0898: i2c_bitr */
+       0x6c7e0103,
+       0xe84e0007,
+       0x00587e03,
+       0x0076bb00,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
-       0xff7e50fc,
-       0x64b60006,
-/* 0x07d1: i2c_get_byte_done */
-/* 0x07d3: i2c_put_byte */
-       0x0400f804,
-/* 0x07d5: i2c_put_byte_next */
-       0x0142b608,
-       0xbb3854ff,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x0006ff7e,
-       0xf40464b6,
-       0x46b03411,
-       0xd81bf400,
+       0xae7e50fc,
+       0x64b60007,
+       0x1a11f404,
+       0x00079a7e,
+       0x527e0003,
+       0x884e0007,
+       0x00587e13,
+       0x013cf000,
+/* 0x08db: i2c_bitr_done */
+       0xf80131f4,
+/* 0x08dd: i2c_get_byte */
+       0x04000500,
+/* 0x08e1: i2c_get_byte_next */
+       0x0154b608,
        0xb60076bb,
        0x50f90465,
        0xbb046594,
        0x50bd0256,
        0xfc0475fd,
-       0x073f7e50,
+       0x08987e50,
        0x0464b600,
-       0xbb0f11f4,
-       0x36b00076,
-       0x061bf401,
-/* 0x082b: i2c_put_byte_done */
-       0xf80132f4,
-/* 0x082d: i2c_addr */
-       0x0076bb00,
+       0xfd2a11f4,
+       0x42b60553,
+       0xd81bf401,
+       0x76bb0103,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0x7e50fc04,
+       0xb6000858,
+/* 0x092a: i2c_get_byte_done */
+       0x00f80464,
+/* 0x092c: i2c_put_byte */
+/* 0x092e: i2c_put_byte_next */
+       0x42b60804,
+       0x3854ff01,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x08587e50,
+       0x0464b600,
+       0xb03411f4,
+       0x1bf40046,
+       0x0076bbd8,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
-       0x787e50fc,
-       0x64b60006,
-       0x2911f404,
-       0x012ec3e7,
-       0xfd0134b6,
-       0x76bb0553,
+       0x987e50fc,
+       0x64b60008,
+       0x0f11f404,
+       0xb00076bb,
+       0x1bf40136,
+       0x0132f406,
+/* 0x0984: i2c_put_byte_done */
+/* 0x0986: i2c_addr */
+       0x76bb00f8,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0x7e50fc04,
-       0xb60007d3,
-/* 0x0872: i2c_addr_done */
-       0x00f80464,
-/* 0x0874: i2c_acquire_addr */
-       0xb6f8cec7,
-       0xe0b705e4,
-       0x00f8d014,
-/* 0x0880: i2c_acquire */
-       0x0008747e,
-       0x0000047e,
-       0x7e03d9f0,
-       0xf800002d,
-/* 0x0891: i2c_release */
-       0x08747e00,
+       0xb60007d1,
+       0x11f40464,
+       0x2ec3e729,
+       0x0134b601,
+       0xbb0553fd,
+       0x65b60076,
+       0x9450f904,
+       0x56bb0465,
+       0xfd50bd02,
+       0x50fc0475,
+       0x00092c7e,
+/* 0x09cb: i2c_addr_done */
+       0xf80464b6,
+/* 0x09cd: i2c_acquire_addr */
+       0xf8cec700,
+       0xb705e4b6,
+       0xf8d014e0,
+/* 0x09d9: i2c_acquire */
+       0x09cd7e00,
        0x00047e00,
-       0x03daf000,
+       0x03d9f000,
        0x00002d7e,
-/* 0x08a2: i2c_recv */
-       0x32f400f8,
-       0xf8c1c701,
-       0xb00214b6,
-       0x1ff52816,
-       0x13b80134,
-       0x98000cf4,
-       0x13b80032,
-       0x98000ccc,
-       0x31f40031,
-       0xf9d0f902,
-       0xd6d0f9e0,
-       0x10000000,
-       0xbb016792,
+/* 0x09ea: i2c_release */
+       0xcd7e00f8,
+       0x047e0009,
+       0xdaf00000,
+       0x002d7e03,
+/* 0x09fb: i2c_recv */
+       0xf400f800,
+       0xc1c70132,
+       0x0214b6f8,
+       0xf52816b0,
+       0xb801341f,
+       0x000d0013,
+       0xb8003298,
+       0x000cd813,
+       0xf4003198,
+       0xd0f90231,
+       0xd0f9e0f9,
+       0x000000d6,
+       0x01679210,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x09d97e50,
+       0x0464b600,
+       0xd6b0d0fc,
+       0xb01bf500,
+       0xbb000500,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x0008807e,
-       0xfc0464b6,
-       0x00d6b0d0,
-       0x00b01bf5,
-       0x76bb0005,
+       0x0009867e,
+       0xf50464b6,
+       0xc700cc11,
+       0x76bbe0c5,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0x7e50fc04,
-       0xb600082d,
+       0xb600092c,
        0x11f50464,
-       0xc5c700cc,
-       0x0076bbe0,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0xd37e50fc,
-       0x64b60007,
-       0xa911f504,
-       0xbb010500,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x00082d7e,
-       0xf50464b6,
-       0xbb008711,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x0007847e,
-       0xf40464b6,
-       0x5bcb6711,
-       0x0076bbe0,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0xd07e50fc,
-       0x64b60006,
-       0xbd5bb204,
-       0x410ef474,
-/* 0x09a4: i2c_recv_not_rd08 */
-       0xf401d6b0,
-       0x00053b1b,
-       0x00082d7e,
-       0xc73211f4,
-       0xd37ee0c5,
-       0x11f40007,
-       0x7e000528,
-       0xf400082d,
-       0xb5c71f11,
-       0x07d37ee0,
-       0x1511f400,
-       0x0006d07e,
-       0xc5c774bd,
-       0x091bf408,
-       0xf40232f4,
-/* 0x09e2: i2c_recv_not_wr08 */
-/* 0x09e2: i2c_recv_done */
-       0xcec7030e,
-       0x08917ef8,
-       0xfce0fc00,
-       0x0912f4d0,
-       0x9f7e7cb2,
-/* 0x09f6: i2c_recv_exit */
-       0x00f80002,
-/* 0x09f8: i2c_init */
-/* 0x09fa: test_recv */
-       0x584100f8,
-       0x0011cf04,
-       0x400110b6,
-       0x01f60458,
-       0xde04bd00,
-       0x134fd900,
-       0x0001de7e,
-/* 0x0a16: test_init */
-       0x004e00f8,
-       0x01de7e08,
-/* 0x0a1f: idle_recv */
-       0xf800f800,
-/* 0x0a21: idle */
-       0x0031f400,
-       0xcf045441,
-       0x10b60011,
-       0x04544001,
-       0xbd0001f6,
-/* 0x0a35: idle_loop */
-       0xf4580104,
-/* 0x0a3a: idle_proc */
-/* 0x0a3a: idle_proc_exec */
-       0x10f90232,
-       0xa87e1eb2,
-       0x10fc0002,
-       0xf40911f4,
-       0x0ef40231,
-/* 0x0a4d: idle_proc_next */
-       0x5810b6f0,
-       0x1bf41fa6,
-       0xe002f4e8,
-       0xf40028f4,
-       0x0000c60e,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
-       0x00000000,
+       0x010500a9,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x09867e50,
+       0x0464b600,
+       0x008711f5,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x08dd7e50,
+       0x0464b600,
+       0xcb6711f4,
+       0x76bbe05b,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0x7e50fc04,
+       0xb6000829,
+       0x5bb20464,
+       0x0ef474bd,
+/* 0x0afd: i2c_recv_not_rd08 */
+       0x01d6b041,
+       0x053b1bf4,
+       0x09867e00,
+       0x3211f400,
+       0x7ee0c5c7,
+       0xf400092c,
+       0x00052811,
+       0x0009867e,
+       0xc71f11f4,
+       0x2c7ee0b5,
+       0x11f40009,
+       0x08297e15,
+       0xc774bd00,
+       0x1bf408c5,
+       0x0232f409,
+/* 0x0b3b: i2c_recv_not_wr08 */
+/* 0x0b3b: i2c_recv_done */
+       0xc7030ef4,
+       0xea7ef8ce,
+       0xe0fc0009,
+       0x12f4d0fc,
+       0x7e7cb209,
+/* 0x0b4f: i2c_recv_exit */
+       0xf800029f,
+/* 0x0b51: i2c_init */
+/* 0x0b53: test_recv */
+       0x4100f800,
+       0x11cf0458,
+       0x0110b600,
+       0xf6045840,
+       0x04bd0001,
+       0x4fd900de,
+       0x01de7e13,
+/* 0x0b6f: test_init */
+       0x4e00f800,
+       0xde7e0800,
+       0x00f80001,
+/* 0x0b78: idle_recv */
+/* 0x0b7a: idle */
+       0x31f400f8,
+       0x04544100,
+       0xb60011cf,
+       0x54400110,
+       0x0001f604,
+/* 0x0b8e: idle_loop */
+       0x580104bd,
+/* 0x0b93: idle_proc */
+/* 0x0b93: idle_proc_exec */
+       0xf90232f4,
+       0x7e1eb210,
+       0xfc0002a8,
+       0x0911f410,
+       0xf40231f4,
+/* 0x0ba6: idle_proc_next */
+       0x10b6f00e,
+       0xf41fa658,
+       0x02f4e81b,
+       0x0028f4e0,
+       0x00c60ef4,
        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 5d692425..345c9281 100644
--- a/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
+++ b/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
@@ -1,4 +1,4 @@
-static uint32_t gt215_pmu_data[] = {
+uint32_t gt215_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
        0x00000000,
@@ -68,7 +68,7 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x46524550,
-       0x0000083e,
+       0x00000909,
        0x0000083c,
        0x00000000,
        0x00000000,
@@ -90,8 +90,8 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x5f433249,
-       0x00000c6e,
-       0x00000b11,
+       0x00000d8f,
+       0x00000c32,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -112,8 +112,8 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x54534554,
-       0x00000c97,
-       0x00000c70,
+       0x00000db8,
+       0x00000d91,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -134,8 +134,8 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x454c4449,
-       0x00000ca3,
-       0x00000ca1,
+       0x00000dc4,
+       0x00000dc2,
        0x00000000,
        0x00000000,
        0x00000000,
@@ -834,7 +834,13 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
 /* 0x0ccc: memx_train_tail */
-/* 0x0ccc: i2c_scl_map */
+/* 0x0ccc: perf_polling_period_us */
+       0x000186a0,
+/* 0x0cd0: perf_slot1 */
+/* 0x0cd1: perf_slot2 */
+/* 0x0cd2: perf_slot3 */
+       0x00000000,
+/* 0x0cd4: i2c_scl_map */
        0x00001000,
        0x00004000,
        0x00010000,
@@ -845,7 +851,7 @@ static uint32_t gt215_pmu_data[] = {
        0x01000000,
        0x04000000,
        0x10000000,
-/* 0x0cf4: i2c_sda_map */
+/* 0x0cfc: i2c_sda_map */
        0x00002000,
        0x00008000,
        0x00020000,
@@ -856,7 +862,7 @@ static uint32_t gt215_pmu_data[] = {
        0x02000000,
        0x08000000,
        0x20000000,
-/* 0x0d1c: i2c_ctrl */
+/* 0x0d24: i2c_ctrl */
        0x0000e138,
        0x0000e150,
        0x0000e168,
@@ -912,11 +918,9 @@ static uint32_t gt215_pmu_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
-       0x00000000,
-       0x00000000,
 };
 
-static uint32_t gt215_pmu_code[] = {
+uint32_t gt215_pmu_code[] = {
        0x03920ef5,
 /* 0x0004: rd32 */
        0x07a007f1,
@@ -1512,352 +1516,483 @@ static uint32_t gt215_pmu_code[] = {
 /* 0x083a: memx_init */
        0x00f800f8,
 /* 0x083c: perf_recv */
-/* 0x083e: perf_init */
-       0x00f800f8,
-/* 0x0840: i2c_drive_scl */
-       0xf40036b0,
-       0x07f1110b,
-       0x04b607e0,
-       0x0001d006,
-       0x00f804bd,
-/* 0x0854: i2c_drive_scl_lo */
-       0x07e407f1,
-       0xd00604b6,
-       0x04bd0001,
-/* 0x0862: i2c_drive_sda */
-       0x36b000f8,
-       0x110bf400,
-       0x07e007f1,
-       0xd00604b6,
-       0x04bd0002,
-/* 0x0876: i2c_drive_sda_lo */
-       0x07f100f8,
-       0x04b607e4,
-       0x0002d006,
-       0x00f804bd,
-/* 0x0884: i2c_sense_scl */
-       0xf10132f4,
-       0xb607c437,
-       0x33cf0634,
-       0x0431fd00,
-       0xf4060bf4,
-/* 0x089a: i2c_sense_scl_done */
-       0x00f80131,
-/* 0x089c: i2c_sense_sda */
-       0xf10132f4,
-       0xb607c437,
+       0x4f48a7f1,
+       0x5453a3f1,
+       0xf406eab8,
+       0x0ef4061b,
+/* 0x084d: perf_recv_not_host */
+       0x6721f51b,
+       0xcc07f108,
+       0x0003f00c,
+       0xbd000e98,
+       0x2a21f504,
+       0x5621f502,
+/* 0x0865: perf_recv_exit */
+/* 0x0867: perf_counter_readout */
+       0xf900f802,
+       0xf920f910,
+       0xf140f930,
+       0xb6050817,
+       0x11cf0614,
+       0x1827f100,
+       0x0624b605,
+       0xf10022cf,
+       0xb6052837,
        0x33cf0634,
-       0x0432fd00,
-       0xf4060bf4,
-/* 0x08b2: i2c_sense_sda_done */
-       0x00f80131,
-/* 0x08b4: i2c_raise_scl */
-       0x47f140f9,
-       0x37f00898,
-       0x4021f501,
-/* 0x08c1: i2c_raise_scl_wait */
-       0xe8e7f108,
-       0x7e21f403,
-       0x088421f5,
-       0xb60901f4,
-       0x1bf40142,
-/* 0x08d5: i2c_raise_scl_done */
-       0xf840fcef,
-/* 0x08d9: i2c_start */
-       0x8421f500,
-       0x0d11f408,
-       0x089c21f5,
-       0xf40611f4,
-/* 0x08ea: i2c_start_rep */
-       0x37f0300e,
-       0x4021f500,
-       0x0137f008,
-       0x086221f5,
-       0xb60076bb,
-       0x50f90465,
-       0xbb046594,
-       0x50bd0256,
-       0xfc0475fd,
-       0xb421f550,
-       0x0464b608,
-/* 0x0917: i2c_start_send */
-       0xf01f11f4,
+       0x3847f100,
+       0x0644b605,
+       0xf10044cf,
+       0xf10000e7,
+       0xf18000e3,
+       0xb6050807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6051807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6052807,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6053807,
+       0x0ed00604,
+       0xcc04bd00,
+       0x21ffff11,
+       0x3c31ff2c,
+       0xf14c41ff,
+       0xf00cd007,
+       0x02000003,
+       0xf104bd00,
+       0xf00cd107,
+       0x03000003,
+       0xf104bd00,
+       0xf00cd207,
+       0x04000003,
+       0xfc04bd00,
+       0xfc30fc40,
+       0xf810fc20,
+/* 0x0909: perf_init */
+       0x03e7f100,
+       0x00e3f000,
+       0x050c07f1,
+       0xd00604b6,
+       0x04bd000e,
+       0x0002e7f1,
+       0xf100e3f0,
+       0xb6051c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6052c07,
+       0x0ed00604,
+       0xf104bd00,
+       0xb6053c07,
+       0x0ed00604,
+       0xf504bd00,
+       0xf1086721,
+       0xf00ccc07,
+       0x0e980003,
+       0xf504bd00,
+       0xf5022a21,
+       0xf8025621,
+/* 0x0961: i2c_drive_scl */
+       0x0036b000,
+       0xf1110bf4,
+       0xb607e007,
+       0x01d00604,
+       0xf804bd00,
+/* 0x0975: i2c_drive_scl_lo */
+       0xe407f100,
+       0x0604b607,
+       0xbd0001d0,
+/* 0x0983: i2c_drive_sda */
+       0xb000f804,
+       0x0bf40036,
+       0xe007f111,
+       0x0604b607,
+       0xbd0002d0,
+/* 0x0997: i2c_drive_sda_lo */
+       0xf100f804,
+       0xb607e407,
+       0x02d00604,
+       0xf804bd00,
+/* 0x09a5: i2c_sense_scl */
+       0x0132f400,
+       0x07c437f1,
+       0xcf0634b6,
+       0x31fd0033,
+       0x060bf404,
+/* 0x09bb: i2c_sense_scl_done */
+       0xf80131f4,
+/* 0x09bd: i2c_sense_sda */
+       0x0132f400,
+       0x07c437f1,
+       0xcf0634b6,
+       0x32fd0033,
+       0x060bf404,
+/* 0x09d3: i2c_sense_sda_done */
+       0xf80131f4,
+/* 0x09d5: i2c_raise_scl */
+       0xf140f900,
+       0xf0089847,
+       0x21f50137,
+/* 0x09e2: i2c_raise_scl_wait */
+       0xe7f10961,
+       0x21f403e8,
+       0xa521f57e,
+       0x0901f409,
+       0xf40142b6,
+/* 0x09f6: i2c_raise_scl_done */
+       0x40fcef1b,
+/* 0x09fa: i2c_start */
+       0x21f500f8,
+       0x11f409a5,
+       0xbd21f50d,
+       0x0611f409,
+/* 0x0a0b: i2c_start_rep */
+       0xf0300ef4,
        0x21f50037,
-       0xe7f10862,
-       0x21f41388,
-       0x0037f07e,
-       0x084021f5,
-       0x1388e7f1,
-/* 0x0933: i2c_start_out */
-       0xf87e21f4,
-/* 0x0935: i2c_stop */
-       0x0037f000,
-       0x084021f5,
+       0x37f00961,
+       0x8321f501,
+       0x0076bb09,
+       0xf90465b6,
+       0x04659450,
+       0xbd0256bb,
+       0x0475fd50,
+       0x21f550fc,
+       0x64b609d5,
+       0x1f11f404,
+/* 0x0a38: i2c_start_send */
        0xf50037f0,
-       0xf1086221,
-       0xf403e8e7,
+       0xf1098321,
+       0xf41388e7,
        0x37f07e21,
-       0x4021f501,
-       0x88e7f108,
+       0x6121f500,
+       0x88e7f109,
        0x7e21f413,
-       0xf50137f0,
-       0xf1086221,
-       0xf41388e7,
-       0x00f87e21,
-/* 0x0968: i2c_bitw */
-       0x086221f5,
+/* 0x0a54: i2c_start_out */
+/* 0x0a56: i2c_stop */
+       0x37f000f8,
+       0x6121f500,
+       0x0037f009,
+       0x098321f5,
        0x03e8e7f1,
-       0xbb7e21f4,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x08b421f5,
-       0xf40464b6,
-       0xe7f11811,
+       0xf07e21f4,
+       0x21f50137,
+       0xe7f10961,
        0x21f41388,
-       0x0037f07e,
-       0x084021f5,
+       0x0137f07e,
+       0x098321f5,
        0x1388e7f1,
-/* 0x09a7: i2c_bitw_out */
        0xf87e21f4,
-/* 0x09a9: i2c_bitr */
-       0x0137f000,
-       0x086221f5,
-       0x03e8e7f1,
-       0xbb7e21f4,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x08b421f5,
-       0xf40464b6,
-       0x21f51b11,
-       0x37f0089c,
-       0x4021f500,
-       0x88e7f108,
-       0x7e21f413,
-       0xf4013cf0,
-/* 0x09ee: i2c_bitr_done */
-       0x00f80131,
-/* 0x09f0: i2c_get_byte */
-       0xf00057f0,
-/* 0x09f6: i2c_get_byte_next */
-       0x54b60847,
-       0x0076bb01,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b609a9,
-       0x2b11f404,
-       0xb60553fd,
-       0x1bf40142,
-       0x0137f0d8,
+/* 0x0a89: i2c_bitw */
+       0x8321f500,
+       0xe8e7f109,
+       0x7e21f403,
        0xb60076bb,
        0x50f90465,
        0xbb046594,
        0x50bd0256,
        0xfc0475fd,
-       0x6821f550,
+       0xd521f550,
        0x0464b609,
-/* 0x0a40: i2c_get_byte_done */
-/* 0x0a42: i2c_put_byte */
-       0x47f000f8,
-/* 0x0a45: i2c_put_byte_next */
-       0x0142b608,
-       0xbb3854ff,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x096821f5,
-       0xf40464b6,
-       0x46b03411,
-       0xd81bf400,
+       0xf11811f4,
+       0xf41388e7,
+       0x37f07e21,
+       0x6121f500,
+       0x88e7f109,
+       0x7e21f413,
+/* 0x0ac8: i2c_bitw_out */
+/* 0x0aca: i2c_bitr */
+       0x37f000f8,
+       0x8321f501,
+       0xe8e7f109,
+       0x7e21f403,
        0xb60076bb,
        0x50f90465,
        0xbb046594,
        0x50bd0256,
        0xfc0475fd,
-       0xa921f550,
+       0xd521f550,
        0x0464b609,
-       0xbb0f11f4,
-       0x36b00076,
-       0x061bf401,
-/* 0x0a9b: i2c_put_byte_done */
-       0xf80132f4,
-/* 0x0a9d: i2c_addr */
-       0x0076bb00,
+       0xf51b11f4,
+       0xf009bd21,
+       0x21f50037,
+       0xe7f10961,
+       0x21f41388,
+       0x013cf07e,
+/* 0x0b0f: i2c_bitr_done */
+       0xf80131f4,
+/* 0x0b11: i2c_get_byte */
+       0x0057f000,
+/* 0x0b17: i2c_get_byte_next */
+       0xb60847f0,
+       0x76bb0154,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb60aca21,
+       0x11f40464,
+       0x0553fd2b,
+       0xf40142b6,
+       0x37f0d81b,
+       0x0076bb01,
        0xf90465b6,
        0x04659450,
        0xbd0256bb,
        0x0475fd50,
        0x21f550fc,
-       0x64b608d9,
-       0x2911f404,
-       0x012ec3e7,
-       0xfd0134b6,
-       0x76bb0553,
+       0x64b60a89,
+/* 0x0b61: i2c_get_byte_done */
+/* 0x0b63: i2c_put_byte */
+       0xf000f804,
+/* 0x0b66: i2c_put_byte_next */
+       0x42b60847,
+       0x3854ff01,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x8921f550,
+       0x0464b60a,
+       0xb03411f4,
+       0x1bf40046,
+       0x0076bbd8,
+       0xf90465b6,
+       0x04659450,
+       0xbd0256bb,
+       0x0475fd50,
+       0x21f550fc,
+       0x64b60aca,
+       0x0f11f404,
+       0xb00076bb,
+       0x1bf40136,
+       0x0132f406,
+/* 0x0bbc: i2c_put_byte_done */
+/* 0x0bbe: i2c_addr */
+       0x76bb00f8,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0xf550fc04,
-       0xb60a4221,
-/* 0x0ae2: i2c_addr_done */
-       0x00f80464,
-/* 0x0ae4: i2c_acquire_addr */
-       0xb6f8cec7,
-       0xe0b702e4,
-       0xee980d1c,
-/* 0x0af3: i2c_acquire */
-       0xf500f800,
-       0xf40ae421,
-       0xd9f00421,
-       0x4021f403,
-/* 0x0b02: i2c_release */
-       0x21f500f8,
-       0x21f40ae4,
-       0x03daf004,
-       0xf84021f4,
-/* 0x0b11: i2c_recv */
-       0x0132f400,
-       0xb6f8c1c7,
-       0x16b00214,
-       0x3a1ff528,
-       0xf413a001,
-       0x0032980c,
-       0x0ccc13a0,
-       0xf4003198,
-       0xd0f90231,
-       0xd0f9e0f9,
-       0x000067f1,
-       0x100063f1,
-       0xbb016792,
+       0xb609fa21,
+       0x11f40464,
+       0x2ec3e729,
+       0x0134b601,
+       0xbb0553fd,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x0af321f5,
-       0xfc0464b6,
-       0x00d6b0d0,
-       0x00b31bf5,
-       0xbb0057f0,
+       0x0b6321f5,
+/* 0x0c03: i2c_addr_done */
+       0xf80464b6,
+/* 0x0c05: i2c_acquire_addr */
+       0xf8cec700,
+       0xb702e4b6,
+       0x980d24e0,
+       0x00f800ee,
+/* 0x0c14: i2c_acquire */
+       0x0c0521f5,
+       0xf00421f4,
+       0x21f403d9,
+/* 0x0c23: i2c_release */
+       0xf500f840,
+       0xf40c0521,
+       0xdaf00421,
+       0x4021f403,
+/* 0x0c32: i2c_recv */
+       0x32f400f8,
+       0xf8c1c701,
+       0xb00214b6,
+       0x1ff52816,
+       0x13a0013a,
+       0x32980cfc,
+       0xd413a000,
+       0x0031980c,
+       0xf90231f4,
+       0xf9e0f9d0,
+       0x0067f1d0,
+       0x0063f100,
+       0x01679210,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x1421f550,
+       0x0464b60c,
+       0xd6b0d0fc,
+       0xb31bf500,
+       0x0057f000,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0xbe21f550,
+       0x0464b60b,
+       0x00d011f5,
+       0xbbe0c5c7,
        0x65b60076,
        0x9450f904,
        0x56bb0465,
        0xfd50bd02,
        0x50fc0475,
-       0x0a9d21f5,
+       0x0b6321f5,
        0xf50464b6,
-       0xc700d011,
-       0x76bbe0c5,
+       0xf000ad11,
+       0x76bb0157,
        0x0465b600,
        0x659450f9,
        0x0256bb04,
        0x75fd50bd,
        0xf550fc04,
-       0xb60a4221,
+       0xb60bbe21,
        0x11f50464,
-       0x57f000ad,
-       0x0076bb01,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b60a9d,
-       0x8a11f504,
-       0x0076bb00,
-       0xf90465b6,
-       0x04659450,
-       0xbd0256bb,
-       0x0475fd50,
-       0x21f550fc,
-       0x64b609f0,
-       0x6a11f404,
-       0xbbe05bcb,
-       0x65b60076,
-       0x9450f904,
-       0x56bb0465,
-       0xfd50bd02,
-       0x50fc0475,
-       0x093521f5,
-       0xb90464b6,
-       0x74bd025b,
-/* 0x0c17: i2c_recv_not_rd08 */
-       0xb0430ef4,
-       0x1bf401d6,
-       0x0057f03d,
-       0x0a9d21f5,
-       0xc73311f4,
-       0x21f5e0c5,
-       0x11f40a42,
-       0x0057f029,
-       0x0a9d21f5,
-       0xc71f11f4,
-       0x21f5e0b5,
-       0x11f40a42,
-       0x3521f515,
-       0xc774bd09,
-       0x1bf408c5,
-       0x0232f409,
-/* 0x0c57: i2c_recv_not_wr08 */
-/* 0x0c57: i2c_recv_done */
-       0xc7030ef4,
-       0x21f5f8ce,
-       0xe0fc0b02,
-       0x12f4d0fc,
-       0x027cb90a,
-       0x033621f5,
-/* 0x0c6c: i2c_recv_exit */
-/* 0x0c6e: i2c_init */
+       0x76bb008a,
+       0x0465b600,
+       0x659450f9,
+       0x0256bb04,
+       0x75fd50bd,
+       0xf550fc04,
+       0xb60b1121,
+       0x11f40464,
+       0xe05bcb6a,
+       0xb60076bb,
+       0x50f90465,
+       0xbb046594,
+       0x50bd0256,
+       0xfc0475fd,
+       0x5621f550,
+       0x0464b60a,
+       0xbd025bb9,
+       0x430ef474,
+/* 0x0d38: i2c_recv_not_rd08 */
+       0xf401d6b0,
+       0x57f03d1b,
+       0xbe21f500,
+       0x3311f40b,
+       0xf5e0c5c7,
+       0xf40b6321,
+       0x57f02911,
+       0xbe21f500,
+       0x1f11f40b,
+       0xf5e0b5c7,
+       0xf40b6321,
+       0x21f51511,
+       0x74bd0a56,
+       0xf408c5c7,
+       0x32f4091b,
+       0x030ef402,
+/* 0x0d78: i2c_recv_not_wr08 */
+/* 0x0d78: i2c_recv_done */
+       0xf5f8cec7,
+       0xfc0c2321,
+       0xf4d0fce0,
+       0x7cb90a12,
+       0x3621f502,
+/* 0x0d8d: i2c_recv_exit */
+/* 0x0d8f: i2c_init */
+       0xf800f803,
+/* 0x0d91: test_recv */
+       0xd817f100,
+       0x0614b605,
+       0xb60011cf,
+       0x07f10110,
+       0x04b605d8,
+       0x0001d006,
+       0xe7f104bd,
+       0xe3f1d900,
+       0x21f5134f,
+       0x00f80256,
+/* 0x0db8: test_init */
+       0x0800e7f1,
+       0x025621f5,
+/* 0x0dc2: idle_recv */
        0x00f800f8,
-/* 0x0c70: test_recv */
-       0x05d817f1,
-       0xcf0614b6,
-       0x10b60011,
-       0xd807f101,
-       0x0604b605,
-       0xbd0001d0,
-       0x00e7f104,
-       0x4fe3f1d9,
-       0x5621f513,
-/* 0x0c97: test_init */
-       0xf100f802,
-       0xf50800e7,
-       0xf8025621,
-/* 0x0ca1: idle_recv */
-/* 0x0ca3: idle */
-       0xf400f800,
-       0x17f10031,
-       0x14b605d4,
-       0x0011cf06,
-       0xf10110b6,
-       0xb605d407,
-       0x01d00604,
-/* 0x0cbf: idle_loop */
-       0xf004bd00,
-       0x32f45817,
-/* 0x0cc5: idle_proc */
-/* 0x0cc5: idle_proc_exec */
-       0xb910f902,
-       0x21f5021e,
-       0x10fc033f,
-       0xf40911f4,
-       0x0ef40231,
-/* 0x0cd9: idle_proc_next */
-       0x5810b6ef,
-       0xf4061fb8,
-       0x02f4e61b,
-       0x0028f4dd,
-       0x00bb0ef4,
+/* 0x0dc4: idle */
+       0xf10031f4,
+       0xb605d417,
+       0x11cf0614,
+       0x0110b600,
+       0x05d407f1,
+       0xd00604b6,
+       0x04bd0001,
+/* 0x0de0: idle_loop */
+       0xf45817f0,
+/* 0x0de6: idle_proc */
+/* 0x0de6: idle_proc_exec */
+       0x10f90232,
+       0xf5021eb9,
+       0xfc033f21,
+       0x0911f410,
+       0xf40231f4,
+/* 0x0dfa: idle_proc_next */
+       0x10b6ef0e,
+       0x061fb858,
+       0xf4e61bf4,
+       0x28f4dd02,
+       0xbb0ef400,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       0x00000000,
+       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/perf.fuc 
b/drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc
index 38eadf70..4d28b41c 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
+// parameters
+perf_polling_period_us: .b32 100000
+perf_slot1: .b8 0
+perf_slot2: .b8 0
+perf_slot3: .b8 0
+#if NVKM_PPWR_CHIPSET >= GF100
+perf_slot4: .b8 0
+perf_slot5: .b8 0
+perf_slot6: .b8 0
+perf_slot7: .b8 0
+#endif
+.align 4
 #endif
 
 /******************************************************************************
@@ -46,6 +58,92 @@ 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
+               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
+       push $r2
+       push $r3
+       push $r4
+#if NVKM_PPWR_CHIPSET >= GF100
+       push $r5
+       push $r6
+       push $r7
+       push $r8
+#endif
+
+       // read out all at once to reduce latency problems
+       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))
+       nv_iord($r6, NV_PPWR_COUNTER_COUNT(5))
+       nv_iord($r7, NV_PPWR_COUNTER_COUNT(6))
+       nv_iord($r8, NV_PPWR_COUNTER_COUNT(7))
+#endif
+
+       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)
+       nv_iowr(NV_PPWR_COUNTER_COUNT(5), $r14)
+       nv_iowr(NV_PPWR_COUNTER_COUNT(6), $r14)
+       nv_iowr(NV_PPWR_COUNTER_COUNT(7), $r14)
+#endif
+
+       // with that we always get 8 bit values
+       div $r1 $r1 0xff
+
+       div $r2 $r2 $r1
+       div $r3 $r3 $r1
+       div $r4 $r4 $r1
+#if NVKM_PPWR_CHIPSET >= GF100
+       div $r5 $r5 $r1
+       div $r6 $r6 $r1
+       div $r7 $r7 $r1
+       div $r8 $r8 $r1
+#endif
+
+       st(b8, #perf_slot1, $r2)
+       st(b8, #perf_slot2, $r3)
+       st(b8, #perf_slot3, $r4)
+#if NVKM_PPWR_CHIPSET >= GF100
+       st(b8, #perf_slot4, $r5)
+       st(b8, #perf_slot5, $r6)
+       st(b8, #perf_slot6, $r7)
+       st(b8, #perf_slot7, $r8)
+#endif
+
+#if NVKM_PPWR_CHIPSET >= GF100
+       pop $r8
+       pop $r7
+       pop $r6
+       pop $r5
+#endif
+       pop $r4
+       pop $r3
+       pop $r2
+       pop $r1
+
        ret
 
 // description
@@ -53,5 +151,27 @@ perf_recv:
 // $r15 - current (perf)
 // $r0  - zero
 perf_init:
+       imm32($r14, NV_PPWR_COUNTER_MODE_ALWAYS)
+       nv_iowr(NV_PPWR_COUNTER_MODE(0), $r14)
+
+       imm32($r14, NV_PPWR_COUNTER_MODE_IF_ANY)
+       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)
+       nv_iowr(NV_PPWR_COUNTER_MODE(5), $r14)
+       nv_iowr(NV_PPWR_COUNTER_MODE(6), $r14)
+       nv_iowr(NV_PPWR_COUNTER_MODE(7), $r14)
+#endif
+
+       // initial readout
+       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.13.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to