gpu: nvgpu: vgpu: return is_current_ctx for regops

The feature is required by ioctl API. is_current_ctx has been added to
regops ivc command.

Bug 2375942
Jira EVLR-3388

Change-Id: Ib46dc7609f6a7de6dcd26f59a36e6be77b599743
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1943077
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Nirav Patel <nipatel@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Richard Zhao
2018-11-04 22:28:21 -08:00
committed by mobile promotions
parent 99384a67b5
commit f9ca193a60
2 changed files with 5 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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: