gpu: nvgpu: add max_css_buffer_size characteristic

Add max_css_buffer_size to gpu characteristics. In the virtual
case, the size of the cycle stats snapshot buffer is constrained
by the size of the mempool shared between the guest OS and the
RM server, so tools need to find out what is the maximum size
allowed.

In the native case, we return 0xffffffff to indicate
that the buffer size is unbounded (subject to memory availability),
in the virtual case we return the size of the mempool.

Also collapse native init_cyclestats functions to a single version,
as each chip had identical versions of the code.

JIRA ESRM-54
Bug 200296210

Change-Id: I71764d32c6e71a0d101bd40f274eaa4bea3e5b11
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1578930
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Peter Daifuku
2017-10-13 17:06:30 -07:00
committed by mobile promotions
parent 0dcf0ede81
commit 6bf40e5237
12 changed files with 79 additions and 41 deletions

View File

@@ -245,7 +245,9 @@ struct nvgpu_gpu_characteristics {
__u32 reserved1;
__s16 event_ioctl_nr_last;
__u16 pad[3];
__u16 pad;
__u32 max_css_buffer_size;
/* Notes:
- This struct can be safely appended with new fields. However, always