diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-12-27 22:23:06 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-03-18 14:30:16 -0400 |
commit | e00804594b83781bc9f7c17ac68cd9c5dd30953c (patch) | |
tree | f687d4da54c3b2afc867b8fcdde12bf8489f95f3 /drivers/gpu/nvgpu/os/linux | |
parent | 0c47ce7d72e4c95ca293a222e2462f52683838a3 (diff) |
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 13f37f9c70b9ae2e0d179830cded93a0a6f86494
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>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux')
-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) { |