From 2cd3f6565e5c87c18033f0217071eefa2c2894bf Mon Sep 17 00:00:00 2001 From: Marko Oblak Date: Thu, 20 Jul 2023 15:56:53 +0200 Subject: [PATCH] SWDEV-410048 - Remove --caps from tool Signed-off-by: Marko Oblak Change-Id: I3b71c8210401cbbe28905371febe084a4fdaf4ba [ROCm/amdsmi commit: 9077411fcb8001076786503b6e648e4705062c92] --- projects/amdsmi/amdsmi_cli/README.md | 1 - projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 15 +++++---------- projects/amdsmi/amdsmi_cli/amdsmi_helpers.py | 12 ------------ projects/amdsmi/amdsmi_cli/amdsmi_parser.py | 2 -- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/README.md b/projects/amdsmi/amdsmi_cli/README.md index a823bd804b..86e35b2914 100644 --- a/projects/amdsmi/amdsmi_cli/README.md +++ b/projects/amdsmi/amdsmi_cli/README.md @@ -146,7 +146,6 @@ Static Arguments: -V, --vbios All video bios information (if available) -l, --limit All limit metric values (i.e. power and thermal limits) -d, --driver Displays driver version - -c, --caps All caps information -r, --ras Displays RAS features information -B, --board All board information -u, --numa All numa node information diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 9cb2b1226b..124d369300 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -138,7 +138,7 @@ class AMDSMICommands(): def static(self, args, multiple_devices=False, gpu=None, asic=None, - bus=None, vbios=None, limit=None, driver=None, caps=None, + bus=None, vbios=None, limit=None, driver=None, ras=None, board=None, numa=None): """Get Static information for target gpu @@ -151,7 +151,6 @@ class AMDSMICommands(): vbios (bool, optional): Value override for args.vbios. Defaults to None. limit (bool, optional): Value override for args.limit. Defaults to None. driver (bool, optional): Value override for args.driver. Defaults to None. - caps (bool, optional): Value override for args.caps. Defaults to None. ras (bool, optional): Value override for args.ras. Defaults to None. board (bool, optional): Value override for args.board. Defaults to None. numa (bool, optional): Value override for args.numa. Defaults to None. @@ -173,8 +172,6 @@ class AMDSMICommands(): args.vbios = vbios if driver: args.driver = driver - if caps: - args.caps = caps if numa: args.numa = numa if self.helpers.is_linux() and self.helpers.is_baremetal(): @@ -197,11 +194,11 @@ class AMDSMICommands(): # If all arguments are False, it means that no argument was passed and the entire static should be printed if self.helpers.is_linux() and self.helpers.is_baremetal(): - if not any([args.asic, args.bus, args.vbios, args.limit, args.driver, args.caps, args.ras, args.board]): - args.asic = args.bus = args.vbios = args.limit = args.driver = args.caps = args.ras = args.board = args.numa = self.all_arguments = True + if not any([args.asic, args.bus, args.vbios, args.limit, args.driver, args.ras, args.board]): + args.asic = args.bus = args.vbios = args.limit = args.driver = args.ras = args.board = args.numa = self.all_arguments = True if self.helpers.is_linux() and self.helpers.is_virtual_os(): - if not any([args.asic, args.bus, args.vbios, args.driver, args.caps]): - args.asic = args.bus = args.vbios = args.driver = args.caps = self.all_arguments = True + if not any([args.asic, args.bus, args.vbios, args.driver]): + args.asic = args.bus = args.vbios = args.driver = self.all_arguments = True static_dict = {} @@ -340,8 +337,6 @@ class AMDSMICommands(): static_dict['ras'] = e.get_error_info() if not self.all_arguments: raise e - if args.caps: - pass if (self.helpers.is_linux() and self.helpers.is_baremetal()): if args.numa: try: diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py b/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py index 3bb0f1cce2..f5df6c72db 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py @@ -387,18 +387,6 @@ class AMDSMIHelpers(): return False, profile_presets.values() - def has_ras_support(self, device_handle): - try: - caps_info = amdsmi_interface.amdsmi_get_caps_info(device_handle) - - if caps_info['ras_supported']: - return True - else: - return False - except amdsmi_exception.AmdSmiLibraryException: - return False - - def convert_bytes_to_readable(self, bytes_input): for unit in ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB"]: if abs(bytes_input) < 1024: diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py index 4c52a0e5d6..bdbe10f5d4 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py @@ -294,7 +294,6 @@ class AMDSMIParser(argparse.ArgumentParser): vbios_help = "All video bios information (if available)" limit_help = "All limit metric values (i.e. power and thermal limits)" driver_help = "Displays driver version" - caps_help = "All caps information" # Options arguments help text for Hypervisors and Baremetal ras_help = "Displays RAS features information" @@ -321,7 +320,6 @@ class AMDSMIParser(argparse.ArgumentParser): static_parser.add_argument('-b', '--bus', action='store_true', required=False, help=bus_help) static_parser.add_argument('-V', '--vbios', action='store_true', required=False, help=vbios_help) static_parser.add_argument('-d', '--driver', action='store_true', required=False, help=driver_help) - static_parser.add_argument('-c', '--caps', action='store_true', required=False, help=caps_help) # Options to display on Hypervisors and Baremetal if self.helpers.is_hypervisor() or self.helpers.is_baremetal():