mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +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
@@ -839,6 +839,7 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g,
|
||||
int err = 0;
|
||||
u32 id = FIFO_INVAL_TSG_ID;
|
||||
unsigned int rc_type = RC_TYPE_NO_RC;
|
||||
struct tsg_gk20a *tsg = NULL;
|
||||
|
||||
if (!mmfault->valid) {
|
||||
return;
|
||||
@@ -912,14 +913,17 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g,
|
||||
mmfault->refch->mmu_nack_handled = true;
|
||||
}
|
||||
|
||||
rc_type = RC_TYPE_MMU_FAULT;
|
||||
if (gk20a_is_channel_marked_as_tsg(mmfault->refch)) {
|
||||
tsg = tsg_gk20a_from_ch(mmfault->refch);
|
||||
if (tsg != NULL) {
|
||||
id = mmfault->refch->tsgid;
|
||||
if (id != FIFO_INVAL_TSG_ID) {
|
||||
id_type = ID_TYPE_TSG;
|
||||
}
|
||||
id_type = ID_TYPE_TSG;
|
||||
rc_type = RC_TYPE_MMU_FAULT;
|
||||
} else {
|
||||
nvgpu_err(g, "bare channels not supported");
|
||||
nvgpu_err(g, "chid: %d is referenceable but "
|
||||
"not bound to tsg",
|
||||
mmfault->refch->chid);
|
||||
id_type = ID_TYPE_CHANNEL;
|
||||
rc_type = RC_TYPE_NO_RC;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user