diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 04:10:24 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 04:43:40 +1000 |
commit | 8c59608de24a7f2be535e2185d807d6fae862d60 (patch) | |
tree | c5d6912bd45aa09be91b0887f5c70aa966eb042f /nvif/class.h | |
parent | abde6a90a032e842f69c8c012bd3847d7b348e5d (diff) | |
download | nouveau-8c59608de24a7f2be535e2185d807d6fae862d60.tar.gz |
pm: audit and version NVIF_PERFMON class and methods
The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nvif/class.h')
-rw-r--r-- | nvif/class.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nvif/class.h b/nvif/class.h index 5279d0dd4..decca22ea 100644 --- a/nvif/class.h +++ b/nvif/class.h @@ -151,4 +151,38 @@ struct gf110_dma_v0 { __u8 pad03[5]; }; + +/******************************************************************************* + * perfmon + ******************************************************************************/ + +struct nvif_perfctr_v0 { + __u8 version; + __u8 pad01[1]; + __u16 logic_op; + __u8 pad04[4]; + char name[4][64]; +}; + +#define NVIF_PERFCTR_V0_QUERY 0x00 +#define NVIF_PERFCTR_V0_SAMPLE 0x01 +#define NVIF_PERFCTR_V0_READ 0x02 + +struct nvif_perfctr_query_v0 { + __u8 version; + __u8 pad01[3]; + __u32 iter; + char name[64]; +}; + +struct nvif_perfctr_sample { +}; + +struct nvif_perfctr_read_v0 { + __u8 version; + __u8 pad01[7]; + __u32 ctr; + __u32 clk; +}; + #endif |