From: Samuel Pitoiset Date: Fri, 19 Jun 2015 15:36:37 +0000 (+0200) Subject: drm/nouveau/pm: expose name of domains X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df0b37ee1aa19fc1b948099bf449fdd94f36036c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/include/nvif/class.h b/drivers/gpu/drm/nouveau/include/nvif/class.h index 3b7f49f876ab..59d598357a43 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/class.h +++ b/drivers/gpu/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/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c index 7866e220b66f..94991d63640c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c +++ b/drivers/gpu/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). */