[Nouveau] [PATCH 1/2] pm: expose name of domains

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jun 19 08:36:37 PDT 2015


This is going to be very useful for GF100+ because each GPC can
have its own domain of counters.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 drm/nouveau/include/nvif/class.h  | 1 +
 drm/nouveau/nvkm/engine/pm/base.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drm/nouveau/include/nvif/class.h b/drm/nouveau/include/nvif/class.h
index 3b7f49f..59d5983 100644
--- a/drm/nouveau/include/nvif/class.h
+++ b/drm/nouveau/include/nvif/class.h
@@ -262,6 +262,7 @@ struct nvif_perfmon_query_domain_v0 {
 	__u8  iter;
 	__u16 signal_nr;
 	__u8  pad05[2];
+	char  name[64];
 };
 
 struct nvif_perfmon_query_signal_v0 {
diff --git a/drm/nouveau/nvkm/engine/pm/base.c b/drm/nouveau/nvkm/engine/pm/base.c
index 7866e22..94991d6 100644
--- a/drm/nouveau/nvkm/engine/pm/base.c
+++ b/drm/nouveau/nvkm/engine/pm/base.c
@@ -454,6 +454,7 @@ nvkm_perfmon_mthd_query_domain(struct nvkm_object *object, void *data, u32 size)
 
 		args->v0.id         = di;
 		args->v0.signal_nr  = nvkm_perfdom_count_perfsig(dom);
+		strncpy(args->v0.name, dom->name, sizeof(args->v0.name));
 
 		/* Currently only global counters (PCOUNTER) are implemented
 		 * but this will be different for local counters (MP). */
-- 
2.4.3



More information about the Nouveau mailing list