Skip to contentSkip to conversation

PMU engine counters

PATCH New Karol Herbst 1 participant 8 messages Jun 5, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

v3 cover PMU engine counters

I think I am done reworking the series and getting to a point where I think it is basically finished. The configuration of the slots could be improved later on when working on dynamic reclocking, but for now it's good enough to report the current GPU utilization to userspace.

Patches 1-4 imeplement PMU commands to setup and readout the counters. Patches 5-6 lets Nouveau make use of 1-4.
Patch 7 adds a debugfs file to readout basic GPU loads.

In a follow up one could write a nice NVIF based interface for readoung out those values to provide them through GALLIUM_HUD.

This feature is required to implement proper dynamic reclocking on GT215 and newer. On pre GT215 GPUs there is also PCOUNTERS, but this is ugly so that I only focus on dynamic reclocking starting with GT215 for now.

Karol Herbst (7):
pmu/fuc: add macros for pmu engine counters
pmu/fuc: read out counters and store them
pmu/fuc: implement GET_SLOTS
pmu/fuc: implement SET_SLOT
pmu: add counter_slots field
pmu: setup counters
nouveau/debugfs: add interface for current load

 drm/nouveau/include/nvif/device.h            |   1 +
 drm/nouveau/include/nvkm/subdev/pmu.h        |  17 +
 drm/nouveau/nouveau_debugfs.c                |  27 +
 drm/nouveau/nvkm/subdev/pmu/base.c           |   8 +
 drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 838 ++++++++++++++++-----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 780 +++++++++++++++----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 732 +++++++++++++----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 736 +++++++++++++----------
 drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc   |   8 +
 drm/nouveau/nvkm/subdev/pmu/fuc/os.h         |  16 +
 drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc     | 156 +++++
 drm/nouveau/nvkm/subdev/pmu/gf100.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gf119.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gk104.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gk110.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gk208.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gm107.c          |   2 +
 drm/nouveau/nvkm/subdev/pmu/gt215.c          |  62 ++
 drm/nouveau/nvkm/subdev/pmu/priv.h           |   5 +
 19 files changed, 2137 insertions(+), 1261 deletions(-)
Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 20170605203544.4047-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH v3 1/7 pmu/fuc: add macros for pmu engine counters

v2: removed definitions we won't need anymore
v3: rename IF_NOT_ALL to IF_ANY

---
 drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 8 ++++++++
 1 file changed, 8 insertions(+)
drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc +8 -0
index 3737bd27..d14f2771 100644
@@ -65,6 +65,14 @@
 #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_ANY                                           2
+#define NV_PPWR_COUNTER_MODE_ALWAYS                                           3
 #if NVKM_PPWR_CHIPSET < GK208
 #define NV_PPWR_DSCRATCH(i)                                   (4 * (i) + 0x05d0)
 #endif
Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
#3 lore raw

PATCH v3 2/7 pmu/fuc: read out counters and store them

In reply to a message not in the archive

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.

---
 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(-)
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h +448 -373
index 0bcf0b30..9ed8e313 100644
@@ -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,
 };
drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h +419 -344

867 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h +393 -318

811 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h +446 -311

394 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc +120 -0

120 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

Part of the diff is not shown here. View the raw message.

#4 lore raw

PATCH v3 3/7 pmu/fuc: implement GET_SLOTS

In reply to a message not in the archive

Reads out all stored 8 bit slot values. The 0th one being always 0xff.

v3: Add macros documenting the command.

---
 drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 894 ++++++++++++++-------------
 drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 840 +++++++++++++------------
 drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 776 ++++++++++++-----------
 drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 770 +++++++++++------------
 drm/nouveau/nvkm/subdev/pmu/fuc/os.h         |  12 +
 drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc     |  29 +-
 6 files changed, 1780 insertions(+), 1541 deletions(-)
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h +480 -414
index 9ed8e313..2cbdcdff 100644
@@ -68,7 +68,7 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x46524550,
-	0x000008c9,
+	0x0000094b,
 	0x00000758,
 	0x00000000,
 	0x00000000,
