oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
218 stars 96 forks source link

zes_fan_config_t doesn't contain a proper speed table configuration #45

Closed aquaxp closed 3 years ago

aquaxp commented 3 years ago

zesFanGetConfig callback is intended to return the fan configuration and in case if the fan is configured for work with table - speedTable field should contain array of temperature/speed pairs, not a single one.

In current form of spec speedTable field in zes_fan_config_t is representing "A table containing temperature/speed pairs", but that's obviously not true because used type - zes_fan_temp_speed_t is represent only single temperature/speed pair, it's not an array. To match logic, speedTable should be at least a literally array - which means that it still need to change it's type from zes_fan_temp_speed_t to zes_fan_temp_speed_t[]. The proper a data structure that will contain not only array of temperature/speed pairs, but also information how many of them are defined is zes_fan_speed_table_t.

I've created a pull request to update API - #44, but since corresponding change should be done in spec itself first, I 'm going to close PR and track this problem as an issue as suggested by @bmyates.

bmyates commented 3 years ago

@aquaxp This type was changed from zes_fan_temp_speed_t to zes_fan_speed_table_t in the 1.1 API update. Can you please verify the current code matches your expectations?

aquaxp commented 3 years ago

@bmyates Yes, that match an expectations from API call. Thank you for fixing that!