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>
This commit is contained in:
Deepak Nibade
2016-05-12 21:42:10 +05:30
committed by Terje Bergstrom
parent 74f5aa0ad0
commit 8f48afe26b

View File

@@ -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 */