@@ -90,8 +90,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x5f433249,
-	0x00000d7f,
-	0x00000c22,
+	0x00000e01,
+	0x00000ca4,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -112,8 +112,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x54534554,
-	0x00000da8,
-	0x00000d81,
+	0x00000e2a,
+	0x00000e03,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -134,8 +134,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x454c4449,
-	0x00000db4,
-	0x00000db2,
+	0x00000e36,
+	0x00000e34,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -1462,477 +1462,543 @@ uint32_t gf100_pmu_code[] = {
 /* 0x0758: perf_recv */
 	0x4f48a7f1,
 	0x5453a3f1,
-	0xf406eab8,
-	0x0ef4061b,
-/* 0x0769: perf_recv_not_host */
-	0x8321f51b,
-	0xcc07f107,
+	0xf506eab8,
+	0xf100811b,
+	0xf00001a7,
+	0xdab800a3,
+	0x070bf406,
+	0x008b0ef5,
+/* 0x0778: perf_recv_get_slots */
+	0x0cd207f1,
+	0x180003f0,
+	0x04bd000c,
+	0xf108c4b6,
+	0xf00cd107,
+	0x0c180003,
+	0xb604bd00,
+	0x07f108c4,
+	0x03f00cd0,
+	0x000c1800,
+	0xc4b604bd,
+	0xffc5f008,
+	0x0cd607f1,
+	0x180003f0,
+	0x04bd000b,
+	0xf108b4b6,
+	0xf00cd507,
+	0x0b180003,
+	0xb604bd00,
+	0x07f108b4,
+	0x03f00cd4,
+	0x000b1800,
+	0xb4b604bd,
+	0xd307f108,
+	0x0003f00c,
+	0xbd000b18,
+	0x1e0ef404,
+/* 0x07e4: perf_recv_not_host */
+	0x080521f5,
+	0x0ccc07f1,
+	0x980003f0,
+	0x04bd000e,
+	0x022a21f5,
+	0x025621f5,
+/* 0x07ff: perf_recv_host */
+	0xf5070ef4,
+/* 0x0803: perf_recv_exit */
+	0xf8033621,
+/* 0x0805: perf_counter_readout */
+	0xf910f900,
+	0xf930f920,
+	0xf950f940,
+	0xf970f960,
+	0x0817f180,
+	0x0614b605,
+	0xf10011cf,
+	0xb6051827,
+	0x22cf0624,
+	0x2837f100,
+	0x0634b605,
+	0xf10033cf,
+	0xb6053847,
+	0x44cf0644,
+	0x4857f100,
+	0x0654b605,
+	0xf10055cf,
+	0xb6055867,
+	0x66cf0664,
+	0x6877f100,
+	0x0674b605,
+	0xf10077cf,
+	0xb6057887,
+	0x88cf0684,
+	0x00e7f100,
+	0x00e3f100,
+	0x0807f180,
+	0x0604b605,
+	0xbd000ed0,
+	0x1807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x2807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x3807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x4807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x5807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x6807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x7807f104,
+	0x0604b605,
+	0xbd000ed0,
+	0xff11cc04,
+	0xff2c21ff,
+	0x41ff3c31,
+	0x5c51ff4c,
+	0xff6c61ff,
+	0x81ff7c71,
+	0xd007f18c,
+	0x0003f00c,
+	0xbd000200,
+	0xd107f104,
+	0x0003f00c,
+	0xbd000300,
+	0xd207f104,
+	0x0003f00c,
+	0xbd000400,
+	0xd307f104,
+	0x0003f00c,
+	0xbd000500,
+	0xd407f104,
+	0x0003f00c,
+	0xbd000600,
+	0xd507f104,
+	0x0003f00c,
+	0xbd000700,
+	0xd607f104,
+	0x0003f00c,
+	0xbd000800,
+	0xfc80fc04,
+	0xfc60fc70,
+	0xfc40fc50,
+	0xfc20fc30,
+/* 0x094b: perf_init */
+	0xf100f810,
+	0xf00003e7,
+	0x07f100e3,
+	0x04b6050c,
+	0x000ed006,
+	0xe7f104bd,
+	0xe3f00002,
+	0x1c07f100,
+	0x0604b605,
+	0xbd000ed0,
+	0x2c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x3c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x4c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x5c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x6c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x7c07f104,
+	0x0604b605,
+	0xbd000ed0,
+	0x0521f504,
+	0xcc07f108,
 	0x0003f00c,
 	0xbd000e98,
 	0x2a21f504,
 	0x5621f502,
-/* 0x0781: perf_recv_exit */
-/* 0x0783: perf_counter_readout */
-	0xf900f802,
-	0xf920f910,
-	0xf940f930,
-	0xf960f950,
-	0xf180f970,
-	0xb6050817,
-	0x11cf0614,
-	0x1827f100,
-	0x0624b605,
-	0xf10022cf,
-	0xb6052837,
-	0x33cf0634,
-	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,
+/* 0x09d3: i2c_drive_scl */
+	0xb000f802,
 	0x0bf40036,
 	0xe007f111,
 	0x0604b607,
-	0xbd0002d0,
-/* 0x0987: i2c_drive_sda_lo */
+	0xbd0001d0,
+/* 0x09e7: i2c_drive_scl_lo */
 	0xf100f804,
 	0xb607e407,
+	0x01d00604,
+	0xf804bd00,
+/* 0x09f5: i2c_drive_sda */
+	0x0036b000,
+	0xf1110bf4,
+	0xb607e007,
 	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,
-	0x37f00951,
-	0x7321f501,
-	0x0076bb09,
-	0xf90465b6,
-	0x04659450,
-	0xbd0256bb,
-	0x0475fd50,
-	0x21f550fc,
-	0x64b609c5,
-	0x1f11f404,
-/* 0x0a28: i2c_start_send */
-	0xf50037f0,
-	0xf1097321,
-	0xf41388e7,
-	0x37f07e21,
-	0x5121f500,
+/* 0x0a09: i2c_drive_sda_lo */
+	0xe407f100,
+	0x0604b607,
+	0xbd0002d0,
+/* 0x0a17: i2c_sense_scl */
+	0xf400f804,
+	0x37f10132,
+	0x34b607c4,
+	0x0033cf06,
+	0xf40431fd,
+	0x31f4060b,
+/* 0x0a2d: i2c_sense_scl_done */
+/* 0x0a2f: i2c_sense_sda */
+	0xf400f801,
+	0x37f10132,
+	0x34b607c4,
+	0x0033cf06,
+	0xf40432fd,
+	0x31f4060b,
+/* 0x0a45: i2c_sense_sda_done */
+/* 0x0a47: i2c_raise_scl */
+	0xf900f801,
+	0x9847f140,
+	0x0137f008,
+	0x09d321f5,
+/* 0x0a54: i2c_raise_scl_wait */
+	0x03e8e7f1,
+	0xf57e21f4,
+	0xf40a1721,
+	0x42b60901,
+	0xef1bf401,
+/* 0x0a68: i2c_raise_scl_done */
+	0x00f840fc,
+/* 0x0a6c: i2c_start */
+	0x0a1721f5,
+	0xf50d11f4,
+	0xf40a2f21,
+	0x0ef40611,
+/* 0x0a7d: i2c_start_rep */
+	0x0037f030,
+	0x09d321f5,
+	0xf50137f0,
+	0xbb09f521,
+	0x65b60076,
+	0x9450f904,
+	0x56bb0465,
+	0xfd50bd02,
+	0x50fc0475,
+	0x0a4721f5,
+	0xf40464b6,
+/* 0x0aaa: i2c_start_send */
+	0x37f01f11,
+	0xf521f500,
 	0x88e7f109,
 	0x7e21f413,
-/* 0x0a44: i2c_start_out */
-/* 0x0a46: i2c_stop */
-	0x37f000f8,
-	0x5121f500,
-	0x0037f009,
-	0x097321f5,
-	0x03e8e7f1,
+	0xf50037f0,
+	0xf109d321,
+	0xf41388e7,
+/* 0x0ac6: i2c_start_out */
+	0x00f87e21,
+/* 0x0ac8: i2c_stop */
+	0xf50037f0,
+	0xf009d321,
+	0x21f50037,
+	0xe7f109f5,
+	0x21f403e8,
+	0x0137f07e,
+	0x09d321f5,
+	0x1388e7f1,
 	0xf07e21f4,
 	0x21f50137,
-	0xe7f10951,
+	0xe7f109f5,
 	0x21f41388,
-	0x0137f07e,
-	0x097321f5,
-	0x1388e7f1,
-	0xf87e21f4,
-/* 0x0a79: i2c_bitw */
-	0x7321f500,
-	0xe8e7f109,
-	0x7e21f403,
-	0xb60076bb,
-	0x50f90465,
-	0xbb046594,
-	0x50bd0256,
-	0xfc0475fd,
-	0xc521f550,
-	0x0464b609,
-	0xf11811f4,
-	0xf41388e7,
-	0x37f07e21,
-	0x5121f500,
-	0x88e7f109,
+/* 0x0afb: i2c_bitw */
+	0xf500f87e,
+	0xf109f521,
+	0xf403e8e7,
+	0x76bb7e21,
+	0x0465b600,
+	0x659450f9,
+	0x0256bb04,
+	0x75fd50bd,
+	0xf550fc04,
+	0xb60a4721,
+	0x11f40464,
+	0x88e7f118,
 	0x7e21f413,
-/* 0x0ab8: i2c_bitw_out */
-/* 0x0aba: i2c_bitr */
-	0x37f000f8,
-	0x7321f501,
-	0xe8e7f109,
-	0x7e21f403,
+	0xf50037f0,
+	0xf109d321,
+	0xf41388e7,
+/* 0x0b3a: i2c_bitw_out */
+	0x00f87e21,
+/* 0x0b3c: i2c_bitr */
+	0xf50137f0,
+	0xf109f521,
+	0xf403e8e7,
+	0x76bb7e21,
+	0x0465b600,
+	0x659450f9,
+	0x0256bb04,
+	0x75fd50bd,
+	0xf550fc04,
+	0xb60a4721,
+	0x11f40464,
+	0x2f21f51b,
+	0x0037f00a,
+	0x09d321f5,
+	0x1388e7f1,
+	0xf07e21f4,
+	0x31f4013c,
+/* 0x0b81: i2c_bitr_done */
+/* 0x0b83: i2c_get_byte */
+	0xf000f801,
+	0x47f00057,
+/* 0x0b89: i2c_get_byte_next */
+	0x0154b608,
 	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,
+	0x3c21f550,
+	0x0464b60b,
+	0xfd2b11f4,
+	0x42b60553,
+	0xd81bf401,
+	0xbb0137f0,
+	0x65b60076,
+	0x9450f904,
+	0x56bb0465,
+	0xfd50bd02,
+	0x50fc0475,
+	0x0afb21f5,
+/* 0x0bd3: i2c_get_byte_done */
+	0xf80464b6,
+/* 0x0bd5: i2c_put_byte */
+	0x0847f000,
+/* 0x0bd8: i2c_put_byte_next */
+	0xff0142b6,
+	0x76bb3854,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60aba21,
+	0xb60afb21,
 	0x11f40464,
-	0x0553fd2b,
-	0xf40142b6,
-	0x37f0d81b,
-	0x0076bb01,
-	0xf90465b6,
-	0x04659450,
-	0xbd0256bb,
-	0x0475fd50,
-	0x21f550fc,
-	0x64b60a79,
-/* 0x0b51: i2c_get_byte_done */
-/* 0x0b53: i2c_put_byte */
-	0xf000f804,
-/* 0x0b56: i2c_put_byte_next */
-	0x42b60847,
-	0x3854ff01,
+	0x0046b034,
+	0xbbd81bf4,
+	0x65b60076,
+	0x9450f904,
+	0x56bb0465,
+	0xfd50bd02,
+	0x50fc0475,
+	0x0b3c21f5,
+	0xf40464b6,
+	0x76bb0f11,
+	0x0136b000,
+	0xf4061bf4,
+/* 0x0c2e: i2c_put_byte_done */
+	0x00f80132,
+/* 0x0c30: i2c_addr */
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0x7921f550,
+	0x6c21f550,
 	0x0464b60a,
-	0xb03411f4,
-	0x1bf40046,
-	0x0076bbd8,
+	0xe72911f4,
+	0xb6012ec3,
+	0x53fd0134,
+	0x0076bb05,
 	0xf90465b6,
 	0x04659450,
 	0xbd0256bb,
 	0x0475fd50,
 	0x21f550fc,
-	0x64b60aba,
-	0x0f11f404,
-	0xb00076bb,
-	0x1bf40136,
-	0x0132f406,
-/* 0x0bac: i2c_put_byte_done */
-/* 0x0bae: i2c_addr */
-	0x76bb00f8,
+	0x64b60bd5,
+/* 0x0c75: i2c_addr_done */
+/* 0x0c77: i2c_acquire_addr */
+	0xc700f804,
+	0xe4b6f8ce,
+	0x28e0b702,
+	0x00ee980d,
+/* 0x0c86: i2c_acquire */
+	0x21f500f8,
+	0x21f40c77,
+	0x03d9f004,
+	0xf84021f4,
+/* 0x0c95: i2c_release */
+	0x7721f500,
+	0x0421f40c,
+	0xf403daf0,
+	0x00f84021,
+/* 0x0ca4: i2c_recv */
+	0xc70132f4,
+	0x14b6f8c1,
+	0x2816b002,
+	0x013a1ff5,
+	0x0d0013a0,
+	0xa0003298,
+	0x980cd813,
+	0x31f40031,
+	0xf9d0f902,
+	0xf1d0f9e0,
+	0xf1000067,
+	0x92100063,
+	0x76bb0167,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb609ea21,
-	0x11f40464,
-	0x2ec3e729,
-	0x0134b601,
-	0xbb0553fd,
-	0x65b60076,
-	0x9450f904,
-	0x56bb0465,
-	0xfd50bd02,
-	0x50fc0475,
-	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,
+	0xb60c8621,
+	0xd0fc0464,
+	0xf500d6b0,
+	0xf000b31b,
+	0x76bb0057,
+	0x0465b600,
+	0x659450f9,
+	0x0256bb04,
+	0x75fd50bd,
+	0xf550fc04,
+	0xb60c3021,
+	0x11f50464,
+	0xc5c700d0,
+	0x0076bbe0,
+	0xf90465b6,
+	0x04659450,
+	0xbd0256bb,
+	0x0475fd50,
+	0x21f550fc,
+	0x64b60bd5,
+	0xad11f504,
+	0x0157f000,
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0x0421f550,
+	0x3021f550,
 	0x0464b60c,
-	0xd6b0d0fc,
-	0xb31bf500,
-	0x0057f000,
+	0x008a11f5,
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0xae21f550,
+	0x8321f550,
 	0x0464b60b,
-	0x00d011f5,
-	0xbbe0c5c7,
-	0x65b60076,
-	0x9450f904,
-	0x56bb0465,
-	0xfd50bd02,
-	0x50fc0475,
-	0x0b5321f5,
-	0xf50464b6,
-	0xf000ad11,
-	0x76bb0157,
+	0xcb6a11f4,
+	0x76bbe05b,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60bae21,
-	0x11f50464,
-	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,
-/* 0x0db4: idle */
-	0xf10031f4,
-	0xb605d417,
+	0xb60ac821,
+	0x5bb90464,
+	0xf474bd02,
+/* 0x0daa: i2c_recv_not_rd08 */
+	0xd6b0430e,
+	0x3d1bf401,
+	0xf50057f0,
+	0xf40c3021,
+	0xc5c73311,
+	0xd521f5e0,
+	0x2911f40b,
+	0xf50057f0,
+	0xf40c3021,
+	0xb5c71f11,
+	0xd521f5e0,
+	0x1511f40b,
+	0x0ac821f5,
+	0xc5c774bd,
+	0x091bf408,
+	0xf40232f4,
+/* 0x0dea: i2c_recv_not_wr08 */
+/* 0x0dea: i2c_recv_done */
+	0xcec7030e,
+	0x9521f5f8,
+	0xfce0fc0c,
+	0x0a12f4d0,
+	0xf5027cb9,
+/* 0x0dff: i2c_recv_exit */
+	0xf8033621,
+/* 0x0e01: i2c_init */
+/* 0x0e03: test_recv */
+	0xf100f800,
+	0xb605d817,
 	0x11cf0614,
 	0x0110b600,
-	0x05d407f1,
+	0x05d807f1,
 	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,
+	0xd900e7f1,
+	0x134fe3f1,
+	0x025621f5,
+/* 0x0e2a: test_init */
+	0xe7f100f8,
+	0x21f50800,
+	0x00f80256,
+/* 0x0e34: idle_recv */
+/* 0x0e36: idle */
+	0x31f400f8,
+	0xd417f100,
+	0x0614b605,
+	0xb60011cf,
+	0x07f10110,
+	0x04b605d4,
+	0x0001d006,
+/* 0x0e52: idle_loop */
+	0x17f004bd,
+	0x0232f458,
+/* 0x0e58: idle_proc */
+/* 0x0e58: idle_proc_exec */
+	0x1eb910f9,
+	0x3f21f502,
+	0xf410fc03,
+	0x31f40911,
+	0xef0ef402,
+/* 0x0e6c: 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,
 };
drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h +453 -387

935 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h +421 -355

873 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h +386 -384

204 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/os.h +12 -0
index c8b06cb7..153d3e77 100644

Lines of this file are not shown. View the raw message.

drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc +28 -1
index 4d28b41c..01fc51bd 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH v3 4/7 pmu/fuc: implement SET_SLOT

In reply to a message not in the archive

Interface to set the PMU counter mask of a specific slot.

v3: Add macros documenting the command.

---
 drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 889 ++++++++++++++-------------
 drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 825 ++++++++++++-------------
 drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 245 ++++----
 drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 763 +++++++++++------------
 drm/nouveau/nvkm/subdev/pmu/fuc/os.h         |   4 +
 drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc     |   9 +
 6 files changed, 1376 insertions(+), 1359 deletions(-)
drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h +445 -444
index 2cbdcdff..0838d503 100644
@@ -68,7 +68,7 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x46524550,
-	0x0000094b,
+	0x00000965,
 	0x00000758,
 	0x00000000,
 	0x00000000,
@@ -90,8 +90,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x5f433249,
-	0x00000e01,
-	0x00000ca4,
+	0x00000e1b,
+	0x00000cbe,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -112,8 +112,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x54534554,
-	0x00000e2a,
-	0x00000e03,
+	0x00000e44,
+	0x00000e1d,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -134,8 +134,8 @@ uint32_t gf100_pmu_data[] = {
 	0x00000000,
 	0x00000000,
 	0x454c4449,
-	0x00000e36,
-	0x00000e34,
+	0x00000e50,
+	0x00000e4e,
 	0x00000000,
 	0x00000000,
 	0x00000000,
@@ -1463,518 +1463,519 @@ uint32_t gf100_pmu_code[] = {
 	0x4f48a7f1,
 	0x5453a3f1,
 	0xf506eab8,
-	0xf100811b,
+	0xf1009b1b,
 	0xf00001a7,
 	0xdab800a3,
-	0x070bf406,
-	0x008b0ef5,
-/* 0x0778: perf_recv_get_slots */
-	0x0cd207f1,
+	0x140bf406,
+	0x0002a7f1,
+	0xb800a3f0,
+	0x0bf406da,
+	0x980ef573,
+/* 0x0785: perf_recv_get_slots */
+	0xd207f100,
+	0x0003f00c,
+	0xbd000c18,
+	0x08c4b604,
+	0x0cd107f1,
 	0x180003f0,
 	0x04bd000c,
 	0xf108c4b6,
-	0xf00cd107,
+	0xf00cd007,
 	0x0c180003,
 	0xb604bd00,
-	0x07f108c4,
-	0x03f00cd0,
-	0x000c1800,
-	0xc4b604bd,
-	0xffc5f008,
-	0x0cd607f1,
+	0xc5f008c4,
+	0xd607f1ff,
+	0x0003f00c,
+	0xbd000b18,
+	0x08b4b604,
+	0x0cd507f1,
 	0x180003f0,
 	0x04bd000b,
 	0xf108b4b6,
-	0xf00cd507,
+	0xf00cd407,
 	0x0b180003,
 	0xb604bd00,
 	0x07f108b4,
-	0x03f00cd4,
+	0x03f00cd3,
 	0x000b1800,
-	0xb4b604bd,
-	0xd307f108,
-	0x0003f00c,
-	0xbd000b18,
-	0x1e0ef404,
-/* 0x07e4: perf_recv_not_host */
-	0x080521f5,
-	0x0ccc07f1,
-	0x980003f0,
+	0x0ef404bd,
+/* 0x07f1: perf_recv_set_slot */
+	0x10c0f02b,
+	0x0504c0b7,
+	0xf400cbd0,
+/* 0x07fe: perf_recv_not_host */
+	0x21f5220e,
+	0x07f1081f,
+	0x03f00ccc,
+	0x000e9800,
+	0x21f504bd,
+	0x21f5022a,
+	0x0ef40256,
+/* 0x0819: perf_recv_host */
+	0x3621f507,
+/* 0x081d: perf_recv_exit */
+/* 0x081f: perf_counter_readout */
+	0xf900f803,
+	0xf920f910,
+	0xf940f930,
+	0xf960f950,
+	0xf180f970,
+	0xb6050817,
+	0x11cf0614,
+	0x1827f100,
+	0x0624b605,
+	0xf10022cf,
+	0xb6052837,
+	0x33cf0634,
+	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,
+/* 0x0965: perf_init */
+	0x03e7f100,
+	0x00e3f000,
+	0x050c07f1,
+	0xd00604b6,
 	0x04bd000e,
-	0x022a21f5,
-	0x025621f5,
-/* 0x07ff: perf_recv_host */
-	0xf5070ef4,
-/* 0x0803: perf_recv_exit */
-	0xf8033621,
-/* 0x0805: perf_counter_readout */
-	0xf910f900,
-	0xf930f920,
-	0xf950f940,
-	0xf970f960,
-	0x0817f180,
-	0x0614b605,
-	0xf10011cf,
-	0xb6051827,
-	0x22cf0624,
-	0x2837f100,
-	0x0634b605,
-	0xf10033cf,
-	0xb6053847,
-	0x44cf0644,
-	0x4857f100,
-	0x0654b605,
-	0xf10055cf,
-	0xb6055867,
-	0x66cf0664,
-	0x6877f100,
-	0x0674b605,
-	0xf10077cf,
-	0xb6057887,
-	0x88cf0684,
-	0x00e7f100,
-	0x00e3f100,
-	0x0807f180,
-	0x0604b605,
-	0xbd000ed0,
-	0x1807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x2807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x3807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x4807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x5807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x6807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x7807f104,
-	0x0604b605,
-	0xbd000ed0,
-	0xff11cc04,
-	0xff2c21ff,
-	0x41ff3c31,
-	0x5c51ff4c,
-	0xff6c61ff,
-	0x81ff7c71,
-	0xd007f18c,
-	0x0003f00c,
-	0xbd000200,
-	0xd107f104,
-	0x0003f00c,
-	0xbd000300,
-	0xd207f104,
-	0x0003f00c,
-	0xbd000400,
-	0xd307f104,
-	0x0003f00c,
-	0xbd000500,
-	0xd407f104,
-	0x0003f00c,
-	0xbd000600,
-	0xd507f104,
-	0x0003f00c,
-	0xbd000700,
-	0xd607f104,
-	0x0003f00c,
-	0xbd000800,
-	0xfc80fc04,
-	0xfc60fc70,
-	0xfc40fc50,
-	0xfc20fc30,
-/* 0x094b: perf_init */
-	0xf100f810,
-	0xf00003e7,
-	0x07f100e3,
-	0x04b6050c,
-	0x000ed006,
-	0xe7f104bd,
-	0xe3f00002,
-	0x1c07f100,
-	0x0604b605,
-	0xbd000ed0,
-	0x2c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x3c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x4c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x5c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x6c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x7c07f104,
-	0x0604b605,
-	0xbd000ed0,
-	0x0521f504,
-	0xcc07f108,
-	0x0003f00c,
-	0xbd000e98,
-	0x2a21f504,
-	0x5621f502,
-/* 0x09d3: i2c_drive_scl */
-	0xb000f802,
-	0x0bf40036,
-	0xe007f111,
-	0x0604b607,
-	0xbd0001d0,
-/* 0x09e7: i2c_drive_scl_lo */
-	0xf100f804,
-	0xb607e407,
-	0x01d00604,
-	0xf804bd00,
-/* 0x09f5: i2c_drive_sda */
+	0x0002e7f1,
+	0xf100e3f0,
+	0xb6051c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6052c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6053c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6054c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6055c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6056c07,
+	0x0ed00604,
+	0xf104bd00,
+	0xb6057c07,
+	0x0ed00604,
+	0xf504bd00,
+	0xf1081f21,
+	0xf00ccc07,
+	0x0e980003,
+	0xf504bd00,
+	0xf5022a21,
+	0xf8025621,
+/* 0x09ed: i2c_drive_scl */
 	0x0036b000,
 	0xf1110bf4,
 	0xb607e007,
-	0x02d00604,
+	0x01d00604,
 	0xf804bd00,
-/* 0x0a09: i2c_drive_sda_lo */
+/* 0x0a01: i2c_drive_scl_lo */
 	0xe407f100,
 	0x0604b607,
+	0xbd0001d0,
+/* 0x0a0f: i2c_drive_sda */
+	0xb000f804,
+	0x0bf40036,
+	0xe007f111,
+	0x0604b607,
 	0xbd0002d0,
-/* 0x0a17: i2c_sense_scl */
-	0xf400f804,
-	0x37f10132,
-	0x34b607c4,
-	0x0033cf06,
-	0xf40431fd,
-	0x31f4060b,
-/* 0x0a2d: i2c_sense_scl_done */
-/* 0x0a2f: i2c_sense_sda */
-	0xf400f801,
-	0x37f10132,
-	0x34b607c4,
-	0x0033cf06,
-	0xf40432fd,
-	0x31f4060b,
-/* 0x0a45: i2c_sense_sda_done */
-/* 0x0a47: i2c_raise_scl */
-	0xf900f801,
-	0x9847f140,
-	0x0137f008,
-	0x09d321f5,
-/* 0x0a54: i2c_raise_scl_wait */
-	0x03e8e7f1,
-	0xf57e21f4,
-	0xf40a1721,
-	0x42b60901,
-	0xef1bf401,
-/* 0x0a68: i2c_raise_scl_done */
-	0x00f840fc,
-/* 0x0a6c: i2c_start */
-	0x0a1721f5,
-	0xf50d11f4,
-	0xf40a2f21,
-	0x0ef40611,
-/* 0x0a7d: i2c_start_rep */
-	0x0037f030,
-	0x09d321f5,
-	0xf50137f0,
-	0xbb09f521,
-	0x65b60076,
-	0x9450f904,
-	0x56bb0465,
-	0xfd50bd02,
-	0x50fc0475,
-	0x0a4721f5,
-	0xf40464b6,
-/* 0x0aaa: i2c_start_send */
-	0x37f01f11,
-	0xf521f500,
-	0x88e7f109,
-	0x7e21f413,
+/* 0x0a23: i2c_drive_sda_lo */
+	0xf100f804,
+	0xb607e407,
+	0x02d00604,
+	0xf804bd00,
+/* 0x0a31: i2c_sense_scl */
+	0x0132f400,
+	0x07c437f1,
+	0xcf0634b6,
+	0x31fd0033,
+	0x060bf404,
+/* 0x0a47: i2c_sense_scl_done */
+	0xf80131f4,
+/* 0x0a49: i2c_sense_sda */
+	0x0132f400,
+	0x07c437f1,
+	0xcf0634b6,
+	0x32fd0033,
+	0x060bf404,
+/* 0x0a5f: i2c_sense_sda_done */
+	0xf80131f4,
+/* 0x0a61: i2c_raise_scl */
+	0xf140f900,
+	0xf0089847,
+	0x21f50137,
+/* 0x0a6e: i2c_raise_scl_wait */
+	0xe7f109ed,
+	0x21f403e8,
+	0x3121f57e,
+	0x0901f40a,
+	0xf40142b6,
+/* 0x0a82: i2c_raise_scl_done */
+	0x40fcef1b,
+/* 0x0a86: i2c_start */
+	0x21f500f8,
+	0x11f40a31,
+	0x4921f50d,
+	0x0611f40a,
+/* 0x0a97: i2c_start_rep */
+	0xf0300ef4,
+	0x21f50037,
+	0x37f009ed,
+	0x0f21f501,
+	0x0076bb0a,
+	0xf90465b6,
+	0x04659450,
+	0xbd0256bb,
+	0x0475fd50,
+	0x21f550fc,
+	0x64b60a61,
+	0x1f11f404,
+/* 0x0ac4: i2c_start_send */
 	0xf50037f0,
-	0xf109d321,
+	0xf10a0f21,
 	0xf41388e7,
-/* 0x0ac6: i2c_start_out */
-	0x00f87e21,
-/* 0x0ac8: i2c_stop */
-	0xf50037f0,
-	0xf009d321,
-	0x21f50037,
-	0xe7f109f5,
-	0x21f403e8,
-	0x0137f07e,
-	0x09d321f5,
-	0x1388e7f1,
+	0x37f07e21,
+	0xed21f500,
+	0x88e7f109,
+	0x7e21f413,
+/* 0x0ae0: i2c_start_out */
+/* 0x0ae2: i2c_stop */
+	0x37f000f8,
+	0xed21f500,
+	0x0037f009,
+	0x0a0f21f5,
+	0x03e8e7f1,
 	0xf07e21f4,
 	0x21f50137,
-	0xe7f109f5,
+	0xe7f109ed,
 	0x21f41388,
-/* 0x0afb: i2c_bitw */
-	0xf500f87e,
-	0xf109f521,
-	0xf403e8e7,
-	0x76bb7e21,
-	0x0465b600,
-	0x659450f9,
-	0x0256bb04,
-	0x75fd50bd,
-	0xf550fc04,
-	0xb60a4721,
-	0x11f40464,
-	0x88e7f118,
-	0x7e21f413,
-	0xf50037f0,
-	0xf109d321,
+	0x0137f07e,
+	0x0a0f21f5,
+	0x1388e7f1,
+	0xf87e21f4,
+/* 0x0b15: i2c_bitw */
+	0x0f21f500,
+	0xe8e7f10a,
+	0x7e21f403,
+	0xb60076bb,
+	0x50f90465,
+	0xbb046594,
+	0x50bd0256,
+	0xfc0475fd,
+	0x6121f550,
+	0x0464b60a,
+	0xf11811f4,
 	0xf41388e7,
-/* 0x0b3a: i2c_bitw_out */
-	0x00f87e21,
-/* 0x0b3c: i2c_bitr */
-	0xf50137f0,
-	0xf109f521,
-	0xf403e8e7,
-	0x76bb7e21,
+	0x37f07e21,
+	0xed21f500,
+	0x88e7f109,
+	0x7e21f413,
+/* 0x0b54: i2c_bitw_out */
+/* 0x0b56: i2c_bitr */
+	0x37f000f8,
+	0x0f21f501,
+	0xe8e7f10a,
+	0x7e21f403,
+	0xb60076bb,
+	0x50f90465,
+	0xbb046594,
+	0x50bd0256,
+	0xfc0475fd,
+	0x6121f550,
+	0x0464b60a,
+	0xf51b11f4,
+	0xf00a4921,
+	0x21f50037,
+	0xe7f109ed,
+	0x21f41388,
+	0x013cf07e,
+/* 0x0b9b: i2c_bitr_done */
+	0xf80131f4,
+/* 0x0b9d: i2c_get_byte */
+	0x0057f000,
+/* 0x0ba3: i2c_get_byte_next */
+	0xb60847f0,
+	0x76bb0154,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60a4721,
+	0xb60b5621,
 	0x11f40464,
-	0x2f21f51b,
-	0x0037f00a,
-	0x09d321f5,
-	0x1388e7f1,
-	0xf07e21f4,
-	0x31f4013c,
-/* 0x0b81: i2c_bitr_done */
-/* 0x0b83: i2c_get_byte */
-	0xf000f801,
-	0x47f00057,
-/* 0x0b89: i2c_get_byte_next */
-	0x0154b608,
+	0x0553fd2b,
+	0xf40142b6,
+	0x37f0d81b,
+	0x0076bb01,
+	0xf90465b6,
+	0x04659450,
+	0xbd0256bb,
+	0x0475fd50,
+	0x21f550fc,
+	0x64b60b15,
+/* 0x0bed: i2c_get_byte_done */
+/* 0x0bef: i2c_put_byte */
+	0xf000f804,
+/* 0x0bf2: i2c_put_byte_next */
+	0x42b60847,
+	0x3854ff01,
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0x3c21f550,
+	0x1521f550,
 	0x0464b60b,
-	0xfd2b11f4,
-	0x42b60553,
-	0xd81bf401,
-	0xbb0137f0,
-	0x65b60076,
-	0x9450f904,
-	0x56bb0465,
-	0xfd50bd02,
-	0x50fc0475,
-	0x0afb21f5,
-/* 0x0bd3: i2c_get_byte_done */
-	0xf80464b6,
-/* 0x0bd5: i2c_put_byte */
-	0x0847f000,
-/* 0x0bd8: i2c_put_byte_next */
-	0xff0142b6,
-	0x76bb3854,
+	0xb03411f4,
+	0x1bf40046,
+	0x0076bbd8,
+	0xf90465b6,
+	0x04659450,
+	0xbd0256bb,
+	0x0475fd50,
+	0x21f550fc,
+	0x64b60b56,
+	0x0f11f404,
+	0xb00076bb,
+	0x1bf40136,
+	0x0132f406,
+/* 0x0c48: i2c_put_byte_done */
+/* 0x0c4a: i2c_addr */
+	0x76bb00f8,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60afb21,
+	0xb60a8621,
 	0x11f40464,
-	0x0046b034,
-	0xbbd81bf4,
+	0x2ec3e729,
+	0x0134b601,
+	0xbb0553fd,
 	0x65b60076,
 	0x9450f904,
 	0x56bb0465,
 	0xfd50bd02,
 	0x50fc0475,
-	0x0b3c21f5,
-	0xf40464b6,
-	0x76bb0f11,
-	0x0136b000,
-	0xf4061bf4,
-/* 0x0c2e: i2c_put_byte_done */
-	0x00f80132,
-/* 0x0c30: i2c_addr */
+	0x0bef21f5,
+/* 0x0c8f: i2c_addr_done */
+	0xf80464b6,
+/* 0x0c91: i2c_acquire_addr */
+	0xf8cec700,
+	0xb702e4b6,
+	0x980d28e0,
+	0x00f800ee,
+/* 0x0ca0: i2c_acquire */
+	0x0c9121f5,
+	0xf00421f4,
+	0x21f403d9,
+/* 0x0caf: i2c_release */
+	0xf500f840,
+	0xf40c9121,
+	0xdaf00421,
+	0x4021f403,
+/* 0x0cbe: i2c_recv */
+	0x32f400f8,
+	0xf8c1c701,
+	0xb00214b6,
+	0x1ff52816,
+	0x13a0013a,
+	0x32980d00,
+	0xd813a000,
+	0x0031980c,
+	0xf90231f4,
+	0xf9e0f9d0,
+	0x0067f1d0,
+	0x0063f100,
+	0x01679210,
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0x6c21f550,
-	0x0464b60a,
-	0xe72911f4,
-	0xb6012ec3,
-	0x53fd0134,
-	0x0076bb05,
-	0xf90465b6,
-	0x04659450,
-	0xbd0256bb,
-	0x0475fd50,
-	0x21f550fc,
-	0x64b60bd5,
-/* 0x0c75: i2c_addr_done */
-/* 0x0c77: i2c_acquire_addr */
-	0xc700f804,
-	0xe4b6f8ce,
-	0x28e0b702,
-	0x00ee980d,
-/* 0x0c86: i2c_acquire */
-	0x21f500f8,
-	0x21f40c77,
-	0x03d9f004,
-	0xf84021f4,
-/* 0x0c95: i2c_release */
-	0x7721f500,
-	0x0421f40c,
-	0xf403daf0,
-	0x00f84021,
-/* 0x0ca4: i2c_recv */
-	0xc70132f4,
-	0x14b6f8c1,
-	0x2816b002,
-	0x013a1ff5,
-	0x0d0013a0,
-	0xa0003298,
-	0x980cd813,
-	0x31f40031,
-	0xf9d0f902,
-	0xf1d0f9e0,
-	0xf1000067,
-	0x92100063,
-	0x76bb0167,
+	0xa021f550,
+	0x0464b60c,
+	0xd6b0d0fc,
+	0xb31bf500,
+	0x0057f000,
+	0xb60076bb,
+	0x50f90465,
+	0xbb046594,
+	0x50bd0256,
+	0xfc0475fd,
+	0x4a21f550,
+	0x0464b60c,
+	0x00d011f5,
+	0xbbe0c5c7,
+	0x65b60076,
+	0x9450f904,
+	0x56bb0465,
+	0xfd50bd02,
+	0x50fc0475,
+	0x0bef21f5,
+	0xf50464b6,
+	0xf000ad11,
+	0x76bb0157,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60c8621,
-	0xd0fc0464,
-	0xf500d6b0,
-	0xf000b31b,
-	0x76bb0057,
+	0xb60c4a21,
+	0x11f50464,
+	0x76bb008a,
 	0x0465b600,
 	0x659450f9,
 	0x0256bb04,
 	0x75fd50bd,
 	0xf550fc04,
-	0xb60c3021,
-	0x11f50464,
-	0xc5c700d0,
-	0x0076bbe0,
-	0xf90465b6,
-	0x04659450,
-	0xbd0256bb,
-	0x0475fd50,
-	0x21f550fc,
-	0x64b60bd5,
-	0xad11f504,
-	0x0157f000,
-	0xb60076bb,
-	0x50f90465,
-	0xbb046594,
-	0x50bd0256,
-	0xfc0475fd,
-	0x3021f550,
-	0x0464b60c,
-	0x008a11f5,
+	0xb60b9d21,
+	0x11f40464,
+	0xe05bcb6a,
 	0xb60076bb,
 	0x50f90465,
 	0xbb046594,
 	0x50bd0256,
 	0xfc0475fd,
-	0x8321f550,
-	0x0464b60b,
-	0xcb6a11f4,
-	0x76bbe05b,
-	0x0465b600,
-	0x659450f9,
-	0x0256bb04,
-	0x75fd50bd,
-	0xf550fc04,
-	0xb60ac821,
-	0x5bb90464,
-	0xf474bd02,
-/* 0x0daa: i2c_recv_not_rd08 */
-	0xd6b0430e,
-	0x3d1bf401,
-	0xf50057f0,
-	0xf40c3021,
-	0xc5c73311,
-	0xd521f5e0,
-	0x2911f40b,
-	0xf50057f0,
-	0xf40c3021,
-	0xb5c71f11,
-	0xd521f5e0,
-	0x1511f40b,
-	0x0ac821f5,
-	0xc5c774bd,
-	0x091bf408,
-	0xf40232f4,
-/* 0x0dea: i2c_recv_not_wr08 */
-/* 0x0dea: i2c_recv_done */
-	0xcec7030e,
-	0x9521f5f8,
-	0xfce0fc0c,
-	0x0a12f4d0,
-	0xf5027cb9,
-/* 0x0dff: i2c_recv_exit */
-	0xf8033621,
-/* 0x0e01: i2c_init */
-/* 0x0e03: test_recv */
-	0xf100f800,
-	0xb605d817,
-	0x11cf0614,
-	0x0110b600,
-	0x05d807f1,
-	0xd00604b6,
-	0x04bd0001,
-	0xd900e7f1,
-	0x134fe3f1,
-	0x025621f5,
-/* 0x0e2a: test_init */
-	0xe7f100f8,
-	0x21f50800,
-	0x00f80256,
-/* 0x0e34: idle_recv */
-/* 0x0e36: idle */
-	0x31f400f8,
-	0xd417f100,
+	0xe221f550,
+	0x0464b60a,
+	0xbd025bb9,
+	0x430ef474,
+/* 0x0dc4: i2c_recv_not_rd08 */
+	0xf401d6b0,
+	0x57f03d1b,
+	0x4a21f500,
+	0x3311f40c,
+	0xf5e0c5c7,
+	0xf40bef21,
+	0x57f02911,
+	0x4a21f500,
+	0x1f11f40c,
+	0xf5e0b5c7,
+	0xf40bef21,
+	0x21f51511,
+	0x74bd0ae2,
+	0xf408c5c7,
+	0x32f4091b,
+	0x030ef402,
+/* 0x0e04: i2c_recv_not_wr08 */
+/* 0x0e04: i2c_recv_done */
+	0xf5f8cec7,
+	0xfc0caf21,
+	0xf4d0fce0,
+	0x7cb90a12,
+	0x3621f502,
+/* 0x0e19: i2c_recv_exit */
+/* 0x0e1b: i2c_init */
+	0xf800f803,
+/* 0x0e1d: test_recv */
+	0xd817f100,
 	0x0614b605,
 	0xb60011cf,
 	0x07f10110,
-	0x04b605d4,
+	0x04b605d8,
 	0x0001d006,
-/* 0x0e52: idle_loop */
-	0x17f004bd,
-	0x0232f458,
-/* 0x0e58: idle_proc */
-/* 0x0e58: idle_proc_exec */
-	0x1eb910f9,
-	0x3f21f502,
-	0xf410fc03,
-	0x31f40911,
-	0xef0ef402,
-/* 0x0e6c: idle_proc_next */
-	0xb85810b6,
-	0x1bf4061f,
-	0xdd02f4e6,
-	0xf40028f4,
-	0x0000bb0e,
-	0x00000000,
-	0x00000000,
-	0x00000000,
-	0x00000000,
-	0x00000000,
-	0x00000000,
+	0xe7f104bd,
+	0xe3f1d900,
+	0x21f5134f,
+	0x00f80256,
+/* 0x0e44: test_init */
+	0x0800e7f1,
+	0x025621f5,
+/* 0x0e4e: idle_recv */
+	0x00f800f8,
+/* 0x0e50: idle */
+	0xf10031f4,
+	0xb605d417,
+	0x11cf0614,
+	0x0110b600,
+	0x05d407f1,
+	0xd00604b6,
+	0x04bd0001,
+/* 0x0e6c: idle_loop */
+	0xf45817f0,
+/* 0x0e72: idle_proc */
+/* 0x0e72: idle_proc_exec */
+	0x10f90232,
+	0xf5021eb9,
+	0xfc033f21,
+	0x0911f410,
+	0xf40231f4,
+/* 0x0e86: idle_proc_next */
+	0x10b6ef0e,
+	0x061fb858,
+	0xf4e61bf4,
+	0x28f4dd02,
+	0xbb0ef400,
 	0x00000000,
 	0x00000000,
 	0x00000000,
drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h +413 -412

936 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h +123 -122

512 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h +382 -381

558 lines not on this page · raw message

drm/nouveau/nvkm/subdev/pmu/fuc/os.h +4 -0
index 153d3e77..6d80342c 100644

Lines of this file are not shown. View the raw message.

drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc +9 -0
index 01fc51bd..8bdfcc67 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

Part of the diff is not shown here. View the raw message.

#6 lore raw

PATCH v3 5/7 pmu: add counter_slots field

In reply to a message not in the archive

v3: seperated change into own commit

---
 drm/nouveau/nvkm/subdev/pmu/gf100.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gf119.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gk104.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gk110.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gk208.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gm107.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/gt215.c | 1 +
 drm/nouveau/nvkm/subdev/pmu/priv.h  | 2 ++
 8 files changed, 9 insertions(+)
drm/nouveau/nvkm/subdev/pmu/gf100.c +1 -0
index 0e36d4cb..14c3dd26 100644
@@ -30,6 +30,7 @@ gf100_pmu = {
 	.code.size = sizeof(gf100_pmu_code),
 	.data.data = gf100_pmu_data,
 	.data.size = sizeof(gf100_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gf119.c +1 -0
index 0e4ba424..9cf0279c 100644
@@ -30,6 +30,7 @@ gf119_pmu = {
 	.code.size = sizeof(gf119_pmu_code),
 	.data.data = gf119_pmu_data,
 	.data.size = sizeof(gf119_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gk104.c +1 -0
index 2ad858d8..cbf1d30d 100644
@@ -109,6 +109,7 @@ gk104_pmu = {
 	.code.size = sizeof(gk104_pmu_code),
 	.data.data = gk104_pmu_data,
 	.data.size = sizeof(gk104_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gk110.c +1 -0
index fc4b8ecf..f7ea4975 100644
@@ -88,6 +88,7 @@ gk110_pmu = {
 	.code.size = sizeof(gk110_pmu_code),
 	.data.data = gk110_pmu_data,
 	.data.size = sizeof(gk110_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gk208.c +1 -0
index e9a91277..252c3c1f 100644
@@ -30,6 +30,7 @@ gk208_pmu = {
 	.code.size = sizeof(gk208_pmu_code),
 	.data.data = gk208_pmu_data,
 	.data.size = sizeof(gk208_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gm107.c +1 -0
index 9a248ed7..b2917ec9 100644
@@ -32,6 +32,7 @@ gm107_pmu = {
 	.code.size = sizeof(gm107_pmu_code),
 	.data.data = gm107_pmu_data,
 	.data.size = sizeof(gm107_pmu_data),
+	.counter_slots = 8,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/gt215.c +1 -0
index 90d428b3..4bead2b7 100644
@@ -241,6 +241,7 @@ gt215_pmu = {
 	.code.size = sizeof(gt215_pmu_code),
 	.data.data = gt215_pmu_data,
 	.data.size = sizeof(gt215_pmu_data),
+	.counter_slots = 4,
 	.reset = gt215_pmu_reset,
 	.init = gt215_pmu_init,
 	.fini = gt215_pmu_fini,
drm/nouveau/nvkm/subdev/pmu/priv.h +2 -0
index 096cba06..b66629bc 100644
@@ -20,6 +20,8 @@ struct nvkm_pmu_func {
 		u32  size;
 	} data;
 
+	uint8_t counter_slots;
+
 	void (*reset)(struct nvkm_pmu *);
 	int (*init)(struct nvkm_pmu *);
 	void (*fini)(struct nvkm_pmu *);
Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
#7 lore raw

PATCH v3 6/7 pmu: setup counters

In reply to a message not in the archive

Generally following Nvidia here, but being more focused on the load groups.

---
 drm/nouveau/include/nvkm/subdev/pmu.h |  9 ++++++++
 drm/nouveau/nvkm/subdev/pmu/gt215.c   | 43 +++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
drm/nouveau/include/nvkm/subdev/pmu.h +9 -0
index e7f04732..b29570eb 100644
@@ -26,6 +26,15 @@ struct nvkm_pmu {
 	} recv;
 };
 
+enum nvkm_pmu_counter_slot {
+	NVKM_PMU_COUNTER_SLOT_TOTAL = 0,
+	NVKM_PMU_COUNTER_SLOT_CORE = 1,
+	NVKM_PMU_COUNTER_SLOT_MEMORY = 2,
+	NVKM_PMU_COUNTER_SLOT_VIDEO = 3,
+	NVKM_PMU_COUNTER_SLOT_PCIE = 4,
+	NVKM_PMU_COUNTER_SLOT_LAST = 8, // we support up to 8 slots for now
+};
+
 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);
drm/nouveau/nvkm/subdev/pmu/gt215.c +43 -0

55 lines not on this page · raw message

Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
#8 lore raw

PATCH v3 7/7 nouveau/debugfs: add interface for current load

In reply to a message not in the archive

output of the file will be something like that:

core, mem, vid, pci
0xfd, 0x15, 0x00, 0xa2

v2: relayout the debugfs file
v3: rework the struct holding load values

---
 drm/nouveau/include/nvif/device.h     |  1 +
 drm/nouveau/include/nvkm/subdev/pmu.h |  8 ++++++++
 drm/nouveau/nouveau_debugfs.c         | 27 +++++++++++++++++++++++++++
 drm/nouveau/nvkm/subdev/pmu/base.c    |  8 ++++++++
 drm/nouveau/nvkm/subdev/pmu/gf100.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gf119.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gk104.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gk110.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gk208.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gm107.c   |  1 +
 drm/nouveau/nvkm/subdev/pmu/gt215.c   | 18 ++++++++++++++++++
 drm/nouveau/nvkm/subdev/pmu/priv.h    |  3 +++
 12 files changed, 71 insertions(+)
drm/nouveau/include/nvif/device.h +1 -0
index bcb98171..2b9f725f 100644
@@ -65,6 +65,7 @@ u64  nvif_device_time(struct nvif_device *);
 #define nvxx_iccsense(a) nvxx_device(a)->iccsense
 #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>
drm/nouveau/include/nvkm/subdev/pmu.h +8 -0
index b29570eb..d450b805 100644
@@ -35,6 +35,10 @@ enum nvkm_pmu_counter_slot {
 	NVKM_PMU_COUNTER_SLOT_LAST = 8, // we support up to 8 slots for now
 };
 
+struct nvkm_pmu_counter_data {
+	u8 data[NVKM_PMU_COUNTER_SLOT_LAST];
+};
+
 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);
@@ -63,4 +67,8 @@ 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 *pmu,
+			   struct nvkm_pmu_counter_data *data);
 #endif
drm/nouveau/nouveau_debugfs.c +27 -0
index fd64dfdc..24200abb 100644
@@ -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_drv.h"
 
@@ -180,8 +182,33 @@ 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->client.device);
+	struct nvkm_pmu_counter_data counter_data;
+
+	if (!pm_runtime_suspended(drm->dev->dev)) {
+		int ret = nvkm_pmu_get_perf_data(pmu, &counter_data);
+
+		if (ret < 0)
+			return ret;
+	}
+
+	seq_puts(m, "core, mem,  vid,  pci\n");
+	seq_printf(m, "0x%2.2x, 0x%2.2x, 0x%2.2x, 0x%2.2x\n",
+		   counter_data.data[NVKM_PMU_COUNTER_SLOT_CORE],
+		   counter_data.data[NVKM_PMU_COUNTER_SLOT_MEMORY],
+		   counter_data.data[NVKM_PMU_COUNTER_SLOT_VIDEO],
+		   counter_data.data[NVKM_PMU_COUNTER_SLOT_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)
 
drm/nouveau/nvkm/subdev/pmu/base.c +8 -0
index 3306f9fe..ed525f30 100644
@@ -49,6 +49,14 @@ nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2],
 	return pmu->func->send(pmu, reply, process, message, data0, data1);
 }
 
+int
+nvkm_pmu_get_perf_data(struct nvkm_pmu *pmu, struct nvkm_pmu_counter_data *data)
+{
+	if (!pmu || !pmu->func->get_perf_data)
+		return -ENODEV;
+	return pmu->func->get_perf_data(pmu, data);
+}
+
 static void
 nvkm_pmu_intr(struct nvkm_subdev *subdev)
 {
drm/nouveau/nvkm/subdev/pmu/gf100.c +1 -0
index 14c3dd26..1c4986cb 100644
@@ -37,6 +37,7 @@ gf100_pmu = {
 	.intr = gt215_pmu_intr,
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gf119.c +1 -0
index 9cf0279c..49d8fb22 100644
@@ -37,6 +37,7 @@ gf119_pmu = {
 	.intr = gt215_pmu_intr,
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gk104.c +1 -0
index cbf1d30d..7ae36a78 100644
@@ -117,6 +117,7 @@ gk104_pmu = {
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
 	.pgob = gk104_pmu_pgob,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gk110.c +1 -0
index f7ea4975..84001c27 100644
@@ -96,6 +96,7 @@ gk110_pmu = {
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
 	.pgob = gk110_pmu_pgob,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gk208.c +1 -0
index 252c3c1f..f2d743e6 100644
@@ -38,6 +38,7 @@ gk208_pmu = {
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
 	.pgob = gk110_pmu_pgob,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gm107.c +1 -0
index b2917ec9..f0a964ff 100644
@@ -39,6 +39,7 @@ gm107_pmu = {
 	.intr = gt215_pmu_intr,
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/gt215.c +18 -0
index b7053cf7..6550e5e7 100644
@@ -69,6 +69,23 @@ gt215_setup_pmu_counters(struct nvkm_pmu *pmu)
 }
 
 int
+gt215_pmu_get_perf_data(struct nvkm_pmu *pmu,
+			struct nvkm_pmu_counter_data *data)
+{
+	int ret;
+	union {
+		u32 *raw;
+		u8 *slots;
+	} d;
+
+	d.slots = data->data;
+	ret = nvkm_pmu_send(pmu, d.raw, PROC_PERF, PERF_MSG_GET_SLOTS, 0, 0);
+	if (ret < 0)
+		return ret;
+	return 0;
+}
+
+int
 gt215_pmu_send(struct nvkm_pmu *pmu, u32 reply[2],
 	       u32 process, u32 message, u32 data0, u32 data1)
 {
@@ -291,6 +308,7 @@ gt215_pmu = {
 	.intr = gt215_pmu_intr,
 	.send = gt215_pmu_send,
 	.recv = gt215_pmu_recv,
+	.get_perf_data = gt215_pmu_get_perf_data,
 };
 
 int
drm/nouveau/nvkm/subdev/pmu/priv.h +3 -0
index b66629bc..7bc15478 100644
@@ -30,6 +30,7 @@ struct nvkm_pmu_func {
 		    u32 message, u32 data0, u32 data1);
 	void (*recv)(struct nvkm_pmu *);
 	void (*pgob)(struct nvkm_pmu *, bool);
+	int (*get_perf_data)(struct nvkm_pmu *, struct nvkm_pmu_counter_data *);
 };
 
 void gt215_pmu_reset(struct nvkm_pmu *);
@@ -38,6 +39,8 @@ void gt215_pmu_fini(struct nvkm_pmu *);
 void gt215_pmu_intr(struct nvkm_pmu *);
 void gt215_pmu_recv(struct nvkm_pmu *);
 int gt215_pmu_send(struct nvkm_pmu *, u32[2], u32, u32, u32, u32);
+int gt215_pmu_get_perf_data(struct nvkm_pmu *pmu,
+			    struct nvkm_pmu_counter_data *data);
 
 void gk110_pmu_pgob(struct nvkm_pmu *, bool);
 #endif
Signature · 6 lines
2.13.0

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau