Commit Graph

31 Commits

Author SHA1 Message Date
Dalibor Stanisavljevic ed8f865341 Revert "Adjusted folder naming and moved amdsmi_cli into amdsmi project folder"
This reverts commit 3eadf3a216
because build failed

Change-Id: Id9efa22f3e1167e1b1bb235b449aef60256c0e24
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-19 15:40:28 +01:00
Maisam Arif 3eadf3a216 Adjusted folder naming and moved amdsmi_cli into amdsmi project folder
Change-Id: I4b7c42161fc92450f496483e5b49c7def6810437
2023-01-18 08:47:38 -06:00
Jason Albert 86de0f441f Remove tag values from enum/union/struct declarations
The tag values largely were not used and were causing doxygen
generation issues.
In the few cases where the tags were being referenced, clean up
those compile issues.

Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I7b32eac742fb5af560400c13dda2721705d882bc
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-16 13:14:45 +01:00
Dalibor Stanisavljevic bbcbe896ea SWDEV-375113 - Updated python wrapper
Change-Id: I779cd5d7ff3f3ca231d1fd90dcedcc070540e6e3
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-16 12:24:38 +01:00
Dalibor Stanisavljevic 4caded6dc4 SWDEV-376644 - Renamed usage to engine_usage
Change-Id: Icaac74800e30c1769a491ef190359490aba757b7
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-12 15:58:29 +01:00
Bill(Shuzhou) Liu ec48312c61 Remove duplicate temperature function
The amdsmi_dev_get_temp_metric() will cover both function:
amdsmi_get_temperature_measure() using AMDSMI_TEMP_CURRENT
and
amdsmi_get_temperature_limit() using AMDSMI_TEMP_CRITICAL
Remove those two function.

It also merge the amdsmi_get_power_limit() into
amdsmi_get_power_measure()

Change-Id: I40d4afeb2ec0ac7b64832729f36adfaae120c990
2023-01-11 08:13:37 -06:00
Dalibor Stanisavljevic e217fff82c SWDEV-375181 - Fixed amdsmi_get_fw_info python output
Change-Id: I4bf4bf49cd921d52849e1bb140e464e2756b07c5
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-11 11:17:49 +01:00
Bill(Shuzhou) Liu 79bd9c1d5f change sensor_type in amdsmi_dev_get_temp_metric() to enum
The sensor_type in amdsmi_dev_get_temp_metric() will be changed to
amdsmi_temperature_type_t

Change-Id: I72a7f271b0a55a025acc2ca523062a3d51cc036d
2023-01-04 13:01:04 -06:00
Dalibor Stanisavljevic 9d345c5797 SWDEV-375271 - Renamed AmdSmiClockType to AmdSmiClkType
Change-Id: I6af34f7c4701584357ae5ec1315fbc425f2a9f82
2022-12-28 12:55:15 +01:00
Dalibor Stanisavljevic 0f7c440d95 SWDEV-373280 - Updated python wrapper
Use ctypes to import types instead of via amdsmi_wrapper

Change-Id: I217e90b74aafdd39eaab5f50edfda80e0bf91cce
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-28 10:21:54 +01:00
Dalibor Stanisavljevic 36eb2145d9 SWDEV-373280 - Added new generator
Change-Id: I82e3663f8118f17dc6a223a79cadd95634329356
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-27 10:14:09 +01:00
Dalibor Stanisavljevic cb013d25ff SWDEV-370502 - Reserved fields in structs
Change-Id: I23aed12baf6b3173eb149eb3b969e55d7e4360ee
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-26 10:51:44 -05:00
Dalibor Stanisavljevic 0bdd45e935 SWDEV-371492 - Updated python wrapper
Change-Id: I04f9f825ecdbe06de9ca95cf19e3f5bca972ec95
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-23 14:09:50 +01:00
Bill(Shuzhou) Liu 221d6fdc5c Make amdsmi function name consistent
Some of the amdsmi function have the verb (set or get) at the
end of the function. Move it to the middle to be consistent with
other APIs.

Change-Id: I8053d16f46af951c25aaaf8febf2896a33633fa1
2022-12-16 10:20:49 -06:00
Dalibor Stanisavljevic a80bbd308c SWDEV-371565 - Fixed retrieval FW versions in python and example
Change-Id: I4e512584a50342dcd4f9c93f523112fb4b5099dd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-14 13:06:41 +01:00
David Ceranic ab928f3be5 LWPVATS-4489 - [AMDSMI][LinuxBM] Implement smi-tool for calling rocm APIs using amdsmi wrapper
Signed-off-by: David Ceranic <David.Ceranic@amd.com>
Change-Id: I15900a6686e672291b2c0f9d54fd0b5b7e35e589
2022-12-09 16:16:41 +01:00
Dalibor Stanisavljevic b4b761d02f SWDEV-370223 - Change the name of the header to amdsmi.h
Change dev to device_handle throughout the file
Change the pcie_info pcie_speed field type to uint32_t
Add AMDSMI prefix before amdsmi_mm_ip enum

Change-Id: I242145389ddc3f2ad05dfd6ca371640f4d118fc4
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-08 13:34:34 +01:00
Dalibor Stanisavljevic fae4e1fc37 SWDEV-371210 - Fixed python_package command
Change-Id: Idf9e0cc23278caa0333ed26ad32450931d0d603b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-06 08:07:18 -05:00
Dalibor Stanisavljevic d62b399db6 SWDEV-361376 - Added check for input enum parameters
Change-Id: Ie2f9b1e7a6ddb2feadde85aa3b4772c73faf0064
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:38:45 -05:00
Dalibor Stanisavljevic d30683af50 SWDEV-367683 - Fixed amdsmi_get_fw_indo and amdsmi_get_device_type
Change-Id: Icf420104f60a2c5c724d993db8bd59adcce3692a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:38:33 -05:00
Dalibor Stanisavljevic 76f6cf7a9d SWDEV-366720 - Changed amdsmi_get_device_handle_from_bdf
Changed implementation and input parameters

Change-Id: Ifca3247132eb4033f99d74617a53f54ad076dad0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:28:45 -05:00
Dalibor Stanisavljevic 62154829b0 SWDEV-361376 - Added socket releated functions
Change-Id: Ib5984e9d85cbba95dfc153c0ed23dae04f5f9a46
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:23:04 -05:00
Dalibor Stanisavljevic 21d6e0f990 SWDEV-361376 - Updated python API
Added pcie, power and memory API

Change-Id: I0b3bd1c110099805c700f53974eceb6acd850930
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-14 12:55:30 +01:00
Dalibor Stanisavljevic 50133d44c2 SWDEV-361376 - Updated python API
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: I8d81154b27111b849dbb645e024ebf322299f851
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic cec429dbeb SWDEV-361376 - Added additional API calls to the python interface
- Added APIs for "Error Query"
- Added APIs for "System Information Query"

Change-Id: Idd0e8595c37b23025545f54428b824bf41544bb9
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic f9f792230e SWDEV-361376 - Added additional API calls to the python interface
- Added performance counter API calls
- Added part of unsupported functions in virtual env API calls
- README for both additions

Change-Id: I6fdf1fe83370975011fe4ec11c0b0ca2bab0a1b8
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 62a69fb802 SWDEV-361376 - Added API calls to the python interface
- Added Physical State Query API calls
- Added Clock, Power and Performance Query API calls
- README for both additions

Change-Id: Icf412364a13c9e51b9630f19f29a7cdfbe46f7fe
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 9cad9e5216 SWDEV-361376 - Add README for python tool
- Add up to date README file for python tool

Change-Id: I7a02f79469e990870398b3741b033ea447998fdd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 23160fa8e0 SWDEV-361376 - Add events to python interface
- Implement context manager event class for easier usage instead of having 4 different
  APIs.
- Add support for with statement for easier cleanup.

Change-Id: I396947a93d3f04efc068e17804eab12eefa97cf0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic a6efdd32ed SWDEV-361376 - Added additional API calls to the python interface
- Added APIs for "Supported Function Checks"
- Added first half of the APIs for "Unsupported Functions In Virtual Environment"

Change-Id: Ia83303e6b7ae65aada608bd9ca5f56fd33e4ef34
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dejan Andjelkovic 6064f160a3 SWDEV-361376 - Add python wrapper
- Add generator for python wrapper
- Add interface, exception and init files
- Add CMake custom targets

Change-Id: I63c1d94fbb587387c22f559a3db79987eb214a2e
Signed-off-by: Dejan Andjelkovic <Dejan.Andjelkovic@amd.com>
2022-10-20 09:24:53 -05:00