diff --git a/drivers/gpu/nvgpu/hal/gr/gr/gr_gm20b.c b/drivers/gpu/nvgpu/hal/gr/gr/gr_gm20b.c index dfdf952bd..eee6cacc1 100644 --- a/drivers/gpu/nvgpu/hal/gr/gr/gr_gm20b.c +++ b/drivers/gpu/nvgpu/hal/gr/gr/gr_gm20b.c @@ -396,13 +396,12 @@ int gr_gm20b_update_pc_sampling(struct nvgpu_channel *c, /* Pascal+ chips do not support updating PC sampling using register * NV_CTXSW_MAIN_IMAGE_PM. We are setting the set_pc_sampling HAL - * to NULL. We need to make sure devtools also does not call into - * these APIs. Until the devtools team updates their code, we would - * return success(0) from update_pc_sampling API even if the HAL is - * set to NULL. Filed http://nvbugs/200671026 for devtools team. + * to NULL. If this API is called for Pascal+, then return error. */ if (c->g->ops.gr.ctxsw_prog.set_pc_sampling) { c->g->ops.gr.ctxsw_prog.set_pc_sampling(c->g, mem, enable); + } else { + return -EINVAL; } nvgpu_log_fn(c->g, "done");