mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: remove gk20a_is_channel_marked_as_tsg
Use tsg_gk20a_from_ch to get tsg pointer for tsgid of a channel. For
invalid tsgid, tsg pointer will be NULL
Bug 2092051
Bug 2429295
Bug 2484211
Change-Id: I82cd6a2dc5fab4acb147202af667ca97a2842a73
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2006722
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry picked from commit 13f37f9c70
in dev-kernel)
Reviewed-on: https://git-master.nvidia.com/r/2025507
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0c47ce7d72
commit
e00804594b
@@ -1667,6 +1667,7 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s,
|
||||
struct gk20a *g = dbg_s->g;
|
||||
struct dbg_profiler_object_data *prof_obj, *my_prof_obj;
|
||||
int err = 0;
|
||||
struct tsg_gk20a *tsg;
|
||||
|
||||
nvgpu_log_fn(g, "%s profiler_handle = %x", g->name, profiler_handle);
|
||||
|
||||
@@ -1709,11 +1710,11 @@ static int nvgpu_profiler_reserve_acquire(struct dbg_session_gk20a *dbg_s,
|
||||
nvgpu_err(g,
|
||||
"per-ctxt reserve: global reservation in effect");
|
||||
err = -EBUSY;
|
||||
} else if (gk20a_is_channel_marked_as_tsg(my_prof_obj->ch)) {
|
||||
} else if ((tsg = tsg_gk20a_from_ch(my_prof_obj->ch)) != NULL) {
|
||||
/* TSG: check that another channel in the TSG
|
||||
* doesn't already have the reservation
|
||||
*/
|
||||
u32 my_tsgid = my_prof_obj->ch->tsgid;
|
||||
u32 my_tsgid = tsg->tsgid;
|
||||
|
||||
nvgpu_list_for_each_entry(prof_obj, &g->profiler_objects,
|
||||
dbg_profiler_object_data, prof_obj_entry) {
|
||||
|
||||
Reference in New Issue
Block a user