From ee9733e587d977610975435a84e5af7cabba8870 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 2 May 2017 16:01:51 +0300 Subject: gpu: nvgpu: expose deterministic submit support Add these bits in the gpu characteristics flags: NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING - fast submits with no in-kernel job tracking are supported. NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL - deterministic submits also with job tracking and num_inflight_jobs set are supported. Either of these may get disabled if the particular channel or submit still requires features that block these. Make gk20a_channel_sync_needs_sync_framework() take a gk20a pointer instead of a channel pointer so that it can be called without a channel. It does not need any per-channel data. Bug 200291300 Change-Id: I5f82510b6d39b53bcf6f1006dd83bdd9053963a0 Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1456845 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/nvgpu.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include/uapi/linux/nvgpu.h') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index e25667cb..401722b1 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -137,6 +137,10 @@ struct nvgpu_gpu_zbc_query_table_args { #define NVGPU_GPU_FLAGS_SUPPORT_FECS_CTXSW_TRACE (1ULL << 16) /* NVGPU_AS_IOCTL_MAP_BUFFER_COMPBITS is available */ #define NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS (1ULL << 17) +/* Fast deterministic submits with no job tracking are supported */ +#define NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING (1ULL << 18) +/* Deterministic submits are supported even with job tracking */ +#define NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL (1ULL << 19) struct nvgpu_gpu_characteristics { __u32 arch; @@ -1348,8 +1352,22 @@ struct nvgpu_alloc_gpfifo_args { struct nvgpu_alloc_gpfifo_ex_args { __u32 num_entries; __u32 num_inflight_jobs; -#define NVGPU_ALLOC_GPFIFO_EX_FLAGS_VPR_ENABLED (1 << 0) /* set owner channel of this gpfifo as a vpr channel */ -#define NVGPU_ALLOC_GPFIFO_EX_FLAGS_DETERMINISTIC (1 << 1) /* channel shall exhibit deterministic behavior in the submit path */ +/* Set owner channel of this gpfifo as a vpr channel. */ +#define NVGPU_ALLOC_GPFIFO_EX_FLAGS_VPR_ENABLED (1 << 0) +/* + * Channel shall exhibit deterministic behavior in the submit path. + * + * With this flag, any submits with in-kernel job tracking also require that + * num_inflight_jobs is nonzero, and additionally that + * NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL is found in gpu + * characteristics.flags. + * + * Note that fast submits (with no in-kernel job tracking) are also + * deterministic and are supported if the characteristics flags contain + * NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING; this flag or + * num_inflight_jobs are not necessary in that case. + */ +#define NVGPU_ALLOC_GPFIFO_EX_FLAGS_DETERMINISTIC (1 << 1) __u32 flags; __u32 reserved[5]; }; -- cgit v1.2.2