mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add user API to get a syncpoint
Add new user API NVGPU_IOCTL_CHANNEL_GET_USER_SYNCPOINT which will expose per-channel allocated syncpoint to user space API will also return current value of the syncpoint On supported platforms, this API will also return a RW semaphore address (corresponding to syncpoint shim) to user space Add new characteristics flag NVGPU_GPU_FLAGS_SUPPORT_USER_SYNCPOINT to indicate support for this new API Add new flag NVGPU_SUPPORT_USER_SYNCPOINT for use of core driver Set this flag for GV11B and GP10B for now Add a new API (*syncpt_address) in struct gk20a_channel_sync to get GPU_VA address of a syncpoint Add new API nvgpu_nvhost_syncpt_read_maxval() which will read and return MAX value of syncpoint Bug 200326065 Jira NVGPU-179 Change-Id: I9da6f17b85996f4fc6731c0bf94fca6f3181c3e0 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1658009 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> 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
180604fec0
commit
8d5536271f
@@ -154,6 +154,8 @@ struct nvgpu_gpu_zbc_query_table_args {
|
||||
#define NVGPU_GPU_FLAGS_SUPPORT_SYNCPOINT_ADDRESS (1ULL << 26)
|
||||
/* VPR is supported */
|
||||
#define NVGPU_GPU_FLAGS_SUPPORT_VPR (1ULL << 27)
|
||||
/* Allocating per-channel syncpoint in user space is supported */
|
||||
#define NVGPU_GPU_FLAGS_SUPPORT_USER_SYNCPOINT (1ULL << 28)
|
||||
/* SM LRF ECC is enabled */
|
||||
#define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60)
|
||||
/* SM SHM ECC is enabled */
|
||||
@@ -1648,6 +1650,12 @@ struct nvgpu_boosted_ctx_args {
|
||||
__u32 padding;
|
||||
};
|
||||
|
||||
struct nvgpu_get_user_syncpoint_args {
|
||||
__u64 gpu_va; /* out */
|
||||
__u32 syncpoint_id; /* out */
|
||||
__u32 syncpoint_max; /* out */
|
||||
};
|
||||
|
||||
#define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \
|
||||
@@ -1698,9 +1706,11 @@ struct nvgpu_boosted_ctx_args {
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 124, struct nvgpu_boosted_ctx_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_GET_TIMESLICE \
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 125, struct nvgpu_timeslice_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_GET_USER_SYNCPOINT \
|
||||
_IOR(NVGPU_IOCTL_MAGIC, 126, struct nvgpu_get_user_syncpoint_args)
|
||||
|
||||
#define NVGPU_IOCTL_CHANNEL_LAST \
|
||||
_IOC_NR(NVGPU_IOCTL_CHANNEL_GET_TIMESLICE)
|
||||
_IOC_NR(NVGPU_IOCTL_CHANNEL_GET_USER_SYNCPOINT)
|
||||
#define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_alloc_gpfifo_ex_args)
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user