diff options
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_dbg.c')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index 0dc163e2..adf40d5d 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | |||
@@ -1667,6 +1667,7 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s, | |||
1667 | struct gk20a *g = dbg_s->g; | 1667 | struct gk20a *g = dbg_s->g; |
1668 | struct dbg_profiler_object_data *prof_obj, *my_prof_obj; | 1668 | struct dbg_profiler_object_data *prof_obj, *my_prof_obj; |
1669 | int err = 0; | 1669 | int err = 0; |
1670 | struct tsg_gk20a *tsg; | ||
1670 | 1671 | ||
1671 | nvgpu_log_fn(g, "%s profiler_handle = %x", g->name, profiler_handle); | 1672 | nvgpu_log_fn(g, "%s profiler_handle = %x", g->name, profiler_handle); |
1672 | 1673 | ||
@@ -1709,11 +1710,11 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s, | |||
1709 | nvgpu_err(g, | 1710 | nvgpu_err(g, |
1710 | "per-ctxt reserve: global reservation in effect"); | 1711 | "per-ctxt reserve: global reservation in effect"); |
1711 | err = -EBUSY; | 1712 | err = -EBUSY; |
1712 | } else if (gk20a_is_channel_marked_as_tsg(my_prof_obj->ch)) { | 1713 | } else if ((tsg = tsg_gk20a_from_ch(my_prof_obj->ch)) != NULL) { |
1713 | /* TSG: check that another channel in the TSG | 1714 | /* TSG: check that another channel in the TSG |
1714 | * doesn't already have the reservation | 1715 | * doesn't already have the reservation |
1715 | */ | 1716 | */ |
1716 | u32 my_tsgid = my_prof_obj->ch->tsgid; | 1717 | u32 my_tsgid = tsg->tsgid; |
1717 | 1718 | ||
1718 | nvgpu_list_for_each_entry(prof_obj, &g->profiler_objects, | 1719 | nvgpu_list_for_each_entry(prof_obj, &g->profiler_objects, |
1719 | dbg_profiler_object_data, prof_obj_entry) { | 1720 | dbg_profiler_object_data, prof_obj_entry) { |