aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2015-06-07 22:40:26 +0200
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:39:59 +1000
commit0f3804360dd4f88332b9c0b2d7cb4c1f30893cc7 (patch)
tree8132e2f021d8d89456acc627c432e226aa3832f5 /drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
parentdrm/nouveau/pm: allow the userspace to schedule hardware counters (diff)
downloadlinux-dev-0f3804360dd4f88332b9c0b2d7cb4c1f30893cc7.tar.xz
linux-dev-0f3804360dd4f88332b9c0b2d7cb4c1f30893cc7.zip
drm/nouveau/pm: allow to configure domains instead of simple counters
Configuring counters from the userspace require the kernel to handle some logic related to performance counters. Basically, it has to find a free slot to assign a counter, to handle extra counting modes like B4/B6 and it must return and error when it can't configure a counter. In my opinion, the kernel should not handle all of that logic but it should only write the configuration sent by the userspace without checking anything. In other words, it should overwrite the configuration even if it's already counting and do not return any errors. This patch allows the userspace to configure a domain instead of separate counters. This has the advantage to move all of the logic to the userspace. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h b/drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
index 4ed77ff4922c..38adeb731b96 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
@@ -3,13 +3,10 @@
#include <engine/pm.h>
struct nvkm_perfctr {
- struct nvkm_object base;
struct list_head head;
- struct nvkm_perfsig *signal[4];
- struct nvkm_perfdom *dom;
+ u8 signal[4];
int slot;
u32 logic_op;
- u32 clk;
u32 ctr;
};
@@ -63,12 +60,15 @@ struct nvkm_specdom {
};
struct nvkm_perfdom {
+ struct nvkm_object base;
struct list_head head;
struct list_head list;
const struct nvkm_funcdom *func;
+ struct nvkm_perfctr *ctr[4];
char name[32];
u32 addr;
- u8 quad;
+ u8 mode;
+ u32 clk;
u16 signal_nr;
struct nvkm_perfsig signal[];
};