summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-05-12 12:12:10 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-18 11:07:38 -0400
commit8f48afe26bc39fd7508646e8c3ea6bfeb665beae (patch)
tree07751003b6c8113c28adf3350f5479d4e5a6be47 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
parent74f5aa0ad07a2499df6bd727f92ff4a170da6501 (diff)
gpu: nvgpu: remove unbind from debug session bind call
While binding a channel to debug session in dbg_bind_channel_gk20a(), we unbind the channel if channel fd is ~0 But UMD has already moved to use separate IOCTL to unbind a channel from debug session Hence this code can be removed now Bug 1646259 Change-Id: I9e53e4b4c79fbf5468fe083c5b265a84d9695841 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1146852 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
index afc1517b..520a2ffd 100644
--- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
@@ -497,27 +497,12 @@ static int dbg_bind_channel_gk20a(struct dbg_session_gk20a *dbg_s,
497 struct file *f; 497 struct file *f;
498 struct gk20a *g = dbg_s->g; 498 struct gk20a *g = dbg_s->g;
499 struct channel_gk20a *ch; 499 struct channel_gk20a *ch;
500 struct dbg_session_channel_data *ch_data, *tmp; 500 struct dbg_session_channel_data *ch_data;
501 struct dbg_session_data *session_data; 501 struct dbg_session_data *session_data;
502 502
503 gk20a_dbg(gpu_dbg_fn|gpu_dbg_gpu_dbg, "%s fd=%d", 503 gk20a_dbg(gpu_dbg_fn|gpu_dbg_gpu_dbg, "%s fd=%d",
504 dev_name(dbg_s->dev), args->channel_fd); 504 dev_name(dbg_s->dev), args->channel_fd);
505 505
506 if (args->channel_fd == ~0) {
507 ch = nvgpu_dbg_gpu_get_session_channel(dbg_s);
508 if (!ch)
509 return -EINVAL;
510
511 mutex_lock(&dbg_s->ch_list_lock);
512 list_for_each_entry_safe(ch_data, tmp,
513 &dbg_s->ch_list, ch_entry) {
514 if (ch_data->chid == ch->hw_chid)
515 dbg_unbind_single_channel_gk20a(dbg_s, ch_data);
516 }
517 mutex_unlock(&dbg_s->ch_list_lock);
518 return 0;
519 }
520
521 /* even though get_file_channel is doing this it releases it as well */ 506 /* even though get_file_channel is doing this it releases it as well */
522 /* by holding it here we'll keep it from disappearing while the 507 /* by holding it here we'll keep it from disappearing while the
523 * debugger is in session */ 508 * debugger is in session */