From a6138b781055838321f75fe0a437ba38e93a5c72 Mon Sep 17 00:00:00 2001 From: Anup Mahindre Date: Wed, 14 Nov 2018 13:07:06 +0530 Subject: [PATCH] gpu: nvgpu: Add a characteristics flag to denote FECS tracing support Add a flag to nvgpu_gpu_characteristics to expose FECS tracing capability to userspace. This is required for adding nvrm_gpu APIs for CTXSW set of IOCTLs which were requested in several bugs. nvrm_gpu APIs would query this flag to check the availability of IOCTLs. Bug 2169678 Bug 2169677 Bug 2169675 Bug 2169674 Bug 2169673 Bug 2168342 Change-Id: Ie6ba80a4144637546b97fa93baae67b8d0c4d425 Signed-off-by: Anup Mahindre Reviewed-on: https://git-master.nvidia.com/r/1950559 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 1 + include/uapi/linux/nvgpu.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index dc2daafe1..5e25fac65 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -331,6 +331,7 @@ gk20a_ctrl_ioctl_gpu_characteristics( gpu.ioctl_channel_nr_last = NVGPU_IOCTL_CHANNEL_LAST; gpu.as_ioctl_nr_last = NVGPU_AS_IOCTL_LAST; gpu.event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST; + gpu.ctxsw_ioctl_nr_last = NVGPU_CTXSW_IOCTL_LAST; gpu.gpu_va_bit_count = 40; strlcpy(gpu.chipname, g->name, sizeof(gpu.chipname)); diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 3ec4d66e0..93afdde43 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -280,6 +280,9 @@ struct nvgpu_gpu_characteristics { __u32 max_css_buffer_size; + __s16 ctxsw_ioctl_nr_last; + __u8 reserved2[6]; + /* Notes: - This struct can be safely appended with new fields. However, always keep the structure size multiple of 8 and make sure that the binary