diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2018-12-20 23:34:27 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2020-07-27 17:55:01 -0400 |
commit | 5ecc45b5e7f16e00b2407d4259759228ccbdcf4b (patch) | |
tree | 57335f1b1a7c11836eeecd41a4dea8220fb90d59 /include | |
parent | e878686302f126fc09d336310651ebe0f857576c (diff) |
gpu: nvgpu: add cycle stats to debugger node
Add NVGPU_DBG_GPU_IOCTL_CYCLE_STATS to debugger node, to
install/uninstall a buffer for cycle stats.
Add NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT to debugger
node, to attach/flush/detach a buffer for Mode-E streamout.
Those ioctls will apply to the first channel in the debug session.
Bug 2660206
Bug 200464613
Change-Id: I0b96d9a07c016690140292fa5886fda545697ee6
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2002060
(cherry picked from commit 90b0bf98ac01d7fa24c40f6a1f20bfe5fa481d36)
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2092008
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Peter Daifuku <pdaifuku@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index ad9dce1f..2c130d82 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -1416,6 +1416,31 @@ struct nvgpu_dbg_gpu_set_sm_exception_type_mask_args { | |||
1416 | _IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 23, \ | 1416 | _IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 23, \ |
1417 | struct nvgpu_dbg_gpu_set_sm_exception_type_mask_args) | 1417 | struct nvgpu_dbg_gpu_set_sm_exception_type_mask_args) |
1418 | 1418 | ||
1419 | struct nvgpu_dbg_gpu_cycle_stats_args { | ||
1420 | __u32 dmabuf_fd; | ||
1421 | __u32 reserved; | ||
1422 | }; | ||
1423 | |||
1424 | #define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS \ | ||
1425 | _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 24, struct nvgpu_dbg_gpu_cycle_stats_args) | ||
1426 | |||
1427 | /* cycle stats snapshot buffer support for mode E */ | ||
1428 | struct nvgpu_dbg_gpu_cycle_stats_snapshot_args { | ||
1429 | __u32 cmd; /* in: command to handle */ | ||
1430 | __u32 dmabuf_fd; /* in: dma buffer handler */ | ||
1431 | __u32 extra; /* in/out: extra payload e.g.*/ | ||
1432 | /* counter/start perfmon */ | ||
1433 | __u32 reserved; | ||
1434 | }; | ||
1435 | |||
1436 | /* valid commands to control cycle stats shared buffer */ | ||
1437 | #define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_FLUSH 0 | ||
1438 | #define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_ATTACH 1 | ||
1439 | #define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_DETACH 2 | ||
1440 | |||
1441 | #define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT \ | ||
1442 | _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 25, struct nvgpu_dbg_gpu_cycle_stats_snapshot_args) | ||
1443 | |||
1419 | /* MMU Debug Mode */ | 1444 | /* MMU Debug Mode */ |
1420 | #define NVGPU_DBG_GPU_CTX_MMU_DEBUG_MODE_DISABLED 0 | 1445 | #define NVGPU_DBG_GPU_CTX_MMU_DEBUG_MODE_DISABLED 0 |
1421 | #define NVGPU_DBG_GPU_CTX_MMU_DEBUG_MODE_ENABLED 1 | 1446 | #define NVGPU_DBG_GPU_CTX_MMU_DEBUG_MODE_ENABLED 1 |