diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index db8c28b55..4832382ec 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -156,7 +156,8 @@ static void nvgpu_sw_quiesce_remove_support(struct gk20a *g) void nvgpu_sw_quiesce(struct gk20a *g) { #ifndef CONFIG_NVGPU_RECOVERY - if (g->is_virtual) { + if (g->is_virtual || g->enabled_flags == NULL || + nvgpu_is_enabled(g, NVGPU_DISABLE_SW_QUIESCE)) { goto fail; } diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 87f5a5031..d1b9acd7b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h @@ -210,10 +210,13 @@ struct gk20a; /* Fault recovery support */ #define NVGPU_SUPPORT_FAULT_RECOVERY 80U +/* SW Quiesce */ +#define NVGPU_DISABLE_SW_QUIESCE 81U + /* * Must be greater than the largest bit offset in the above list. */ -#define NVGPU_MAX_ENABLED_BITS 81U +#define NVGPU_MAX_ENABLED_BITS 82U /** * nvgpu_is_enabled - Check if the passed flag is enabled.