diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 33fcf2377..4362d7d81 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h @@ -216,6 +216,7 @@ struct gk20a; DEFINE_FLAG(NVGPU_SUPPORT_VAB_ENABLED, "VAB feature supported"), \ DEFINE_FLAG(NVGPU_SUPPORT_ROP_IN_GPC, "ROP is part of GPC"), \ DEFINE_FLAG(NVGPU_SUPPORT_BUFFER_METADATA, "Buffer metadata support"), \ + DEFINE_FLAG(NVGPU_SUPPORT_NVS, "Domain scheduler support"), \ DEFINE_FLAG(NVGPU_MAX_ENABLED_BITS, "Marks max number of flags"), /** diff --git a/drivers/gpu/nvgpu/os/linux/driver_common.c b/drivers/gpu/nvgpu/os/linux/driver_common.c index 022632403..83e672270 100644 --- a/drivers/gpu/nvgpu/os/linux/driver_common.c +++ b/drivers/gpu/nvgpu/os/linux/driver_common.c @@ -129,6 +129,8 @@ static void nvgpu_init_vars(struct gk20a *g) nvgpu_init_list_node(&g->boardobjgrp_head); nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, platform->has_syncpoints); + + nvgpu_set_enabled(g, NVGPU_SUPPORT_NVS, true); } static void nvgpu_init_max_comptag(struct gk20a *g) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index 333f56583..e657c352a 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -305,6 +305,8 @@ static struct nvgpu_flags_mapping flags_mapping[] = { NVGPU_SUPPORT_VAB_ENABLED}, {NVGPU_GPU_FLAGS_SUPPORT_BUFFER_METADATA, NVGPU_SUPPORT_BUFFER_METADATA}, + {NVGPU_GPU_FLAGS_SUPPORT_NVS, + NVGPU_SUPPORT_NVS}, }; static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) @@ -468,6 +470,7 @@ static long gk20a_ctrl_ioctl_gpu_characteristics( gpu.event_ioctl_nr_last = NVGPU_EVENT_IOCTL_LAST; gpu.ctxsw_ioctl_nr_last = NVGPU_CTXSW_IOCTL_LAST; gpu.prof_ioctl_nr_last = NVGPU_PROFILER_IOCTL_LAST; + gpu.nvs_ioctl_nr_last = NVGPU_NVS_IOCTL_LAST; gpu.gpu_va_bit_count = 40; gpu.max_dbg_tsg_timeslice = g->tsg_dbg_timeslice_max_us; diff --git a/include/uapi/linux/nvgpu-ctrl.h b/include/uapi/linux/nvgpu-ctrl.h index 120f03c9c..535cca5fc 100644 --- a/include/uapi/linux/nvgpu-ctrl.h +++ b/include/uapi/linux/nvgpu-ctrl.h @@ -199,6 +199,8 @@ struct nvgpu_gpu_zbc_query_table_args { #define NVGPU_GPU_FLAGS_L2_MAX_WAYS_EVICT_LAST_ENABLED (1ULL << 51) /* Vidmem access bits feature is supported */ #define NVGPU_GPU_FLAGS_SUPPORT_VAB (1ULL << 52) +/* The NVS scheduler interface is usable */ +#define NVGPU_GPU_FLAGS_SUPPORT_NVS (1ULL << 53) /* SM LRF ECC is enabled */ #define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60) /* SM SHM ECC is enabled */ @@ -315,7 +317,8 @@ struct nvgpu_gpu_characteristics { __s16 ctxsw_ioctl_nr_last; __s16 prof_ioctl_nr_last; - __u8 reserved2[4]; + __s16 nvs_ioctl_nr_last; + __u8 reserved2[2]; __u32 max_ctxsw_ring_buffer_size; __u32 reserved3;