drm/nouveau/pm: expose name of domains

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>
This commit is contained in:
Samuel Pitoiset 2015-06-19 17:36:37 +02:00 committed by Ben Skeggs
parent 85fa319d8a
commit df0b37ee1a
2 changed files with 2 additions and 0 deletions
drivers/gpu/drm/nouveau
include/nvif
nvkm/engine/pm

View File

@ -262,6 +262,7 @@ struct nvif_perfmon_query_domain_v0 {
__u8 iter; __u8 iter;
__u16 signal_nr; __u16 signal_nr;
__u8 pad05[2]; __u8 pad05[2];
char name[64];
}; };
struct nvif_perfmon_query_signal_v0 { struct nvif_perfmon_query_signal_v0 {

View File

@ -454,6 +454,7 @@ nvkm_perfmon_mthd_query_domain(struct nvkm_object *object, void *data, u32 size)
args->v0.id = di; args->v0.id = di;
args->v0.signal_nr = nvkm_perfdom_count_perfsig(dom); 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 /* Currently only global counters (PCOUNTER) are implemented
* but this will be different for local counters (MP). */ * but this will be different for local counters (MP). */