diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_dbg.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c index d288280e..a53d1cfb 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_dbg.c | |||
@@ -1020,8 +1020,7 @@ static int nvgpu_dbg_gpu_ioctl_hwpm_ctxsw_mode(struct dbg_session_gk20a *dbg_s, | |||
1020 | struct gk20a *g = dbg_s->g; | 1020 | struct gk20a *g = dbg_s->g; |
1021 | struct channel_gk20a *ch_gk20a; | 1021 | struct channel_gk20a *ch_gk20a; |
1022 | 1022 | ||
1023 | gk20a_dbg_fn("%s pm ctxsw mode = %d", | 1023 | nvgpu_log_fn(g, "%s pm ctxsw mode = %d", g->name, args->mode); |
1024 | g->name, args->mode); | ||
1025 | 1024 | ||
1026 | /* Must have a valid reservation to enable/disable hwpm cxtsw. | 1025 | /* Must have a valid reservation to enable/disable hwpm cxtsw. |
1027 | * Just print an error message for now, but eventually this should | 1026 | * Just print an error message for now, but eventually this should |
@@ -1049,13 +1048,16 @@ static int nvgpu_dbg_gpu_ioctl_hwpm_ctxsw_mode(struct dbg_session_gk20a *dbg_s, | |||
1049 | err = -EINVAL; | 1048 | err = -EINVAL; |
1050 | goto clean_up; | 1049 | goto clean_up; |
1051 | } | 1050 | } |
1052 | 1051 | if (!dbg_s->is_pg_disabled) { | |
1052 | nvgpu_err(g, "powergate is not disabled"); | ||
1053 | err = -ENOSYS; | ||
1054 | goto clean_up; | ||
1055 | } | ||
1053 | err = g->ops.gr.update_hwpm_ctxsw_mode(g, ch_gk20a, 0, | 1056 | err = g->ops.gr.update_hwpm_ctxsw_mode(g, ch_gk20a, 0, |
1054 | args->mode == NVGPU_DBG_GPU_HWPM_CTXSW_MODE_CTXSW); | 1057 | args->mode == NVGPU_DBG_GPU_HWPM_CTXSW_MODE_CTXSW); |
1055 | if (err) | 1058 | if (err) |
1056 | nvgpu_err(g, | 1059 | nvgpu_err(g, |
1057 | "error (%d) during pm ctxsw mode update", err); | 1060 | "error (%d) during pm ctxsw mode update", err); |
1058 | |||
1059 | /* gk20a would require a WAR to set the core PM_ENABLE bit, not | 1061 | /* gk20a would require a WAR to set the core PM_ENABLE bit, not |
1060 | * added here with gk20a being deprecated | 1062 | * added here with gk20a being deprecated |
1061 | */ | 1063 | */ |