summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2016-10-28 16:05:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-11 05:21:04 -0500
commitf329e674f477f0120f9a92a9e7b4945a1ddaefbb (patch)
tree55107ad03a029e438e93c1793afd5e940ab7206b /include
parentcc4208a27831faf95409b491aa29b8a161bf630a (diff)
gpu: nvgpu: gk20a: Fix FBP/L2 masks, add GET_FBP_L2_MASKS
Fix FBP and ROP_L2 enable masks for Maxwell+. Deprecate rop_l2_en_mask in GPU characteristics by adding _DEPRECATED postfix. The array is too small to hold ROP_L2 enable masks for desktop GPUs. Add NVGPU_GPU_IOCTL_GET_FBP_L2_MASKS to expose the ROP_L2 masks for userspace. Bug 200136909 Bug 200241845 Change-Id: I5ad5a5c09f3962ebb631b8d6e7a2f9df02f75ac7 Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: http://git-master/r/1245294 (cherry picked from commit 0823b33e59defec341ea7919dae4e5f73a36d256) Reviewed-on: http://git-master/r/1249883 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index d12ba772..a8ba2189 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -171,7 +171,7 @@ struct nvgpu_gpu_characteristics {
171 __u32 max_tex_per_tpc; 171 __u32 max_tex_per_tpc;
172 __u32 max_gpc_count; 172 __u32 max_gpc_count;
173 /* mask of Rop_L2 for each FBP */ 173 /* mask of Rop_L2 for each FBP */
174 __u32 rop_l2_en_mask[2]; 174 __u32 rop_l2_en_mask_DEPRECATED[2];
175 175
176 176
177 __u8 chipname[8]; 177 __u8 chipname[8];
@@ -522,6 +522,22 @@ struct nvgpu_gpu_get_memory_state_args {
522 __u64 reserved[4]; 522 __u64 reserved[4];
523}; 523};
524 524
525struct nvgpu_gpu_get_fbp_l2_masks_args {
526 /* [in] L2 mask buffer size reserved by userspace. Should be
527 at least sizeof(__u32) * fls(fbp_en_mask) to receive LTC
528 mask for each FBP.
529 [out] full kernel buffer size
530 */
531 __u32 mask_buf_size;
532 __u32 reserved;
533
534 /* [in] pointer to L2 mask buffer. It will receive one
535 32-bit L2 mask per FBP or 0 if FBP is not enabled or
536 not present. This parameter is ignored if
537 mask_buf_size is 0. */
538 __u64 mask_buf_addr;
539};
540
525#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ 541#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
526 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) 542 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args)
527#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ 543#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \
@@ -583,8 +599,10 @@ struct nvgpu_gpu_get_memory_state_args {
583#define NVGPU_GPU_IOCTL_GET_MEMORY_STATE \ 599#define NVGPU_GPU_IOCTL_GET_MEMORY_STATE \
584 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 33, \ 600 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 33, \
585 struct nvgpu_gpu_get_memory_state_args) 601 struct nvgpu_gpu_get_memory_state_args)
602#define NVGPU_GPU_IOCTL_GET_FBP_L2_MASKS \
603 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 38, struct nvgpu_gpu_get_fbp_l2_masks_args)
586#define NVGPU_GPU_IOCTL_LAST \ 604#define NVGPU_GPU_IOCTL_LAST \
587 _IOC_NR(NVGPU_GPU_IOCTL_GET_MEMORY_STATE) 605 _IOC_NR(NVGPU_GPU_IOCTL_GET_FBP_L2_MASKS)
588#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ 606#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \
589 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) 607 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args)
590 608