mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: fix channel status verify sequence
While unbindin a channel from TSG, we first disable all the channels, then examine the status of channel being removed in gk20a_fifo_tsg_unbind_channel_verify_status(), and if this API fails we re-enable all the channel and kill whole TSG And in gk20a_fifo_tsg_unbind_channel_verify_status() we first check ctx_reload and fault status and then check NEXT status If channel has NEXT set we bail out But since we have already changed the TSG ctx_reload status re-enabling all channels in TSG might cause issues Hence fix this by correcting sequence so that we first ensure that NEXT is not set on channel and then only alter the status Bug 200327095 Change-Id: I4f0786bc507fad5462d4cdd8d0ca91ea611ee3b5 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1575905 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
e02d14e754
commit
6de92de60b
@@ -1912,18 +1912,18 @@ int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch)
|
||||
{
|
||||
struct gk20a *g = ch->g;
|
||||
|
||||
if (g->ops.fifo.tsg_verify_status_ctx_reload)
|
||||
g->ops.fifo.tsg_verify_status_ctx_reload(ch);
|
||||
|
||||
if (g->ops.fifo.tsg_verify_status_faulted)
|
||||
g->ops.fifo.tsg_verify_status_faulted(ch);
|
||||
|
||||
if (gk20a_fifo_channel_status_is_next(g, ch->chid)) {
|
||||
nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!",
|
||||
ch->chid, ch->tsgid);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (g->ops.fifo.tsg_verify_status_ctx_reload)
|
||||
g->ops.fifo.tsg_verify_status_ctx_reload(ch);
|
||||
|
||||
if (g->ops.fifo.tsg_verify_status_faulted)
|
||||
g->ops.fifo.tsg_verify_status_faulted(ch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user