mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Add characterstics field to expose max ctxsw ring buffer size
NVGPU_CTXSW_IOCTL_RING_SETUP can be used to setup a custom ring buffer and it accepts size via arguments. nvgpu driver will return an error if size requested is greater than 128 * 4096 but this value is hardcoded and not exposed anywhere. Add characteristics field in nvgpu.h to expose this size so that corresponding nvrm_gpu API can use it. Bug 2169674 Change-Id: Icf9465d4eec6ba3a307ea9490bd5da563944e4f6 Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1967596 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7e68e5c83d
commit
75ff0feeff
@@ -393,6 +393,7 @@ struct gr_gk20a {
|
|||||||
struct gk20a_cs_snapshot *cs_data;
|
struct gk20a_cs_snapshot *cs_data;
|
||||||
#endif
|
#endif
|
||||||
u32 max_css_buffer_size;
|
u32 max_css_buffer_size;
|
||||||
|
u32 max_ctxsw_ring_buffer_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
void gk20a_fecs_dump_falcon_stats(struct gk20a *g);
|
void gk20a_fecs_dump_falcon_stats(struct gk20a *g);
|
||||||
|
|||||||
@@ -580,6 +580,8 @@ int gk20a_ctxsw_trace_init(struct gk20a *g)
|
|||||||
if (unlikely(err))
|
if (unlikely(err))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
g->gr.max_ctxsw_ring_buffer_size = GK20A_CTXSW_TRACE_MAX_VM_RING_SIZE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ gk20a_ctrl_ioctl_gpu_characteristics(
|
|||||||
gpu.sm_arch_warp_count = g->params.sm_arch_warp_count;
|
gpu.sm_arch_warp_count = g->params.sm_arch_warp_count;
|
||||||
|
|
||||||
gpu.max_css_buffer_size = g->gr.max_css_buffer_size;
|
gpu.max_css_buffer_size = g->gr.max_css_buffer_size;
|
||||||
|
gpu.max_ctxsw_ring_buffer_size = g->gr.max_ctxsw_ring_buffer_size;
|
||||||
|
|
||||||
gpu.gpu_ioctl_nr_last = NVGPU_GPU_IOCTL_LAST;
|
gpu.gpu_ioctl_nr_last = NVGPU_GPU_IOCTL_LAST;
|
||||||
gpu.tsg_ioctl_nr_last = NVGPU_TSG_IOCTL_LAST;
|
gpu.tsg_ioctl_nr_last = NVGPU_TSG_IOCTL_LAST;
|
||||||
|
|||||||
@@ -283,6 +283,9 @@ struct nvgpu_gpu_characteristics {
|
|||||||
__s16 ctxsw_ioctl_nr_last;
|
__s16 ctxsw_ioctl_nr_last;
|
||||||
__u8 reserved2[6];
|
__u8 reserved2[6];
|
||||||
|
|
||||||
|
__u32 max_ctxsw_ring_buffer_size;
|
||||||
|
__u32 reserved3;
|
||||||
|
|
||||||
/* Notes:
|
/* Notes:
|
||||||
- This struct can be safely appended with new fields. However, always
|
- This struct can be safely appended with new fields. However, always
|
||||||
keep the structure size multiple of 8 and make sure that the binary
|
keep the structure size multiple of 8 and make sure that the binary
|
||||||
|
|||||||
Reference in New Issue
Block a user