mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: tear down TSG on unbind HAL failure
Currently nvgpu_tsg_unbind ignores return code from g->ops.tsg.unbind_channel. For consistency, tear down TSG in case an error occurs in the unbind HAL. Also make sure to restore valid ops for fifo.preempt_tsg in test_gr_setup_free_obj_ctx, to avoid unbind failure. Jira NVGPU-4387 Change-Id: I27a9c0daa365d05684149fc4bb17874d60ae1fde Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2248159 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
1865b2804b
commit
1fc9a427e0
@@ -602,13 +602,13 @@ int test_gr_setup_free_obj_ctx(struct unit_module *m,
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
/* Restore valid ops for negative tests */
|
||||
gr_setup_restore_valid_ops(g);
|
||||
|
||||
err = gr_test_setup_unbind_tsg(m, g);
|
||||
|
||||
gr_test_setup_cleanup_ch_tsg(m, g);
|
||||
|
||||
/* Restore valid ops for negative tests */
|
||||
gr_setup_restore_valid_ops(g);
|
||||
|
||||
return (err == 0) ? UNIT_SUCCESS: UNIT_FAIL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user