Add support for KFD Thermal Throttling SMI event

Add handling for receiving thermal throttling SMI event from the
kernel.
Also, update the event notification test to work with the new event.

Change-Id: Ib89c12b244f90998ccbae0a38b37f25705d156e0
This commit is contained in:
Mukul Joshi authored and Mukul Joshi committed 2020-09-16 13:24:57 -04:00
1 szülő 406859ca8a
commit aff75c955f
4 files changed
+7 -4

No files matched your search

@@ -102,7 +102,7 @@ void TestEvtNotifReadWrite::Run(void) {
rsmi_evt_notification_type_t evt_type = RSMI_EVT_NOTIF_FIRST;
uint64_t mask = RSMI_EVENT_MASK_FROM_INDEX(evt_type);
while (evt_type != RSMI_EVT_NOTIF_LAST) {
while (evt_type <= RSMI_EVT_NOTIF_LAST) {
mask |= RSMI_EVENT_MASK_FROM_INDEX(evt_type);
evt_type = static_cast<rsmi_evt_notification_type_t>(
static_cast<uint32_t>(evt_type)+1);
@@ -80,6 +80,7 @@ NameFromFWEnum(rsmi_fw_block_t blk) {
static const std::map<rsmi_evt_notification_type_t, const char *>
kEvtNotifEvntNameMap = {
{RSMI_EVT_NOTIF_VMFAULT, "RSMI_EVT_NOTIF_VMFAULT"},
{RSMI_EVT_NOTIF_THERMAL_THROTTLE, "RSMI_EVT_NOTIF_THERMAL_THROTTLE"},
};
const char *
NameFromEvtNotifType(rsmi_evt_notification_type_t evt) {