mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: remove code for ch not bound to tsg
- Remove handling for channels that are no more bound to tsg
as channel could be referenceable but no more part of a tsg
- Use tsg_gk20a_from_ch to get pointer to tsg for a given channel
- Clear unhandled gr interrupts
Bug 2429295
JIRA NVGPU-1580
Change-Id: I9da43a2bc9a0282c793b9f301eaf8e8604f91d70
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1972492
(cherry picked from commit 013ca60edd
in dev-kernel)
Reviewed-on: https://git-master.nvidia.com/r/2018262
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com>
Tested-by: Debarshi Dutta <ddutta@nvidia.com>
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
d975bda398
commit
c9d4df288d
@@ -164,28 +164,26 @@ int gk20a_enable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch)
|
||||
{
|
||||
struct tsg_gk20a *tsg;
|
||||
|
||||
if (gk20a_is_channel_marked_as_tsg(ch)) {
|
||||
tsg = &g->fifo.tsg[ch->tsgid];
|
||||
tsg = tsg_gk20a_from_ch(ch);
|
||||
if (tsg != NULL) {
|
||||
g->ops.fifo.enable_tsg(tsg);
|
||||
return 0;
|
||||
} else {
|
||||
g->ops.fifo.enable_channel(ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gk20a_disable_channel_tsg(struct gk20a *g, struct channel_gk20a *ch)
|
||||
{
|
||||
struct tsg_gk20a *tsg;
|
||||
|
||||
if (gk20a_is_channel_marked_as_tsg(ch)) {
|
||||
tsg = &g->fifo.tsg[ch->tsgid];
|
||||
tsg = tsg_gk20a_from_ch(ch);
|
||||
if (tsg != NULL) {
|
||||
g->ops.fifo.disable_tsg(tsg);
|
||||
return 0;
|
||||
} else {
|
||||
g->ops.fifo.disable_channel(ch);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void gk20a_channel_abort_clean_up(struct channel_gk20a *ch)
|
||||
@@ -238,19 +236,8 @@ void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt)
|
||||
|
||||
if (tsg != NULL) {
|
||||
return gk20a_fifo_abort_tsg(ch->g, tsg, channel_preempt);
|
||||
}
|
||||
|
||||
/* make sure new kickoffs are prevented */
|
||||
gk20a_channel_set_timedout(ch);
|
||||
|
||||
ch->g->ops.fifo.disable_channel(ch);
|
||||
|
||||
if (channel_preempt) {
|
||||
ch->g->ops.fifo.preempt_channel(ch->g, ch);
|
||||
}
|
||||
|
||||
if (ch->g->ops.fifo.ch_abort_clean_up) {
|
||||
ch->g->ops.fifo.ch_abort_clean_up(ch);
|
||||
} else {
|
||||
nvgpu_err(ch->g, "chid: %d is not bound to tsg", ch->chid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user