nvgpu: check if unbound tsg in timeslice/interleave

in set_timeslice/set_interleave, the TSG may not have
been bound yet; if so, just return after saving the
new values.

Bug 2661079

Change-Id: I4fb915674d2bc45c062dbd10b942408800f6f2a5
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2161683
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Peter Daifuku
2019-07-25 20:55:39 -07:00
committed by mobile promotions
parent 715f29ea9f
commit 5a08b51559

View File

@@ -553,6 +553,11 @@ int nvgpu_tsg_set_interleave(struct nvgpu_tsg *tsg, u32 level)
tsg->interleave_level = level;
/* TSG may not be bound yet */
if (tsg->runlist_id == NVGPU_INVALID_RUNLIST_ID) {
return 0;
}
return g->ops.runlist.reload(g, tsg->runlist_id, true, true);
}
@@ -570,6 +575,11 @@ int nvgpu_tsg_set_timeslice(struct nvgpu_tsg *tsg, u32 timeslice_us)
tsg->timeslice_us = timeslice_us;
/* TSG may not be bound yet */
if (tsg->runlist_id == NVGPU_INVALID_RUNLIST_ID) {
return 0;
}
return g->ops.runlist.reload(g, tsg->runlist_id, true, true);
}