From 8f48afe26bc39fd7508646e8c3ea6bfeb665beae Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 12 May 2016 21:42:10 +0530 Subject: 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 Reviewed-on: http://git-master/r/1146852 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c') 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, struct file *f; struct gk20a *g = dbg_s->g; struct channel_gk20a *ch; - struct dbg_session_channel_data *ch_data, *tmp; + struct dbg_session_channel_data *ch_data; struct dbg_session_data *session_data; gk20a_dbg(gpu_dbg_fn|gpu_dbg_gpu_dbg, "%s fd=%d", dev_name(dbg_s->dev), args->channel_fd); - if (args->channel_fd == ~0) { - ch = nvgpu_dbg_gpu_get_session_channel(dbg_s); - if (!ch) - return -EINVAL; - - mutex_lock(&dbg_s->ch_list_lock); - list_for_each_entry_safe(ch_data, tmp, - &dbg_s->ch_list, ch_entry) { - if (ch_data->chid == ch->hw_chid) - dbg_unbind_single_channel_gk20a(dbg_s, ch_data); - } - mutex_unlock(&dbg_s->ch_list_lock); - return 0; - } - /* even though get_file_channel is doing this it releases it as well */ /* by holding it here we'll keep it from disappearing while the * debugger is in session */ -- cgit v1.2.2