summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorAnup Mahindre <amahindre@nvidia.com>2018-09-05 08:06:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-09 20:23:06 -0400
commitb026c012963b135f8689c4409d12e79a76bb1156 (patch)
tree5bc8c5af18832f7d8264b22359aa68088381e0ce /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parente93a4ca50b6b24d3db1f8fdc0e5030fecb5ea8d2 (diff)
gpu: nvgpu: Return gr_ctx_resident from NVGPU_DBG_GPU_IOCTL_REG_OPS
NVGPU_DBG_GPU_IOCTL_REG_OPS currently doesn't return if the ctx was resident in engine or not. Regops are broken down into batches of 128 and each batch is executed together. Since there only 32 bits were available in IOCTL args, returning is ctx was resident isn't possible for all batches. Hence return if the ctx was resident for the first batch. Bug 200445575 Change-Id: Iff950be25893de0afadd523d4ea04842a8ddf2af Signed-off-by: Anup Mahindre <amahindre@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1812975 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index a40d93fd..f3b580e4 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -8358,7 +8358,8 @@ int __gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
8358 8358
8359int gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch, 8359int gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
8360 struct nvgpu_dbg_reg_op *ctx_ops, u32 num_ops, 8360 struct nvgpu_dbg_reg_op *ctx_ops, u32 num_ops,
8361 u32 num_ctx_wr_ops, u32 num_ctx_rd_ops) 8361 u32 num_ctx_wr_ops, u32 num_ctx_rd_ops,
8362 bool *is_curr_ctx)
8362{ 8363{
8363 struct gk20a *g = ch->g; 8364 struct gk20a *g = ch->g;
8364 int err, tmp_err; 8365 int err, tmp_err;
@@ -8376,7 +8377,9 @@ int gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
8376 } 8377 }
8377 8378
8378 ch_is_curr_ctx = gk20a_is_channel_ctx_resident(ch); 8379 ch_is_curr_ctx = gk20a_is_channel_ctx_resident(ch);
8379 8380 if (is_curr_ctx != NULL) {
8381 *is_curr_ctx = ch_is_curr_ctx;
8382 }
8380 nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg, "is curr ctx=%d", 8383 nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg, "is curr ctx=%d",
8381 ch_is_curr_ctx); 8384 ch_is_curr_ctx);
8382 8385
@@ -8694,7 +8697,7 @@ int gr_gk20a_set_sm_debug_mode(struct gk20a *g,
8694 i++; 8697 i++;
8695 } 8698 }
8696 8699
8697 err = gr_gk20a_exec_ctx_ops(ch, ops, i, i, 0); 8700 err = gr_gk20a_exec_ctx_ops(ch, ops, i, i, 0, NULL);
8698 if (err) { 8701 if (err) {
8699 nvgpu_err(g, "Failed to access register"); 8702 nvgpu_err(g, "Failed to access register");
8700 } 8703 }