summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/regops_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/regops_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/regops_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/regops_gk20a.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
index 80d27c25..0aec4f86 100644
--- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c
@@ -89,7 +89,8 @@ static bool validate_reg_ops(struct dbg_session_gk20a *dbg_s,
89 89
90int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, 90int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s,
91 struct nvgpu_dbg_reg_op *ops, 91 struct nvgpu_dbg_reg_op *ops,
92 u64 num_ops) 92 u64 num_ops,
93 bool *is_current_ctx)
93{ 94{
94 int err = 0; 95 int err = 0;
95 unsigned int i; 96 unsigned int i;
@@ -219,7 +220,8 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s,
219 220
220 if (ctx_wr_count | ctx_rd_count) { 221 if (ctx_wr_count | ctx_rd_count) {
221 err = gr_gk20a_exec_ctx_ops(ch, ops, num_ops, 222 err = gr_gk20a_exec_ctx_ops(ch, ops, num_ops,
222 ctx_wr_count, ctx_rd_count); 223 ctx_wr_count, ctx_rd_count,
224 is_current_ctx);
223 if (err) { 225 if (err) {
224 nvgpu_warn(g, "failed to perform ctx ops\n"); 226 nvgpu_warn(g, "failed to perform ctx ops\n");
225 goto clean_up; 227 goto clean_up;