diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h index aa71e2951..0131db272 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h @@ -334,6 +334,7 @@ struct tegra_vgpu_reg_ops_params { u64 handle; u64 num_ops; u32 is_profiler; + u8 is_current_ctx; }; struct tegra_vgpu_channel_priority_params { diff --git a/drivers/gpu/nvgpu/vgpu/dbg_vgpu.c b/drivers/gpu/nvgpu/vgpu/dbg_vgpu.c index fa82c5a6e..5c10bdcbd 100644 --- a/drivers/gpu/nvgpu/vgpu/dbg_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/dbg_vgpu.c @@ -70,8 +70,11 @@ int vgpu_exec_regops(struct dbg_session_gk20a *dbg_s, p->is_profiler = dbg_s->is_profiler; err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); err = err ? err : msg.ret; - if (!err) { + if (err == 0) { (void) memcpy(ops, oob, ops_size); + if (is_current_ctx != NULL) { + *is_current_ctx = p->is_current_ctx != 0u; + } } fail: