drm/nouveau/pm: expose name of domains
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 19 Jun 2015 15:36:37 +0000 (17:36 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:01 +0000 (12:40 +1000)
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@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c

index 3b7f49f876abead53aaed9e42254b8e1ad68e023..59d598357a43b10cf48ab5db82b047fedafb11a3 100644 (file)
@@ -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 {
index 7866e220b66fcd0e7b55b84577a965a929c461f1..94991d63640ce5882ac2660ad4ac0f144847642c 100644 (file)
@@ -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). */