gpu: nvgpu: update .channel.enable/disable to use runlist_id and chid

Moving to use IDs rather than struct makes it reusable on server side.

Jira GVSCI-15770

Change-Id: Ibd94ab8c9f0492bd6d20243525905d637eb8de66
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2863438
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Richard Zhao
2023-02-24 10:58:13 -08:00
committed by mobile promotions
parent d9c8d317f0
commit c8d6a91de6
17 changed files with 83 additions and 62 deletions

View File

@@ -193,12 +193,11 @@ int nvgpu_tsg_validate_cilp_config(struct nvgpu_channel *ch)
void nvgpu_tsg_disable(struct nvgpu_tsg *tsg)
{
struct gk20a *g = tsg->g;
struct nvgpu_channel *ch;
nvgpu_rwsem_down_read(&tsg->ch_list_lock);
nvgpu_list_for_each_entry(ch, &tsg->ch_list, nvgpu_channel, ch_entry) {
g->ops.channel.disable(ch);
nvgpu_channel_disable(ch);
}
nvgpu_rwsem_up_read(&tsg->ch_list_lock);
}
@@ -639,7 +638,7 @@ static int nvgpu_tsg_unbind_channel_common(struct nvgpu_tsg *tsg,
/* another thread could have re-enabled the channel because it was
* still on the list at that time, so make sure it's truly disabled
*/
g->ops.channel.disable(ch);
nvgpu_channel_disable(ch);
nvgpu_rwsem_up_write(&tsg->ch_list_lock);
/*