-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix init type coexistence and fix init recursion error
Signed-off-by: Neil R. Spruit <[email protected]>
- Loading branch information
Showing
6 changed files
with
172 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
/* | ||
* | ||
* Copyright (C) 2024 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "ze_ddi.h" | ||
#include "zet_ddi.h" | ||
#include "zes_ddi.h" | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Function-pointer for zesDeviceEnumActiveVFExp | ||
typedef ze_result_t (ZE_APICALL *zes_pfnDeviceEnumActiveVFExp_t)( | ||
zes_device_handle_t, | ||
uint32_t*, | ||
zes_vf_handle_t* | ||
); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Table of DeviceExp functions pointers | ||
typedef struct _zes_device_exp_dditable_compat_t | ||
{ | ||
zes_pfnDeviceGetSubDevicePropertiesExp_t pfnGetSubDevicePropertiesExp; | ||
zes_pfnDeviceEnumActiveVFExp_t pfnEnumActiveVFExp; | ||
zes_pfnDeviceEnumEnabledVFExp_t pfnEnumEnabledVFExp; | ||
} zes_device_exp_dditable_compat_t; | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Virtual function utilization flag bit fields | ||
typedef uint32_t zes_vf_info_util_exp_flags_t; | ||
typedef enum _zes_vf_info_util_exp_flag_t | ||
{ | ||
ZES_VF_INFO_UTIL_EXP_FLAG_INFO_NONE = ZE_BIT(0), ///< No info associated with virtual function | ||
ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_CPU = ZE_BIT(1), ///< System memory utilization associated with virtual function | ||
ZES_VF_INFO_UTIL_EXP_FLAG_INFO_MEM_GPU = ZE_BIT(2), ///< Device memory utilization associated with virtual function | ||
ZES_VF_INFO_UTIL_EXP_FLAG_INFO_ENGINE = ZE_BIT(3), ///< Engine utilization associated with virtual function | ||
ZES_VF_INFO_UTIL_EXP_FLAG_FORCE_UINT32 = 0x7fffffff | ||
|
||
} zes_vf_info_util_exp_flag_t; | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Virtual function management properties | ||
typedef struct _zes_vf_exp_properties_t | ||
{ | ||
zes_structure_type_t stype; ///< [in] type of this structure | ||
void* pNext; ///< [in,out][optional] must be null or a pointer to an extension-specific | ||
///< structure (i.e. contains stype and pNext). | ||
zes_pci_address_t address; ///< [out] Virtual function BDF address | ||
zes_uuid_t uuid; ///< [out] universal unique identifier of the device | ||
zes_vf_info_util_exp_flags_t flags; ///< [out] utilization flags available. May be 0 or a valid combination of | ||
///< ::zes_vf_info_util_exp_flag_t. | ||
|
||
} zes_vf_exp_properties_t; | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Function-pointer for zesVFManagementGetVFPropertiesExp | ||
typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementGetVFPropertiesExp_t)( | ||
zes_vf_handle_t, | ||
zes_vf_exp_properties_t* | ||
); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Function-pointer for zesVFManagementSetVFTelemetryModeExp | ||
typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementSetVFTelemetryModeExp_t)( | ||
zes_vf_handle_t, | ||
zes_vf_info_util_exp_flags_t, | ||
ze_bool_t | ||
); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Function-pointer for zesVFManagementSetVFTelemetrySamplingIntervalExp | ||
typedef ze_result_t (ZE_APICALL *zes_pfnVFManagementSetVFTelemetrySamplingIntervalExp_t)( | ||
zes_vf_handle_t, | ||
zes_vf_info_util_exp_flags_t, | ||
uint64_t | ||
); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Table of VFManagementExp functions pointers | ||
typedef struct _zes_vf_management_exp_dditable_compat_t | ||
{ | ||
zes_pfnVFManagementGetVFCapabilitiesExp_t pfnGetVFCapabilitiesExp; | ||
zes_pfnVFManagementGetVFPropertiesExp_t pfnGetVFPropertiesExp; | ||
zes_pfnVFManagementGetVFMemoryUtilizationExp_t pfnGetVFMemoryUtilizationExp; | ||
zes_pfnVFManagementGetVFEngineUtilizationExp_t pfnGetVFEngineUtilizationExp; | ||
zes_pfnVFManagementSetVFTelemetryModeExp_t pfnSetVFTelemetryModeExp; | ||
zes_pfnVFManagementSetVFTelemetrySamplingIntervalExp_t pfnSetVFTelemetrySamplingIntervalExp; | ||
} zes_vf_management_exp_dditable_compat_t; | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Function-pointer for zetMetricGroupCreateExp | ||
typedef ze_result_t (ZE_APICALL *zet_pfnMetricGroupCreateExp_t)( | ||
zet_device_handle_t, | ||
const char*, | ||
const char*, | ||
zet_metric_group_sampling_type_flags_t, | ||
zet_metric_group_handle_t* | ||
); | ||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Table of MetricGroupExp functions pointers | ||
typedef struct _zet_metric_group_exp_dditable_compat_t | ||
{ | ||
zet_pfnMetricGroupCalculateMultipleMetricValuesExp_t pfnCalculateMultipleMetricValuesExp; | ||
zet_pfnMetricGroupGetGlobalTimestampsExp_t pfnGetGlobalTimestampsExp; | ||
zet_pfnMetricGroupGetExportDataExp_t pfnGetExportDataExp; | ||
zet_pfnMetricGroupCalculateMetricExportDataExp_t pfnCalculateMetricExportDataExp; | ||
zet_pfnMetricGroupCreateExp_t pfnCreateExp; | ||
zet_pfnMetricGroupAddMetricExp_t pfnAddMetricExp; | ||
zet_pfnMetricGroupRemoveMetricExp_t pfnRemoveMetricExp; | ||
zet_pfnMetricGroupCloseExp_t pfnCloseExp; | ||
zet_pfnMetricGroupDestroyExp_t pfnDestroyExp; | ||
} zet_metric_group_exp_dditable_compat_t; | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Container for all DDI tables | ||
typedef struct _zes_dditable_compat_t | ||
{ | ||
zes_global_dditable_t Global; | ||
zes_device_dditable_t Device; | ||
zes_device_exp_dditable_compat_t DeviceExp; | ||
zes_driver_dditable_t Driver; | ||
zes_driver_exp_dditable_t DriverExp; | ||
zes_overclock_dditable_t Overclock; | ||
zes_scheduler_dditable_t Scheduler; | ||
zes_performance_factor_dditable_t PerformanceFactor; | ||
zes_power_dditable_t Power; | ||
zes_frequency_dditable_t Frequency; | ||
zes_engine_dditable_t Engine; | ||
zes_standby_dditable_t Standby; | ||
zes_firmware_dditable_t Firmware; | ||
zes_firmware_exp_dditable_t FirmwareExp; | ||
zes_memory_dditable_t Memory; | ||
zes_fabric_port_dditable_t FabricPort; | ||
zes_temperature_dditable_t Temperature; | ||
zes_psu_dditable_t Psu; | ||
zes_fan_dditable_t Fan; | ||
zes_led_dditable_t Led; | ||
zes_ras_dditable_t Ras; | ||
zes_ras_exp_dditable_t RasExp; | ||
zes_diagnostics_dditable_t Diagnostics; | ||
zes_vf_management_exp_dditable_compat_t VFManagementExp; | ||
} zes_dditable_compat_t; | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
/// @brief Container for all DDI tables | ||
typedef struct _zet_dditable_compat_t | ||
{ | ||
zet_metric_programmable_exp_dditable_t MetricProgrammableExp; | ||
zet_metric_tracer_exp_dditable_t MetricTracerExp; | ||
zet_metric_decoder_exp_dditable_t MetricDecoderExp; | ||
zet_device_dditable_t Device; | ||
zet_device_exp_dditable_t DeviceExp; | ||
zet_context_dditable_t Context; | ||
zet_command_list_dditable_t CommandList; | ||
zet_module_dditable_t Module; | ||
zet_kernel_dditable_t Kernel; | ||
zet_metric_dditable_t Metric; | ||
zet_metric_exp_dditable_t MetricExp; | ||
zet_metric_group_dditable_t MetricGroup; | ||
zet_metric_group_exp_dditable_compat_t MetricGroupExp; | ||
zet_metric_streamer_dditable_t MetricStreamer; | ||
zet_metric_query_pool_dditable_t MetricQueryPool; | ||
zet_metric_query_dditable_t MetricQuery; | ||
zet_tracer_exp_dditable_t TracerExp; | ||
zet_debug_dditable_t Debug; | ||
} zet_dditable_compat_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters