mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: unit: add verbose_lvl function
The verbose_lvl function allows a unit module to retrieve the current verbosity level (set by the -v args) and therefore use it to enable log masks as needed. JIRA NVGPU-2975 Change-Id: Ic41c9e962ca4fa9c0a6c130857f0df5b3b7215c7 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2085058 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Philip Elcan <pelcan@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:
committed by
mobile promotions
parent
993fbd085e
commit
88256dd9cc
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -59,5 +59,5 @@ struct unit_fw {
|
|||||||
|
|
||||||
int core_load_nvgpu(struct unit_fw *fw);
|
int core_load_nvgpu(struct unit_fw *fw);
|
||||||
int core_exec(struct unit_fw *fw);
|
int core_exec(struct unit_fw *fw);
|
||||||
|
int verbose_lvl(struct unit_module *module);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||||
|
|
||||||
__core_print_stdout
|
__core_print_stdout
|
||||||
__core_print_stderr
|
__core_print_stderr
|
||||||
__unit_info_color
|
__unit_info_color
|
||||||
|
verbose_lvl
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -213,3 +213,9 @@ err:
|
|||||||
closedir(load_dir);
|
closedir(load_dir);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the current verbosity level */
|
||||||
|
int verbose_lvl(struct unit_module *module)
|
||||||
|
{
|
||||||
|
return module->fw->args->verbose_lvl;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user