├── tests ├── data │ ├── vega56 │ │ ├── irq │ │ ├── boot_vga │ │ ├── enable │ │ ├── msi_bus │ │ ├── ari_enabled │ │ ├── class │ │ ├── d3cold_allowed │ │ ├── device │ │ ├── dma_mask_bits │ │ ├── hwmon │ │ │ └── hwmon4 │ │ │ │ ├── uevent │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_min │ │ │ │ ├── fan1_target │ │ │ │ ├── in0_input │ │ │ │ ├── name │ │ │ │ ├── pwm1_enable │ │ │ │ ├── pwm1_max │ │ │ │ ├── pwm1_min │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_label │ │ │ │ ├── power1_cap_min │ │ │ │ ├── power1_label │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp1_label │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── temp3_label │ │ │ │ ├── freq1_input │ │ │ │ ├── freq2_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_crit_hyst │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_crit_hyst │ │ │ │ ├── temp3_emergency │ │ │ │ ├── power1_cap_default │ │ │ │ └── power1_cap_max │ │ ├── link │ │ │ ├── l0s_aspm │ │ │ └── l1_aspm │ │ ├── numa_node │ │ ├── pcie_bw │ │ ├── power │ │ │ ├── control │ │ │ ├── wakeup │ │ │ ├── wakeup_active │ │ │ ├── wakeup_count │ │ │ ├── autosuspend_delay_ms │ │ │ ├── wakeup_abort_count │ │ │ ├── wakeup_active_count │ │ │ ├── wakeup_expire_count │ │ │ ├── wakeup_last_time_ms │ │ │ ├── wakeup_max_time_ms │ │ │ ├── runtime_active_time │ │ │ ├── runtime_status │ │ │ ├── runtime_suspended_time │ │ │ └── wakeup_total_time_ms │ │ ├── power_state │ │ ├── pp_cur_state │ │ ├── pp_force_state │ │ ├── pp_mclk_od │ │ ├── pp_sclk_od │ │ ├── product_name │ │ ├── product_number │ │ ├── reset_method │ │ ├── revision │ │ ├── serial_number │ │ ├── vendor │ │ ├── current_link_width │ │ ├── gpu_busy_percent │ │ ├── local_cpulist │ │ ├── local_cpus │ │ ├── max_link_width │ │ ├── pcie_replay_count │ │ ├── broken_parity_status │ │ ├── driver_override │ │ ├── mem_info_gtt_used │ │ ├── mem_info_preempt_used │ │ ├── mem_info_vram_vendor │ │ ├── subsystem_device │ │ ├── subsystem_vendor │ │ ├── consistent_dma_mask_bits │ │ ├── max_link_speed │ │ ├── mem_info_gtt_total │ │ ├── mem_info_vis_vram_used │ │ ├── mem_info_vram_total │ │ ├── mem_info_vram_used │ │ ├── power_dpm_state │ │ ├── vbios_version │ │ ├── current_link_speed │ │ ├── mem_info_vis_vram_total │ │ ├── resource0_resize │ │ ├── resource2_resize │ │ ├── power_dpm_force_performance_level │ │ ├── pp_dpm_pcie │ │ ├── pp_num_states │ │ ├── modalias │ │ ├── pp_dpm_dcefclk │ │ ├── pp_dpm_mclk │ │ ├── pp_table │ │ ├── thermal_throttling_logging │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_sclk │ │ ├── aer_dev_correctable │ │ ├── uevent │ │ ├── aer_dev_fatal │ │ ├── aer_dev_nonfatal │ │ ├── pp_power_profile_mode │ │ ├── pp_od_clk_voltage │ │ ├── resource │ │ └── pp_features │ ├── rx580 │ │ ├── boot_vga │ │ ├── enable │ │ ├── numa_node │ │ ├── pp_mclk_od │ │ ├── pp_sclk_od │ │ ├── ari_enabled │ │ ├── class │ │ ├── d3cold_allowed │ │ ├── device │ │ ├── dma_mask_bits │ │ ├── hwmon │ │ │ └── hwmon4 │ │ │ │ ├── uevent │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_min │ │ │ │ ├── in0_input │ │ │ │ ├── name │ │ │ │ ├── pwm1_enable │ │ │ │ ├── pwm1_max │ │ │ │ ├── pwm1_min │ │ │ │ ├── fan1_target │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_label │ │ │ │ ├── power1_cap_min │ │ │ │ ├── power1_label │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp1_label │ │ │ │ ├── freq1_input │ │ │ │ ├── freq2_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap │ │ │ │ ├── power1_cap_max │ │ │ │ ├── temp1_crit_hyst │ │ │ │ └── power1_cap_default │ │ ├── max_link_width │ │ ├── power_state │ │ ├── pp_cur_state │ │ ├── pp_force_state │ │ ├── product_name │ │ ├── product_number │ │ ├── reset_method │ │ ├── revision │ │ ├── serial_number │ │ ├── vendor │ │ ├── broken_parity_status │ │ ├── current_link_width │ │ ├── driver_override │ │ ├── gpu_busy_percent │ │ ├── local_cpulist │ │ ├── local_cpus │ │ ├── mem_busy_percent │ │ ├── pcie_bw │ │ ├── pcie_replay_count │ │ ├── consistent_dma_mask_bits │ │ ├── mem_info_gtt_used │ │ ├── mem_info_preempt_used │ │ ├── power_dpm_state │ │ ├── subsystem_device │ │ ├── subsystem_vendor │ │ ├── current_link_speed │ │ ├── max_link_speed │ │ ├── mem_info_gtt_total │ │ ├── mem_info_vis_vram_used │ │ ├── mem_info_vram_total │ │ ├── mem_info_vram_used │ │ ├── mem_info_vram_vendor │ │ ├── vbios_version │ │ ├── mem_info_vis_vram_total │ │ ├── power_dpm_force_performance_level │ │ ├── pp_dpm_pcie │ │ ├── pp_num_states │ │ ├── pp_dpm_mclk │ │ ├── modalias │ │ ├── pp_table │ │ ├── pp_dpm_sclk │ │ ├── uevent │ │ ├── pp_od_clk_voltage │ │ ├── resource │ │ └── pp_power_profile_mode │ ├── rx7600s │ │ ├── hwmon │ │ │ └── hwmon5 │ │ │ │ ├── uevent │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_min │ │ │ │ ├── in0_input │ │ │ │ ├── name │ │ │ │ ├── pwm1_max │ │ │ │ ├── pwm1_min │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_target │ │ │ │ ├── freq1_input │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_label │ │ │ │ ├── power1_label │ │ │ │ ├── pwm1_enable │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp1_label │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── temp3_label │ │ │ │ ├── freq2_input │ │ │ │ ├── power │ │ │ │ ├── control │ │ │ │ ├── runtime_active_time │ │ │ │ ├── runtime_status │ │ │ │ └── runtime_suspended_time │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_emergency │ │ │ │ ├── power1_cap_default │ │ │ │ ├── power1_cap_max │ │ │ │ ├── power1_cap_min │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp2_crit_hyst │ │ │ │ └── temp3_crit_hyst │ │ ├── pp_cur_state │ │ ├── pp_force_state │ │ ├── vendor │ │ ├── current_link_width │ │ ├── gpu_busy_percent │ │ ├── mem_info_vram_vendor │ │ ├── current_link_speed │ │ ├── vbios_version │ │ ├── power_dpm_force_performance_level │ │ ├── pp_num_states │ │ ├── pp_dpm_sclk │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_mclk │ │ ├── pp_dpm_pcie │ │ ├── pp_table │ │ ├── gpu_metrics │ │ ├── uevent │ │ ├── pp_features │ │ └── pp_power_profile_mode │ ├── rx7700s │ │ ├── pp_cur_state │ │ ├── pp_force_state │ │ ├── vendor │ │ ├── current_link_width │ │ ├── gpu_busy_percent │ │ ├── hwmon │ │ │ └── hwmon9 │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_min │ │ │ │ ├── in0_input │ │ │ │ ├── name │ │ │ │ ├── pwm1_max │ │ │ │ ├── pwm1_min │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_target │ │ │ │ ├── freq1_input │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_label │ │ │ │ ├── power1_label │ │ │ │ ├── pwm1_enable │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp1_label │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── temp3_label │ │ │ │ ├── freq2_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_emergency │ │ │ │ ├── power1_cap_max │ │ │ │ ├── power1_cap_min │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp2_crit_hyst │ │ │ │ ├── temp3_crit_hyst │ │ │ │ └── power1_cap_default │ │ ├── current_link_speed │ │ ├── vbios_version │ │ ├── pp_num_states │ │ ├── pp_dpm_sclk │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_mclk │ │ ├── pp_dpm_pcie │ │ ├── pp_table │ │ ├── uevent │ │ ├── pp_features │ │ └── pp_power_profile_mode │ ├── rx7800xt │ │ ├── pp_cur_state │ │ ├── vendor │ │ ├── gpu_busy_percent │ │ ├── hwmon │ │ │ └── hwmon4 │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_min │ │ │ │ ├── pwm1_min │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_target │ │ │ │ ├── freq1_input │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_input │ │ │ │ ├── in0_label │ │ │ │ ├── power1_label │ │ │ │ ├── pwm1_enable │ │ │ │ ├── pwm1_max │ │ │ │ ├── temp1_label │ │ │ │ ├── temp3_label │ │ │ │ ├── freq2_input │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap_max │ │ │ │ ├── power1_cap_min │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_crit_hyst │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp3_crit_hyst │ │ │ │ ├── temp3_emergency │ │ │ │ └── power1_cap_default │ │ ├── pp_force_state │ │ ├── current_link_width │ │ ├── current_link_speed │ │ ├── vbios_version │ │ ├── pp_num_states │ │ ├── pp_dpm_sclk │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_mclk │ │ ├── gpu_od │ │ │ └── fan_ctrl │ │ │ │ ├── fan_minimum_pwm │ │ │ │ ├── fan_zero_rpm_enable │ │ │ │ ├── fan_target_temperature │ │ │ │ ├── acoustic_limit_rpm_threshold │ │ │ │ ├── acoustic_target_rpm_threshold │ │ │ │ └── fan_curve │ │ ├── pp_dpm_pcie │ │ ├── pp_table │ │ ├── uevent │ │ ├── pp_od_clk_voltage │ │ ├── pp_power_profile_mode │ │ └── pp_features │ ├── rx7900xt │ │ ├── pp_cur_state │ │ ├── vendor │ │ ├── gpu_busy_percent │ │ ├── hwmon │ │ │ └── hwmon8 │ │ │ │ ├── pwm1 │ │ │ │ ├── fan1_min │ │ │ │ ├── pwm1_min │ │ │ │ ├── fan1_enable │ │ │ │ ├── fan1_input │ │ │ │ ├── fan1_max │ │ │ │ ├── fan1_target │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_input │ │ │ │ ├── in0_label │ │ │ │ ├── power1_label │ │ │ │ ├── pwm1_enable │ │ │ │ ├── pwm1_max │ │ │ │ ├── temp1_label │ │ │ │ ├── temp3_label │ │ │ │ ├── freq1_input │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── freq2_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap_max │ │ │ │ ├── power1_cap_min │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_crit_hyst │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp3_crit_hyst │ │ │ │ ├── temp3_emergency │ │ │ │ └── power1_cap_default │ │ ├── pp_force_state │ │ ├── current_link_width │ │ ├── current_link_speed │ │ ├── vbios_version │ │ ├── pp_num_states │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_sclk │ │ ├── pp_dpm_mclk │ │ ├── gpu_od │ │ │ └── fan_ctrl │ │ │ │ ├── fan_minimum_pwm │ │ │ │ ├── fan_target_temperature │ │ │ │ ├── acoustic_limit_rpm_threshold │ │ │ │ ├── acoustic_target_rpm_threshold │ │ │ │ └── fan_curve │ │ ├── pp_dpm_pcie │ │ ├── pp_table │ │ ├── uevent │ │ ├── pp_od_clk_voltage │ │ ├── pp_power_profile_mode │ │ └── pp_features │ ├── rx9070xt │ │ ├── pp_cur_state │ │ ├── vendor │ │ ├── gpu_busy_percent │ │ ├── hwmon │ │ │ └── hwmon3 │ │ │ │ ├── uevent │ │ │ │ ├── name │ │ │ │ ├── freq1_label │ │ │ │ ├── freq2_label │ │ │ │ ├── in0_input │ │ │ │ ├── in0_label │ │ │ │ ├── power1_cap_min │ │ │ │ ├── power1_label │ │ │ │ ├── temp1_label │ │ │ │ ├── temp3_label │ │ │ │ ├── freq1_input │ │ │ │ ├── freq2_input │ │ │ │ ├── power │ │ │ │ ├── control │ │ │ │ ├── runtime_active_time │ │ │ │ ├── runtime_suspended_time │ │ │ │ └── runtime_status │ │ │ │ ├── power1_cap │ │ │ │ ├── temp1_crit │ │ │ │ ├── temp1_input │ │ │ │ ├── temp2_crit │ │ │ │ ├── temp2_input │ │ │ │ ├── temp2_label │ │ │ │ ├── temp3_crit │ │ │ │ ├── temp3_input │ │ │ │ ├── power1_average │ │ │ │ ├── power1_cap_max │ │ │ │ ├── temp1_crit_hyst │ │ │ │ ├── temp1_emergency │ │ │ │ ├── temp2_crit_hyst │ │ │ │ ├── temp2_emergency │ │ │ │ ├── temp3_crit_hyst │ │ │ │ ├── temp3_emergency │ │ │ │ └── power1_cap_default │ │ ├── pp_force_state │ │ ├── current_link_width │ │ ├── current_link_speed │ │ ├── vbios_version │ │ ├── power_dpm_force_performance_level │ │ ├── pp_num_states │ │ ├── pp_dpm_socclk │ │ ├── pp_dpm_sclk │ │ ├── pp_dpm_pcie │ │ ├── gpu_od │ │ │ └── fan_ctrl │ │ │ │ ├── fan_minimum_pwm │ │ │ │ ├── fan_target_temperature │ │ │ │ ├── acoustic_limit_rpm_threshold │ │ │ │ ├── acoustic_target_rpm_threshold │ │ │ │ └── fan_curve │ │ ├── pp_dpm_mclk │ │ ├── pp_table │ │ ├── uevent │ │ ├── pp_od_clk_voltage │ │ ├── pp_power_profile_mode │ │ └── pp_features │ ├── rx6950xt │ │ ├── uevent │ │ └── pp_dpm_sclk │ ├── rx6900xt │ │ ├── config │ │ ├── hdcp_srm │ │ ├── pp_table │ │ ├── gpu_metrics │ │ ├── pp_od_clk_voltage │ │ ├── irq │ │ ├── pcie_bw │ │ ├── boot_vga │ │ ├── class │ │ ├── enable │ │ ├── modalias │ │ ├── msi_bus │ │ ├── revision │ │ └── vendor │ ├── internal-7840u │ │ └── pp_od_clk_voltage │ ├── internal-4800h │ │ └── pp_power_profile_mode │ ├── vangogh │ │ └── pp_od_clk_voltage │ ├── rx7900xtx │ │ └── pp_od_clk_voltage │ ├── rx5500xt │ │ └── pp_od_clk_voltage │ ├── rx5700xt │ │ └── pp_od_clk_voltage │ ├── rx6800 │ │ └── pp_od_clk_voltage │ └── rx6700xt │ │ └── pp_od_clk_voltage ├── rx6950xt.rs ├── rx6900xt.rs ├── rx7800xt.rs ├── rx7900xt.rs ├── sysfs │ └── mod.rs ├── rx580.rs └── vega56.rs ├── .gitignore ├── src ├── tests.rs ├── gpu_handle │ ├── overdrive │ │ └── snapshots │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_only_max_values_6700xt.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_commands_6900xt_custom.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__set_clock_offset_9070xt.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__set_max_values_6800.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_commands_6900xt_default.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_new_min_over_old_max_7900xt.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_phoenix_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_vangogh_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6700xt_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6800_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6900xt_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__tests__detect_type_phoenix.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7800xt_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7900xt_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_9070xt_full.snap │ │ │ ├── amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7900xtx_full.snap │ │ │ └── amdgpu_sysfs__gpu_handle__overdrive__tests__detect_type_vega10.snap │ ├── snapshots │ │ ├── amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_internal_4800h.snap │ │ ├── amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_vega56.snap │ │ ├── amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx580.snap │ │ ├── amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx7600s.snap │ │ └── amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx7700s.snap │ └── power_levels.rs ├── lib.rs ├── error │ ├── context.rs │ └── mod.rs └── sysfs.rs ├── .github └── workflows │ └── rust.yml ├── README.md └── Cargo.toml /tests/data/vega56/irq: -------------------------------------------------------------------------------- 1 | 81 2 | -------------------------------------------------------------------------------- /tests/data/rx580/boot_vga: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/enable: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/numa_node: -------------------------------------------------------------------------------- 1 | -1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_mclk_od: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_sclk_od: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/boot_vga: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/vega56/enable: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/vega56/msi_bus: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | -------------------------------------------------------------------------------- /tests/data/rx580/ari_enabled: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/class: -------------------------------------------------------------------------------- 1 | 0x030000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/d3cold_allowed: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/device: -------------------------------------------------------------------------------- 1 | 0x67df 2 | -------------------------------------------------------------------------------- /tests/data/rx580/dma_mask_bits: -------------------------------------------------------------------------------- 1 | 40 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/uevent: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/rx580/max_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/rx580/power_state: -------------------------------------------------------------------------------- 1 | D0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_cur_state: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx580/product_name: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx580/product_number: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx580/reset_method: -------------------------------------------------------------------------------- 1 | bus 2 | -------------------------------------------------------------------------------- /tests/data/rx580/revision: -------------------------------------------------------------------------------- 1 | 0xe7 2 | -------------------------------------------------------------------------------- /tests/data/rx580/serial_number: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx580/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/uevent: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_cur_state: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_cur_state: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_cur_state: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_cur_state: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_cur_state: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/vega56/ari_enabled: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/class: -------------------------------------------------------------------------------- 1 | 0x030000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/d3cold_allowed: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/vega56/device: -------------------------------------------------------------------------------- 1 | 0x687f 2 | -------------------------------------------------------------------------------- /tests/data/vega56/dma_mask_bits: -------------------------------------------------------------------------------- 1 | 44 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/uevent: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/vega56/link/l0s_aspm: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/link/l1_aspm: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/numa_node: -------------------------------------------------------------------------------- 1 | -1 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pcie_bw: -------------------------------------------------------------------------------- 1 | 85 0 256 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/control: -------------------------------------------------------------------------------- 1 | on 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power_state: -------------------------------------------------------------------------------- 1 | D0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_cur_state: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_mclk_od: -------------------------------------------------------------------------------- 1 | 15 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_sclk_od: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/product_name: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/product_number: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/reset_method: -------------------------------------------------------------------------------- 1 | bus 2 | -------------------------------------------------------------------------------- /tests/data/vega56/revision: -------------------------------------------------------------------------------- 1 | 0xc3 2 | -------------------------------------------------------------------------------- /tests/data/vega56/serial_number: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | -------------------------------------------------------------------------------- /tests/data/rx580/broken_parity_status: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/current_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/rx580/driver_override: -------------------------------------------------------------------------------- 1 | (null) 2 | -------------------------------------------------------------------------------- /tests/data/rx580/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 11 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/pwm1: -------------------------------------------------------------------------------- 1 | 35 2 | -------------------------------------------------------------------------------- /tests/data/rx580/local_cpulist: -------------------------------------------------------------------------------- 1 | 0-15 2 | -------------------------------------------------------------------------------- /tests/data/rx580/local_cpus: -------------------------------------------------------------------------------- 1 | 0000ffff 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_busy_percent: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pcie_bw: -------------------------------------------------------------------------------- 1 | 11886 2528 256 2 | -------------------------------------------------------------------------------- /tests/data/rx580/pcie_replay_count: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /tests/data/rx6950xt/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu -------------------------------------------------------------------------------- /tests/data/rx7600s/current_link_width: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/pwm1: -------------------------------------------------------------------------------- 1 | 76 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/current_link_width: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/pwm1: -------------------------------------------------------------------------------- 1 | 76 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/pwm1: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/pwm1: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/uevent: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_force_state: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/current_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/vega56/gpu_busy_percent: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/pwm1: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/local_cpulist: -------------------------------------------------------------------------------- 1 | 0-15 2 | -------------------------------------------------------------------------------- /tests/data/vega56/local_cpus: -------------------------------------------------------------------------------- 1 | 0000ffff 2 | -------------------------------------------------------------------------------- /tests/data/vega56/max_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pcie_replay_count: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup: -------------------------------------------------------------------------------- 1 | disabled 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_active: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_count: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/rx580/consistent_dma_mask_bits: -------------------------------------------------------------------------------- 1 | 40 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/fan1_enable: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/fan1_input: -------------------------------------------------------------------------------- 1 | 595 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/fan1_max: -------------------------------------------------------------------------------- 1 | 3200 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/in0_input: -------------------------------------------------------------------------------- 1 | 975 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/name: -------------------------------------------------------------------------------- 1 | amdgpu 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/pwm1_enable: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_gtt_used: -------------------------------------------------------------------------------- 1 | 92377088 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_preempt_used: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/power_dpm_state: -------------------------------------------------------------------------------- 1 | performance 2 | -------------------------------------------------------------------------------- /tests/data/rx580/subsystem_device: -------------------------------------------------------------------------------- 1 | 0xe387 2 | -------------------------------------------------------------------------------- /tests/data/rx580/subsystem_vendor: -------------------------------------------------------------------------------- 1 | 0x1da2 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/fan1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/in0_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/name: -------------------------------------------------------------------------------- 1 | amdgpu 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/fan1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/in0_input: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/name: -------------------------------------------------------------------------------- 1 | amdgpu 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/current_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/current_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/current_link_width: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/name: -------------------------------------------------------------------------------- 1 | amdgpu 2 | -------------------------------------------------------------------------------- /tests/data/vega56/broken_parity_status: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/driver_override: -------------------------------------------------------------------------------- 1 | (null) 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/fan1_enable: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/fan1_input: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/fan1_max: -------------------------------------------------------------------------------- 1 | 3500 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/fan1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/fan1_target: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/in0_input: -------------------------------------------------------------------------------- 1 | 762 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/name: -------------------------------------------------------------------------------- 1 | amdgpu 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/pwm1_enable: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/pwm1_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_gtt_used: -------------------------------------------------------------------------------- 1 | 12337152 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_preempt_used: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_vram_vendor: -------------------------------------------------------------------------------- 1 | hynix 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/autosuspend_delay_ms: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_abort_count: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_active_count: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_expire_count: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_last_time_ms: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_max_time_ms: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/subsystem_device: -------------------------------------------------------------------------------- 1 | 0x0555 2 | -------------------------------------------------------------------------------- /tests/data/vega56/subsystem_vendor: -------------------------------------------------------------------------------- 1 | 0x1043 2 | -------------------------------------------------------------------------------- /tests/data/rx580/current_link_speed: -------------------------------------------------------------------------------- 1 | 8.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/fan1_target: -------------------------------------------------------------------------------- 1 | 595 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_cap_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/temp1_crit: -------------------------------------------------------------------------------- 1 | 94000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/temp1_input: -------------------------------------------------------------------------------- 1 | 44000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx580/max_link_speed: -------------------------------------------------------------------------------- 1 | 8.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_gtt_total: -------------------------------------------------------------------------------- 1 | 8342712320 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_vis_vram_used: -------------------------------------------------------------------------------- 1 | 150302720 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_vram_total: -------------------------------------------------------------------------------- 1 | 4294967296 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_vram_used: -------------------------------------------------------------------------------- 1 | 536870912 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_vram_vendor: -------------------------------------------------------------------------------- 1 | unknown 2 | -------------------------------------------------------------------------------- /tests/data/rx580/vbios_version: -------------------------------------------------------------------------------- 1 | 113-1E3871U-O4C 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/fan1_enable: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/fan1_max: -------------------------------------------------------------------------------- 1 | 4900 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/fan1_target: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/freq1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/pwm1_enable: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp1_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp1_input: -------------------------------------------------------------------------------- 1 | 53000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp2_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp2_input: -------------------------------------------------------------------------------- 1 | 54000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp3_crit: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp3_input: -------------------------------------------------------------------------------- 1 | 60000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/mem_info_vram_vendor: -------------------------------------------------------------------------------- 1 | samsung 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/fan1_enable: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/fan1_max: -------------------------------------------------------------------------------- 1 | 4900 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/fan1_target: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/freq1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/pwm1_enable: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp1_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp1_input: -------------------------------------------------------------------------------- 1 | 34000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp2_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp2_input: -------------------------------------------------------------------------------- 1 | 34000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp3_crit: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp3_input: -------------------------------------------------------------------------------- 1 | 42000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/fan1_enable: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/fan1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/fan1_max: -------------------------------------------------------------------------------- 1 | 3100 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/fan1_target: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/freq1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/in0_input: -------------------------------------------------------------------------------- 1 | 64 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/pwm1_enable: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/fan1_enable: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/fan1_input: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/fan1_max: -------------------------------------------------------------------------------- 1 | 3200 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/fan1_target: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/in0_input: -------------------------------------------------------------------------------- 1 | 686 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/pwm1_enable: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/pwm1_max: -------------------------------------------------------------------------------- 1 | 255 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/in0_input: -------------------------------------------------------------------------------- 1 | 696 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_cap_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/vega56/consistent_dma_mask_bits: -------------------------------------------------------------------------------- 1 | 44 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/freq1_label: -------------------------------------------------------------------------------- 1 | sclk 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/freq2_label: -------------------------------------------------------------------------------- 1 | mclk 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/in0_label: -------------------------------------------------------------------------------- 1 | vddgfx 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_cap_min: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_label: -------------------------------------------------------------------------------- 1 | PPT 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp1_crit: -------------------------------------------------------------------------------- 1 | 85000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp1_input: -------------------------------------------------------------------------------- 1 | 38000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp1_label: -------------------------------------------------------------------------------- 1 | edge 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp2_crit: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp2_input: -------------------------------------------------------------------------------- 1 | 38000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp3_crit: -------------------------------------------------------------------------------- 1 | 95000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp3_input: -------------------------------------------------------------------------------- 1 | 39000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp3_label: -------------------------------------------------------------------------------- 1 | mem 2 | -------------------------------------------------------------------------------- /tests/data/vega56/max_link_speed: -------------------------------------------------------------------------------- 1 | 8.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_gtt_total: -------------------------------------------------------------------------------- 1 | 8342863872 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_vis_vram_used: -------------------------------------------------------------------------------- 1 | 16613376 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_vram_total: -------------------------------------------------------------------------------- 1 | 8573157376 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_vram_used: -------------------------------------------------------------------------------- 1 | 16613376 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/runtime_active_time: -------------------------------------------------------------------------------- 1 | 67446 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/runtime_status: -------------------------------------------------------------------------------- 1 | active 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/runtime_suspended_time: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power/wakeup_total_time_ms: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power_dpm_state: -------------------------------------------------------------------------------- 1 | performance 2 | -------------------------------------------------------------------------------- /tests/data/vega56/vbios_version: -------------------------------------------------------------------------------- 1 | 115-D050PIL-100 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/freq1_input: -------------------------------------------------------------------------------- 1 | 798080000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/freq2_input: -------------------------------------------------------------------------------- 1 | 1750000000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_average: -------------------------------------------------------------------------------- 1 | 41045000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_cap: -------------------------------------------------------------------------------- 1 | 155000000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_cap_max: -------------------------------------------------------------------------------- 1 | 201000000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx580/mem_info_vis_vram_total: -------------------------------------------------------------------------------- 1 | 268435456 2 | -------------------------------------------------------------------------------- /tests/data/rx6950xt/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 0Mhz * 2 | 1: 0Mhz * -------------------------------------------------------------------------------- /tests/data/rx7600s/current_link_speed: -------------------------------------------------------------------------------- 1 | 16.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/freq2_input: -------------------------------------------------------------------------------- 1 | 96000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power/control: -------------------------------------------------------------------------------- 1 | auto 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_average: -------------------------------------------------------------------------------- 1 | 1000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_cap: -------------------------------------------------------------------------------- 1 | 95000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp1_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp2_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp3_emergency: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/vbios_version: -------------------------------------------------------------------------------- 1 | 113-BRT112125.001 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/current_link_speed: -------------------------------------------------------------------------------- 1 | 16.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/freq2_input: -------------------------------------------------------------------------------- 1 | 96000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_average: -------------------------------------------------------------------------------- 1 | 1000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_cap: -------------------------------------------------------------------------------- 1 | 100000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp1_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp2_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp3_emergency: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/vbios_version: -------------------------------------------------------------------------------- 1 | 113-BRT125778.001 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/current_link_speed: -------------------------------------------------------------------------------- 1 | 16.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/freq2_input: -------------------------------------------------------------------------------- 1 | 96000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_cap: -------------------------------------------------------------------------------- 1 | 222000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp1_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp1_input: -------------------------------------------------------------------------------- 1 | 37000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp2_crit: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp2_input: -------------------------------------------------------------------------------- 1 | 43000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp3_crit: -------------------------------------------------------------------------------- 1 | 108000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp3_input: -------------------------------------------------------------------------------- 1 | 56000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/vbios_version: -------------------------------------------------------------------------------- 1 | 113-D7120200-100 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/current_link_speed: -------------------------------------------------------------------------------- 1 | 16.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/freq1_input: -------------------------------------------------------------------------------- 1 | 31000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_cap: -------------------------------------------------------------------------------- 1 | 290000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp1_crit: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp1_input: -------------------------------------------------------------------------------- 1 | 53000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp2_crit: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp2_input: -------------------------------------------------------------------------------- 1 | 61000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp3_crit: -------------------------------------------------------------------------------- 1 | 108000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp3_input: -------------------------------------------------------------------------------- 1 | 68000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/vbios_version: -------------------------------------------------------------------------------- 1 | 113-D70401XT-N11 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/current_link_speed: -------------------------------------------------------------------------------- 1 | 32.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/freq1_input: -------------------------------------------------------------------------------- 1 | 59000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/freq2_input: -------------------------------------------------------------------------------- 1 | 96000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power/control: -------------------------------------------------------------------------------- 1 | auto 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_cap: -------------------------------------------------------------------------------- 1 | 330000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp1_crit: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp1_input: -------------------------------------------------------------------------------- 1 | 39000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp2_crit: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp2_input: -------------------------------------------------------------------------------- 1 | 42000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp3_crit: -------------------------------------------------------------------------------- 1 | 108000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp3_input: -------------------------------------------------------------------------------- 1 | 62000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/vbios_version: -------------------------------------------------------------------------------- 1 | 113-EXT108779-100 2 | -------------------------------------------------------------------------------- /tests/data/vega56/current_link_speed: -------------------------------------------------------------------------------- 1 | 8.0 GT/s PCIe 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/freq1_input: -------------------------------------------------------------------------------- 1 | 26000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/freq2_input: -------------------------------------------------------------------------------- 1 | 167000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_average: -------------------------------------------------------------------------------- 1 | 8000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_cap: -------------------------------------------------------------------------------- 1 | 260000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp1_emergency: -------------------------------------------------------------------------------- 1 | 90000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp2_emergency: -------------------------------------------------------------------------------- 1 | 110000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp2_label: -------------------------------------------------------------------------------- 1 | junction 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/temp3_emergency: -------------------------------------------------------------------------------- 1 | 100000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/mem_info_vis_vram_total: -------------------------------------------------------------------------------- 1 | 268435456 2 | -------------------------------------------------------------------------------- /tests/data/vega56/resource0_resize: -------------------------------------------------------------------------------- 1 | 0000000000003f00 2 | -------------------------------------------------------------------------------- /tests/data/vega56/resource2_resize: -------------------------------------------------------------------------------- 1 | 00000000000001fe 2 | -------------------------------------------------------------------------------- /tests/data/rx580/hwmon/hwmon4/power1_cap_default: -------------------------------------------------------------------------------- 1 | 155000000 2 | -------------------------------------------------------------------------------- /tests/data/rx580/power_dpm_force_performance_level: -------------------------------------------------------------------------------- 1 | auto 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power/runtime_active_time: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_cap_default: -------------------------------------------------------------------------------- 1 | 95000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_cap_max: -------------------------------------------------------------------------------- 1 | 95000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power1_cap_min: -------------------------------------------------------------------------------- 1 | 95000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/power_dpm_force_performance_level: -------------------------------------------------------------------------------- 1 | manual 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 1 2 | 0 default 3 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_cap_max: -------------------------------------------------------------------------------- 1 | 120000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_cap_min: -------------------------------------------------------------------------------- 1 | 100000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 1 2 | 0 default 3 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_average: -------------------------------------------------------------------------------- 1 | 10000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_cap_max: -------------------------------------------------------------------------------- 1 | 243000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_cap_min: -------------------------------------------------------------------------------- 1 | 190000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp1_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp2_emergency: -------------------------------------------------------------------------------- 1 | 115000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/temp3_emergency: -------------------------------------------------------------------------------- 1 | 113000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 1 2 | 0 default 3 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/freq2_input: -------------------------------------------------------------------------------- 1 | 1249000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_average: -------------------------------------------------------------------------------- 1 | 68000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_cap_max: -------------------------------------------------------------------------------- 1 | 333000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_cap_min: -------------------------------------------------------------------------------- 1 | 261000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp1_emergency: -------------------------------------------------------------------------------- 1 | 105000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp2_emergency: -------------------------------------------------------------------------------- 1 | 115000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/temp3_emergency: -------------------------------------------------------------------------------- 1 | 113000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 1 2 | 0 default 3 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_average: -------------------------------------------------------------------------------- 1 | 19000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_cap_max: -------------------------------------------------------------------------------- 1 | 340000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp1_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp1_emergency: -------------------------------------------------------------------------------- 1 | 115000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp2_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp2_emergency: -------------------------------------------------------------------------------- 1 | 115000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp3_crit_hyst: -------------------------------------------------------------------------------- 1 | -273150 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/temp3_emergency: -------------------------------------------------------------------------------- 1 | 113000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/power_dpm_force_performance_level: -------------------------------------------------------------------------------- 1 | auto 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 1 2 | 0 default 3 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_cap_default: -------------------------------------------------------------------------------- 1 | 260000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/hwmon/hwmon4/power1_cap_max: -------------------------------------------------------------------------------- 1 | 390000000 2 | -------------------------------------------------------------------------------- /tests/data/vega56/power_dpm_force_performance_level: -------------------------------------------------------------------------------- 1 | auto 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power/runtime_status: -------------------------------------------------------------------------------- 1 | unsupported 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/hwmon/hwmon5/power/runtime_suspended_time: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx7700s/hwmon/hwmon9/power1_cap_default: -------------------------------------------------------------------------------- 1 | 100000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/hwmon/hwmon4/power1_cap_default: -------------------------------------------------------------------------------- 1 | 212000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/hwmon/hwmon8/power1_cap_default: -------------------------------------------------------------------------------- 1 | 290000000 2 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 500Mhz 2 | 1: 1500Mhz * 3 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power/runtime_active_time: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power/runtime_suspended_time: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power1_cap_default: -------------------------------------------------------------------------------- 1 | 330000000 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 417Mhz * 2 | 1: 1476Mhz 3 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 2.5GT/s, x8 2 | 1: 8.0GT/s, x16 * 3 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 2 2 | 0 boot 3 | 1 performance 4 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 255Mhz 2 | 1: 0Mhz * 3 | 2: 1841Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 255Mhz 2 | 1: 0Mhz * 3 | 2: 2208Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/hwmon/hwmon3/power/runtime_status: -------------------------------------------------------------------------------- 1 | unsupported 2 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 8.0GT/s, x16 * 2 | 1: 8.0GT/s, x16 * 3 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 300Mhz 2 | 1: 1000Mhz 3 | 2: 1750Mhz * 4 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 417Mhz 2 | 1: 711Mhz * 3 | 2: 1280Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 417Mhz 2 | 1: 492Mhz * 3 | 2: 1280Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 500Mhz 2 | 1: 0Mhz * 3 | 2: 2124Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 300Mhz 2 | 1: 750Mhz * 3 | 2: 1500Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 500Mhz 2 | 1: 31Mhz * 3 | 2: 2219Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 500Mhz 2 | 1: 0Mhz * 3 | 2: 2520Mhz 4 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_num_states: -------------------------------------------------------------------------------- 1 | states: 2 2 | 0 boot 3 | 1 performance 4 | -------------------------------------------------------------------------------- /tests/data/rx580/modalias: -------------------------------------------------------------------------------- 1 | pci:v00001002d000067DFsv00001DA2sd0000E387bc03sc00i00 2 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 2.5GT/s, x16 250Mhz 2 | 1: 8.0GT/s, x16 1143Mhz 3 | -------------------------------------------------------------------------------- /tests/data/vega56/modalias: -------------------------------------------------------------------------------- 1 | pci:v00001002d0000687Fsv00001043sd00000555bc03sc00i00 2 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 96Mhz * 2 | 1: 456Mhz 3 | 2: 772Mhz 4 | 3: 1000Mhz 5 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 96Mhz * 2 | 1: 456Mhz 3 | 2: 772Mhz 4 | 3: 1124Mhz 5 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 96Mhz * 2 | 1: 456Mhz 3 | 2: 772Mhz 4 | 3: 1218Mhz 5 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 96Mhz 2 | 1: 456Mhz 3 | 2: 772Mhz 4 | 3: 1249Mhz * 5 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_dpm_dcefclk: -------------------------------------------------------------------------------- 1 | 0: 600Mhz * 2 | 1: 720Mhz 3 | 2: 847Mhz 4 | 3: 900Mhz 5 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 167Mhz * 2 | 1: 500Mhz 3 | 2: 700Mhz 4 | 3: 920Mhz 5 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 2.5GT/s, x1 81Mhz 2 | 1: 16.0GT/s, x8 306Mhz 3 | 2: 16.0GT/s, x8 306Mhz 4 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx580/pp_table -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 2.5GT/s, x1 81Mhz 2 | 1: 16.0GT/s, x8 306Mhz * 3 | 2: 16.0GT/s, x8 306Mhz * 4 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/fan_minimum_pwm: -------------------------------------------------------------------------------- 1 | FAN_MINIMUM_PWM: 2 | 97 3 | OD_RANGE: 4 | MINIMUM_PWM: 20 100 5 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 2.5GT/s, x1 78Mhz 2 | 1: 5.0GT/s, x4 156Mhz 3 | 2: 16.0GT/s, x16 623Mhz * 4 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_od/fan_ctrl/fan_minimum_pwm: -------------------------------------------------------------------------------- 1 | FAN_MINIMUM_PWM: 2 | 15 3 | OD_RANGE: 4 | MINIMUM_PWM: 15 100 5 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_od/fan_ctrl/fan_minimum_pwm: -------------------------------------------------------------------------------- 1 | FAN_MINIMUM_PWM: 2 | 30 3 | OD_RANGE: 4 | MINIMUM_PWM: 30 100 5 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx6900xt/config -------------------------------------------------------------------------------- /tests/data/rx6900xt/hdcp_srm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx6900xt/hdcp_srm -------------------------------------------------------------------------------- /tests/data/rx6900xt/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx6900xt/pp_table -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx7600s/pp_table -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx7700s/pp_table -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx7800xt/pp_table -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_dpm_pcie: -------------------------------------------------------------------------------- 1 | 0: 16.0GT/s, x16 78Mhz * 2 | 1: 16.0GT/s, x16 156Mhz * 3 | 2: 16.0GT/s, x16 623Mhz * 4 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx7900xt/pp_table -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_dpm_mclk: -------------------------------------------------------------------------------- 1 | 0: 96Mhz * 2 | 1: 456Mhz 3 | 2: 772Mhz 4 | 3: 875Mhz 5 | 4: 1124Mhz 6 | 5: 1258Mhz 7 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx9070xt/pp_table -------------------------------------------------------------------------------- /tests/data/vega56/pp_table: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/vega56/pp_table -------------------------------------------------------------------------------- /tests/data/vega56/thermal_throttling_logging: -------------------------------------------------------------------------------- 1 | 0000:0b:00.0: thermal throttling logging enabled, with interval 60 seconds 2 | -------------------------------------------------------------------------------- /tests/data/internal-7840u/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 800Mhz 3 | 1: 2700Mhz 4 | OD_RANGE: 5 | SCLK: 800MHz 2700Mhz 6 | -------------------------------------------------------------------------------- /tests/data/rx7600s/gpu_metrics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx7600s/gpu_metrics -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/fan_zero_rpm_enable: -------------------------------------------------------------------------------- 1 | FAN_ZERO_RPM_ENABLE: 2 | 0 3 | OD_RANGE: 4 | ZERO_RPM_ENABLE: 0 1 5 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_dpm_socclk: -------------------------------------------------------------------------------- 1 | 0: 600Mhz * 2 | 1: 720Mhz 3 | 2: 847Mhz 4 | 3: 960Mhz 5 | 4: 1028Mhz 6 | 5: 1107Mhz 7 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/gpu_metrics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilya-zlobintsev/amdgpu-sysfs-rs/HEAD/tests/data/rx6900xt/gpu_metrics -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/fan_target_temperature: -------------------------------------------------------------------------------- 1 | FAN_TARGET_TEMPERATURE: 2 | 95 3 | OD_RANGE: 4 | TARGET_TEMPERATURE: 25 110 5 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_od/fan_ctrl/fan_target_temperature: -------------------------------------------------------------------------------- 1 | FAN_TARGET_TEMPERATURE: 2 | 83 3 | OD_RANGE: 4 | TARGET_TEMPERATURE: 25 105 5 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_od/fan_ctrl/fan_target_temperature: -------------------------------------------------------------------------------- 1 | FAN_TARGET_TEMPERATURE: 2 | 90 3 | OD_RANGE: 4 | TARGET_TEMPERATURE: 25 105 5 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/acoustic_limit_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_LIMIT: 2 | 2450 3 | OD_RANGE: 4 | ACOUSTIC_LIMIT: 500 3100 5 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/acoustic_target_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_TARGET: 2 | 2200 3 | OD_RANGE: 4 | ACOUSTIC_TARGET: 500 3100 5 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_od/fan_ctrl/acoustic_limit_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_LIMIT: 2 | 3200 3 | OD_RANGE: 4 | ACOUSTIC_LIMIT: 500 3200 5 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_od/fan_ctrl/acoustic_target_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_TARGET: 2 | 1450 3 | OD_RANGE: 4 | ACOUSTIC_TARGET: 500 3200 5 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_od/fan_ctrl/acoustic_limit_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_LIMIT: 2 | 3300 3 | OD_RANGE: 4 | ACOUSTIC_LIMIT: 500 3650 5 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_od/fan_ctrl/acoustic_target_rpm_threshold: -------------------------------------------------------------------------------- 1 | OD_ACOUSTIC_TARGET: 2 | 1300 3 | OD_RANGE: 4 | ACOUSTIC_TARGET: 500 3650 5 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 300Mhz 2 | 1: 600Mhz 3 | 2: 900Mhz * 4 | 3: 1145Mhz 5 | 4: 1215Mhz 6 | 5: 1257Mhz 7 | 6: 1300Mhz 8 | 7: 1366Mhz 9 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_dpm_sclk: -------------------------------------------------------------------------------- 1 | 0: 852Mhz * 2 | 1: 991Mhz 3 | 2: 1138Mhz 4 | 3: 1269Mhz 5 | 4: 1312Mhz 6 | 5: 1474Mhz 7 | 6: 1538Mhz 8 | 7: 1590Mhz 9 | -------------------------------------------------------------------------------- /tests/data/internal-4800h/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | 1 3D_FULL_SCREEN 2 | 3 VIDEO* 3 | 4 VR 4 | 5 COMPUTE 5 | 6 CUSTOM 6 | -------------------------------------------------------------------------------- /tests/data/vega56/aer_dev_correctable: -------------------------------------------------------------------------------- 1 | RxErr 0 2 | BadTLP 0 3 | BadDLLP 0 4 | Rollover 0 5 | Timeout 0 6 | NonFatalErr 0 7 | CorrIntErr 0 8 | HeaderOF 0 9 | TOTAL_ERR_COR 0 10 | -------------------------------------------------------------------------------- /tests/data/rx580/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:67DF 4 | PCI_SUBSYS_ID=1DA2:E387 5 | PCI_SLOT_NAME=0000:09:00.0 6 | MODALIAS=pci:v00001002d000067DFsv00001DA2sd0000E387bc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/rx7600s/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:7480 4 | PCI_SUBSYS_ID=1043:232D 5 | PCI_SLOT_NAME=0000:03:00.0 6 | MODALIAS=pci:v00001002d00007480sv00001043sd0000232Dbc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/rx7700s/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:7480 4 | PCI_SUBSYS_ID=F111:0007 5 | PCI_SLOT_NAME=0000:03:00.0 6 | MODALIAS=pci:v00001002d00007480sv0000F111sd00000007bc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:747E 4 | PCI_SUBSYS_ID=1002:0E37 5 | PCI_SLOT_NAME=0000:2f:00.0 6 | MODALIAS=pci:v00001002d0000747Esv00001002sd00000E37bc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:744C 4 | PCI_SUBSYS_ID=1DA2:E471 5 | PCI_SLOT_NAME=0000:03:00.0 6 | MODALIAS=pci:v00001002d0000744Csv00001DA2sd0000E471bc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:7550 4 | PCI_SUBSYS_ID=148C:2435 5 | PCI_SLOT_NAME=0000:09:00.0 6 | MODALIAS=pci:v00001002d00007550sv0000148Csd00002435bc03sc00i00 7 | -------------------------------------------------------------------------------- /tests/data/vega56/uevent: -------------------------------------------------------------------------------- 1 | DRIVER=amdgpu 2 | PCI_CLASS=30000 3 | PCI_ID=1002:687F 4 | PCI_SUBSYS_ID=1043:0555 5 | PCI_SLOT_NAME=0000:0b:00.0 6 | MODALIAS=pci:v00001002d0000687Fsv00001043sd00000555bc03sc00i00 7 | -------------------------------------------------------------------------------- /src/tests.rs: -------------------------------------------------------------------------------- 1 | macro_rules! include_test_data { 2 | ($e:expr) => { 3 | include_str!(concat!( 4 | env!("CARGO_MANIFEST_DIR"), 5 | concat!("/tests/data/", $e) 6 | )) 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 2499Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1000MHz 7 | OD_VDDGFX_OFFSET: 8 | -10mV 9 | OD_RANGE: 10 | SCLK: 500Mhz 3000Mhz 11 | MCLK: 674Mhz 1075Mhz 12 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/gpu_od/fan_ctrl/fan_curve: -------------------------------------------------------------------------------- 1 | OD_FAN_CURVE: 2 | 0: 0C 0% 3 | 1: 0C 0% 4 | 2: 0C 0% 5 | 3: 0C 0% 6 | 4: 0C 0% 7 | OD_RANGE: 8 | FAN_CURVE(hotspot temp): 25C 100C 9 | FAN_CURVE(fan speed): 20% 100% 10 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/gpu_od/fan_ctrl/fan_curve: -------------------------------------------------------------------------------- 1 | OD_FAN_CURVE: 2 | 0: 0C 0% 3 | 1: 0C 0% 4 | 2: 0C 0% 5 | 3: 0C 0% 6 | 4: 0C 0% 7 | OD_RANGE: 8 | FAN_CURVE(hotspot temp): 25C 100C 9 | FAN_CURVE(fan speed): 15% 100% 10 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/gpu_od/fan_ctrl/fan_curve: -------------------------------------------------------------------------------- 1 | OD_FAN_CURVE: 2 | 0: 0C 0% 3 | 1: 0C 0% 4 | 2: 0C 0% 5 | 3: 0C 0% 6 | 4: 0C 0% 7 | OD_RANGE: 8 | FAN_CURVE(hotspot temp): 25C 100C 9 | FAN_CURVE(fan speed): 30% 100% 10 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_only_max_values_6700xt.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: commands 4 | --- 5 | - s 1 2800 6 | - m 1 1075 7 | -------------------------------------------------------------------------------- /tests/data/vangogh/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 1600Mhz 3 | 1: 1600Mhz 4 | OD_RANGE: 5 | SCLK: 200Mhz 1600Mhz 6 | CCLK: 1400Mhz 3500Mhz 7 | CCLK_RANGE in Core0: 8 | 0: 1400Mhz 9 | 1: 3500Mhz -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_commands_6900xt_custom.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: commands 4 | --- 5 | - s 0 800 6 | - s 1 2400 7 | - m 1 900 8 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__set_clock_offset_9070xt.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table.get_commands(&table.clone().into()).unwrap() 4 | --- 5 | - s 200 6 | - vo -50 7 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__set_max_values_6800.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table.get_commands(&table.clone().into()).unwrap() 4 | --- 5 | - s 1 2400 6 | - m 1 1050 7 | - vo 10 8 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK_OFFSET: 2 | 0Mhz 3 | OD_MCLK: 4 | 0: 97Mhz 5 | 1: 1259MHz 6 | OD_VDDGFX_OFFSET: 7 | 0mV 8 | OD_RANGE: 9 | SCLK_OFFSET: -500Mhz 1000Mhz 10 | MCLK: 97Mhz 1500Mhz 11 | VDDGFX_OFFSET: -200mv 0mv 12 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_commands_6900xt_default.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: commands 4 | --- 5 | - s 0 500 6 | - s 1 2499 7 | - m 0 97 8 | - m 1 1000 9 | - vo -10 10 | -------------------------------------------------------------------------------- /tests/data/rx7900xtx/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 3005Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1250MHz 7 | OD_VDDC_CURVE: 8 | 0: 0mv 9 | 1: 0mv 10 | 2: 0mv 11 | 3: 0mv 12 | 4: 0mv 13 | 5: 0mv 14 | OD_RANGE: 15 | SCLK: 500Mhz 5000Mhz 16 | MCLK: 97Mhz 1500Mhz 17 | VDDC_CURVE: -450mv 0mv -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__write_new_min_over_old_max_7900xt.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: commands 4 | --- 5 | - s 1 3000 6 | - s 0 3000 7 | - s 1 3000 8 | - m 1 1350 9 | - m 0 1350 10 | - m 1 1350 11 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../README.md")] 2 | #![warn(missing_docs)] 3 | #![deny(unsafe_code)] 4 | 5 | #[cfg(test)] 6 | #[macro_use] 7 | mod tests; 8 | pub mod error; 9 | pub mod gpu_handle; 10 | pub mod hw_mon; 11 | pub mod sysfs; 12 | 13 | type Result = std::result::Result; 14 | -------------------------------------------------------------------------------- /tests/data/vega56/aer_dev_fatal: -------------------------------------------------------------------------------- 1 | Undefined 0 2 | DLP 0 3 | SDES 0 4 | TLP 0 5 | FCP 0 6 | CmpltTO 0 7 | CmpltAbrt 0 8 | UnxCmplt 0 9 | RxOF 0 10 | MalfTLP 0 11 | ECRC 0 12 | UnsupReq 0 13 | ACSViol 0 14 | UncorrIntErr 0 15 | BlockedTLP 0 16 | AtomicOpBlocked 0 17 | TLPBlockedErr 0 18 | PoisonTLPBlocked 0 19 | TOTAL_ERR_FATAL 0 20 | -------------------------------------------------------------------------------- /tests/data/vega56/aer_dev_nonfatal: -------------------------------------------------------------------------------- 1 | Undefined 0 2 | DLP 0 3 | SDES 0 4 | TLP 0 5 | FCP 0 6 | CmpltTO 0 7 | CmpltAbrt 0 8 | UnxCmplt 0 9 | RxOF 0 10 | MalfTLP 0 11 | ECRC 0 12 | UnsupReq 0 13 | ACSViol 0 14 | UncorrIntErr 0 15 | BlockedTLP 0 16 | AtomicOpBlocked 0 17 | TLPBlockedErr 0 18 | PoisonTLPBlocked 0 19 | TOTAL_ERR_NONFATAL 0 20 | -------------------------------------------------------------------------------- /tests/rx6950xt.rs: -------------------------------------------------------------------------------- 1 | mod sysfs; 2 | 3 | use amdgpu_sysfs::gpu_handle::{GpuHandle, PowerLevels}; 4 | 5 | test_with_handle! { 6 | "rx6950xt", 7 | invalid_dpm_sclk => { 8 | GpuHandle::get_core_clock_levels, 9 | Ok(PowerLevels { 10 | levels: vec![ 11 | 0, 0 12 | ], 13 | active: None, 14 | }) 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /tests/rx6900xt.rs: -------------------------------------------------------------------------------- 1 | use amdgpu_sysfs::gpu_handle::{GpuHandle, PowerLevels}; 2 | 3 | mod sysfs; 4 | 5 | test_with_handle! { 6 | "rx6900xt", 7 | pp_dpm_sclk => { 8 | GpuHandle::get_core_clock_levels, 9 | Ok(PowerLevels { 10 | levels: vec![ 11 | 500, 12 | 2660 13 | ], 14 | active: Some(0) 15 | }) 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build-test: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Build 20 | run: cargo build --verbose 21 | - name: Run tests 22 | run: cargo test --verbose 23 | -------------------------------------------------------------------------------- /src/gpu_handle/snapshots/amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_internal_4800h.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/power_profile_mode.rs 3 | expression: table 4 | --- 5 | modes: 6 | 1: 7 | name: 3D_FULL_SCREEN 8 | components: [] 9 | 3: 10 | name: VIDEO 11 | components: [] 12 | 4: 13 | name: VR 14 | components: [] 15 | 5: 16 | name: COMPUTE 17 | components: [] 18 | 6: 19 | name: CUSTOM 20 | components: [] 21 | value_names: [] 22 | active: 3 23 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_phoenix_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 800 7 | max: 2700 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: ~ 11 | max: ~ 12 | vddc_curve: [] 13 | voltage_offset: ~ 14 | od_range: 15 | sclk: 16 | min: 800 17 | max: 2700 18 | sclk_offset: ~ 19 | mclk: ~ 20 | curve_sclk_points: [] 21 | curve_voltage_points: [] 22 | voltage_offset: ~ 23 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_vangogh_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 1600 7 | max: 1600 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: ~ 11 | max: ~ 12 | vddc_curve: [] 13 | voltage_offset: ~ 14 | od_range: 15 | sclk: 16 | min: 200 17 | max: 1600 18 | sclk_offset: ~ 19 | mclk: ~ 20 | curve_sclk_points: [] 21 | curve_voltage_points: [] 22 | voltage_offset: ~ 23 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 300MHz 750mV 3 | 1: 600MHz 769mV 4 | 2: 900MHz 912mV 5 | 3: 1145MHz 1125mV 6 | 4: 1215MHz 1150mV 7 | 5: 1257MHz 1150mV 8 | 6: 1300MHz 1150mV 9 | 7: 1366MHz 1150mV 10 | OD_MCLK: 11 | 0: 300MHz 750mV 12 | 1: 1000MHz 825mV 13 | 2: 1750MHz 975mV 14 | OD_RANGE: 15 | SCLK: 300MHz 2000MHz 16 | MCLK: 300MHz 2250MHz 17 | VDDC: 750mV 1200mV 18 | -------------------------------------------------------------------------------- /tests/data/rx5500xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 1825Mhz 4 | OD_MCLK: 5 | 1: 900MHz 6 | OD_VDDC_CURVE: 7 | 0: 500MHz 710mV 8 | 1: 1162MHz 794mV 9 | 2: 1825MHz 1115mV 10 | OD_RANGE: 11 | SCLK: 800Mhz 2200Mhz 12 | MCLK: 625Mhz 930Mhz 13 | VDDC_CURVE_SCLK[0]: 800Mhz 2200Mhz 14 | VDDC_CURVE_VOLT[0]: 700mV 1150mV 15 | VDDC_CURVE_SCLK[1]: 800Mhz 2200Mhz 16 | VDDC_CURVE_VOLT[1]: 700mV 1150mV 17 | VDDC_CURVE_SCLK[2]: 800Mhz 2200Mhz 18 | VDDC_CURVE_VOLT[2]: 700mV 1150mV -------------------------------------------------------------------------------- /tests/data/rx5700xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 800Mhz 3 | 1: 2100Mhz 4 | OD_MCLK: 5 | 1: 875MHz 6 | OD_VDDC_CURVE: 7 | 0: 800MHz 711mV 8 | 1: 1450MHz 801mV 9 | 2: 2100MHz 1191mV 10 | OD_RANGE: 11 | SCLK: 800Mhz 2150Mhz 12 | MCLK: 625Mhz 950Mhz 13 | VDDC_CURVE_SCLK[0]: 800Mhz 2150Mhz 14 | VDDC_CURVE_VOLT[0]: 750mV 1200mV 15 | VDDC_CURVE_SCLK[1]: 800Mhz 2150Mhz 16 | VDDC_CURVE_VOLT[1]: 750mV 1200mV 17 | VDDC_CURVE_SCLK[2]: 800Mhz 2150Mhz 18 | VDDC_CURVE_VOLT[2]: 750mV 1200mV 19 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6700xt_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 2725 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1000 12 | vddc_curve: [] 13 | voltage_offset: 0 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 2800 18 | sclk_offset: ~ 19 | mclk: 20 | min: 674 21 | max: 1075 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: ~ 25 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6800_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 2314 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1000 12 | vddc_curve: [] 13 | voltage_offset: 0 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 2600 18 | sclk_offset: ~ 19 | mclk: 20 | min: 674 21 | max: 1075 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: ~ 25 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_6900xt_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 2499 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1000 12 | vddc_curve: [] 13 | voltage_offset: -10 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 3000 18 | sclk_offset: ~ 19 | mclk: 20 | min: 674 21 | max: 1075 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: ~ 25 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | NUM MODE_NAME BUSY_SET_POINT FPS USE_RLC_BUSY MIN_ACTIVE_LEVEL 2 | 0 BOOTUP_DEFAULT*: 70 60 0 0 3 | 1 3D_FULL_SCREEN : 70 60 1 3 4 | 2 POWER_SAVING : 90 60 0 0 5 | 3 VIDEO : 70 60 0 0 6 | 4 VR : 70 90 0 0 7 | 5 COMPUTE : 30 60 0 6 8 | 6 CUSTOM : 0 0 0 0 9 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 852Mhz 800mV 3 | 1: 991Mhz 900mV 4 | 2: 1138Mhz 950mV 5 | 3: 1269Mhz 1000mV 6 | 4: 1312Mhz 1050mV 7 | 5: 1474Mhz 1100mV 8 | 6: 1538Mhz 1150mV 9 | 7: 1590Mhz 1200mV 10 | OD_MCLK: 11 | 0: 167Mhz 800mV 12 | 1: 500Mhz 800mV 13 | 2: 700Mhz 900mV 14 | 3: 920Mhz 950mV 15 | OD_RANGE: 16 | SCLK: 852MHz 2400MHz 17 | MCLK: 167MHz 1500MHz 18 | VDDC: 800mV 1200mV 19 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__tests__detect_type_phoenix.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/mod.rs 3 | expression: table 4 | --- 5 | kind: rdna 6 | data: 7 | current_sclk_range: 8 | min: 800 9 | max: 2700 10 | sclk_offset: ~ 11 | current_mclk_range: 12 | min: ~ 13 | max: ~ 14 | vddc_curve: [] 15 | voltage_offset: ~ 16 | od_range: 17 | sclk: 18 | min: 800 19 | max: 2700 20 | sclk_offset: ~ 21 | mclk: ~ 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: ~ 25 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7800xt_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 2660 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1219 12 | vddc_curve: [] 13 | voltage_offset: 0 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 5000 18 | sclk_offset: ~ 19 | mclk: 20 | min: 97 21 | max: 1500 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: 25 | min: -450 26 | max: 0 27 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7900xt_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 2735 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1250 12 | vddc_curve: [] 13 | voltage_offset: 0 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 5000 18 | sclk_offset: ~ 19 | mclk: 20 | min: 97 21 | max: 1500 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: 25 | min: -450 26 | max: 0 27 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_9070xt_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: ~ 7 | max: ~ 8 | sclk_offset: 0 9 | current_mclk_range: 10 | min: 97 11 | max: 1259 12 | vddc_curve: [] 13 | voltage_offset: 0 14 | od_range: 15 | sclk: ~ 16 | sclk_offset: 17 | min: -500 18 | max: 1000 19 | mclk: 20 | min: 97 21 | max: 1500 22 | curve_sclk_points: [] 23 | curve_voltage_points: [] 24 | voltage_offset: 25 | min: -200 26 | max: 0 27 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__rdna__tests__parse_7900xtx_full.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/rdna.rs 3 | expression: table 4 | --- 5 | current_sclk_range: 6 | min: 500 7 | max: 3005 8 | sclk_offset: ~ 9 | current_mclk_range: 10 | min: 97 11 | max: 1250 12 | vddc_curve: [] 13 | voltage_offset: ~ 14 | od_range: 15 | sclk: 16 | min: 500 17 | max: 5000 18 | sclk_offset: ~ 19 | mclk: 20 | min: 97 21 | max: 1500 22 | curve_sclk_points: [] 23 | curve_voltage_points: 24 | - min: -450 25 | max: 0 26 | voltage_offset: ~ 27 | -------------------------------------------------------------------------------- /tests/data/rx580/resource: -------------------------------------------------------------------------------- 1 | 0x00000000d0000000 0x00000000dfffffff 0x000000000014220c 2 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 3 | 0x00000000e0000000 0x00000000e01fffff 0x000000000014220c 4 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 5 | 0x000000000000d000 0x000000000000d0ff 0x0000000000040101 6 | 0x00000000fce00000 0x00000000fce3ffff 0x0000000000040200 7 | 0x00000000000c0000 0x00000000000dffff 0x0000000000000212 8 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 9 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 10 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 11 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 12 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 13 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 14 | -------------------------------------------------------------------------------- /tests/data/vega56/resource: -------------------------------------------------------------------------------- 1 | 0x00000000d0000000 0x00000000dfffffff 0x000000000014220c 2 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 3 | 0x00000000e0000000 0x00000000e01fffff 0x000000000014220c 4 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 5 | 0x000000000000d000 0x000000000000d0ff 0x0000000000040101 6 | 0x00000000fcb00000 0x00000000fcb7ffff 0x0000000000040200 7 | 0x00000000000c0000 0x00000000000dffff 0x0000000000000212 8 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 9 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 10 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 11 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 12 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 13 | 0x0000000000000000 0x0000000000000000 0x0000000000000000 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # amdgpu-syfs-rs 2 | [![Crates.io](https://img.shields.io/crates/v/amdgpu-sysfs)](https://crates.io/crates/amdgpu-sysfs) 3 | [![Docs.rs](https://docs.rs/amdgpu-sysfs/badge.svg)](https://docs.rs/amdgpu-sysfs/) 4 | 5 | This library allows you to interact with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver). 6 | 7 | Basic usage: 8 | 9 | ```rust,no_run 10 | use amdgpu_sysfs::gpu_handle::GpuHandle; 11 | # use std::path::PathBuf; 12 | 13 | let sysfs_path = PathBuf::from("/sys/class/drm/card0/device"); 14 | 15 | let gpu_handle = GpuHandle::new_from_path(sysfs_path).unwrap(); 16 | 17 | let gpu_usage = gpu_handle.get_busy_percent().unwrap(); 18 | 19 | let total_vram = gpu_handle.get_total_vram().unwrap(); 20 | ``` 21 | 22 | See the [documentation](https://docs.rs/amdgpu-sysfs/) for more info. 23 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "amdgpu-sysfs" 3 | version = "0.19.3" 4 | authors = ["Ilya Zlobintsev "] 5 | edition = "2021" 6 | license = "LGPL-3.0-or-later" 7 | repository = "https://github.com/ilya-zlobintsev/amdgpu-sysfs-rs/" 8 | description = "Library for interacting with the Linux Kernel SysFS interface for GPUs (mainly targeted at the AMDGPU driver)." 9 | 10 | [features] 11 | default = ["overdrive"] 12 | overdrive = ["enum_dispatch"] 13 | 14 | [dependencies] 15 | enum_dispatch = { version = "0.3.8", optional = true } 16 | serde = { version = "1", features = ["derive"], optional = true } 17 | 18 | [dev-dependencies] 19 | pretty_assertions = "1.4.1" 20 | rust-embed = "8.7.2" 21 | tempfile = "3.22.0" 22 | amdgpu-sysfs = { path = ".", features = ["serde"] } 23 | insta = { version = "1.43.2", features = ["yaml", "redactions"] } 24 | -------------------------------------------------------------------------------- /src/error/context.rs: -------------------------------------------------------------------------------- 1 | use super::Error; 2 | use std::fmt::Display; 3 | 4 | pub trait ErrorContext { 5 | fn context(self, msg: D) -> Result; 6 | 7 | fn with_context D>(self, f: F) -> Result; 8 | } 9 | 10 | impl ErrorContext for Result 11 | where 12 | Error: From, 13 | { 14 | fn context(self, msg: D) -> Result { 15 | self.map_err(|err| { 16 | let mut err = Error::from(err); 17 | err.context = Some(msg.to_string()); 18 | err 19 | }) 20 | } 21 | 22 | fn with_context D>(self, f: F) -> Result { 23 | self.map_err(|err| { 24 | let mut err = Error::from(err); 25 | err.context = Some(f().to_string()); 26 | err 27 | }) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/data/rx580/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | NUM MODE_NAME SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL 2 | 0 BOOTUP_DEFAULT: - - - - - - 3 | 1 3D_FULL_SCREEN *: 0 100 30 10 60 25 4 | 2 POWER_SAVING: 10 0 30 - - - 5 | 3 VIDEO: - - - 10 16 31 6 | 4 VR: 0 11 50 0 100 10 7 | 5 COMPUTE: 0 5 30 - - - 8 | 6 CUSTOM: - - - - - - 9 | -------------------------------------------------------------------------------- /src/gpu_handle/overdrive/snapshots/amdgpu_sysfs__gpu_handle__overdrive__tests__detect_type_vega10.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/overdrive/mod.rs 3 | expression: table 4 | --- 5 | kind: gcn 6 | data: 7 | sclk_levels: 8 | - clockspeed: 852 9 | voltage: 800 10 | - clockspeed: 991 11 | voltage: 900 12 | - clockspeed: 1138 13 | voltage: 950 14 | - clockspeed: 1269 15 | voltage: 1000 16 | - clockspeed: 1312 17 | voltage: 1050 18 | - clockspeed: 1474 19 | voltage: 1100 20 | - clockspeed: 1538 21 | voltage: 1150 22 | - clockspeed: 1590 23 | voltage: 1200 24 | mclk_levels: 25 | - clockspeed: 167 26 | voltage: 800 27 | - clockspeed: 500 28 | voltage: 800 29 | - clockspeed: 700 30 | voltage: 900 31 | - clockspeed: 920 32 | voltage: 950 33 | od_range: 34 | sclk: 35 | min: 852 36 | max: 2400 37 | mclk: 38 | min: 167 39 | max: 1500 40 | vddc: 41 | min: 800 42 | max: 1200 43 | -------------------------------------------------------------------------------- /tests/rx7800xt.rs: -------------------------------------------------------------------------------- 1 | mod sysfs; 2 | 3 | use amdgpu_sysfs::gpu_handle::{ 4 | fan_control::{FanCurve, FanCurveRanges, FanInfo}, 5 | GpuHandle, 6 | }; 7 | 8 | test_with_handle! { 9 | "rx7800xt", 10 | get_fan_acoustic_limit => { 11 | GpuHandle::get_fan_acoustic_limit, 12 | Ok(FanInfo { current: 2450, allowed_range: Some((500, 3100)) }) 13 | }, 14 | get_fan_acoustic_target => { 15 | GpuHandle::get_fan_acoustic_target, 16 | Ok(FanInfo { current: 2200, allowed_range: Some((500, 3100)) }) 17 | }, 18 | get_fan_target_temperature => { 19 | GpuHandle::get_fan_target_temperature, 20 | Ok(FanInfo { current: 95, allowed_range: Some((25, 110)) }) 21 | }, 22 | get_fan_minimum_pwm => { 23 | GpuHandle::get_fan_minimum_pwm, 24 | Ok(FanInfo { current: 97, allowed_range: Some((20, 100)) }) 25 | }, 26 | get_fan_curve => { 27 | GpuHandle::get_fan_curve, 28 | Ok(FanCurve { points: vec![(0, 0); 5].into_boxed_slice(), allowed_ranges: Some(FanCurveRanges {temperature_range: 25..=100, speed_range: 20..=100 })}) 29 | }, 30 | get_fan_zero_rpm => { 31 | GpuHandle::get_fan_zero_rpm_enable, 32 | Ok(false), 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/sysfs.rs: -------------------------------------------------------------------------------- 1 | //! Utilities for working with SysFS. 2 | use crate::{ 3 | error::{Error, ErrorContext}, 4 | Result, 5 | }; 6 | use std::{fmt::Debug, fs, path::Path, str::FromStr}; 7 | 8 | /// General functionality of a SysFS. 9 | pub trait SysFS { 10 | /// Gets the path of the current SysFS. 11 | fn get_path(&self) -> &Path; 12 | 13 | /// Reads the content of a file in the `SysFS`. 14 | fn read_file(&self, file: impl AsRef + Debug) -> Result { 15 | let path = file.as_ref(); 16 | Ok(fs::read_to_string(self.get_path().join(path)) 17 | .with_context(|| format!("Could not read file {file:?}"))? 18 | .replace(char::from(0), "") // Workaround for random null bytes in SysFS entries 19 | .trim() 20 | .to_owned()) 21 | } 22 | 23 | /// Reads the content of a file and then parses it 24 | fn read_file_parsed, E: ToString>(&self, file: &str) -> Result { 25 | fs::read_to_string(self.get_path().join(file)) 26 | .with_context(|| format!("Could not read file {file}"))? 27 | .trim() 28 | .parse() 29 | .map_err(|err: E| Error::basic_parse_error(err.to_string())) 30 | } 31 | 32 | /// Write to a file in the `SysFS`. 33 | fn write_file + Send>(&self, file: &str, contents: C) -> Result<()> { 34 | Ok(fs::write(self.get_path().join(file), contents)?) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/gpu_handle/snapshots/amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_vega56.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/power_profile_mode.rs 3 | expression: table 4 | --- 5 | modes: 6 | 0: 7 | name: BOOTUP_DEFAULT 8 | components: 9 | - clock_type: ~ 10 | values: 11 | - 70 12 | - 60 13 | - 0 14 | - 0 15 | 1: 16 | name: 3D_FULL_SCREEN 17 | components: 18 | - clock_type: ~ 19 | values: 20 | - 70 21 | - 60 22 | - 1 23 | - 3 24 | 2: 25 | name: POWER_SAVING 26 | components: 27 | - clock_type: ~ 28 | values: 29 | - 90 30 | - 60 31 | - 0 32 | - 0 33 | 3: 34 | name: VIDEO 35 | components: 36 | - clock_type: ~ 37 | values: 38 | - 70 39 | - 60 40 | - 0 41 | - 0 42 | 4: 43 | name: VR 44 | components: 45 | - clock_type: ~ 46 | values: 47 | - 70 48 | - 90 49 | - 0 50 | - 0 51 | 5: 52 | name: COMPUTE 53 | components: 54 | - clock_type: ~ 55 | values: 56 | - 30 57 | - 60 58 | - 0 59 | - 6 60 | 6: 61 | name: CUSTOM 62 | components: 63 | - clock_type: ~ 64 | values: 65 | - 0 66 | - 0 67 | - 0 68 | - 0 69 | value_names: 70 | - BUSY_SET_POINT 71 | - FPS 72 | - USE_RLC_BUSY 73 | - MIN_ACTIVE_LEVEL 74 | active: 0 75 | -------------------------------------------------------------------------------- /tests/data/vega56/pp_features: -------------------------------------------------------------------------------- 1 | Current ppfeatures: 0x000000001ba1ff4f 2 | FEATURES BITMASK ENABLEMENT 3 | DPM_PREFETCHER 0x0000000000000001 Y 4 | GFXCLK_DPM 0x0000000000000002 Y 5 | UCLK_DPM 0x0000000000000004 Y 6 | SOCCLK_DPM 0x0000000000000008 Y 7 | UVD_DPM 0x0000000000000010 N 8 | VCE_DPM 0x0000000000000020 N 9 | ULV 0x0000000000000040 Y 10 | MP0CLK_DPM 0x0000000000000080 N 11 | LINK_DPM 0x0000000000000100 Y 12 | DCEFCLK_DPM 0x0000000000000200 Y 13 | AVFS 0x0000000000000400 Y 14 | GFXCLK_DS 0x0000000000000800 Y 15 | SOCCLK_DS 0x0000000000001000 Y 16 | LCLK_DS 0x0000000000002000 Y 17 | PPT 0x0000000000004000 Y 18 | TDC 0x0000000000008000 Y 19 | THERMAL 0x0000000000010000 Y 20 | GFX_PER_CU_CG 0x0000000000020000 N 21 | RM 0x0000000000040000 N 22 | DCEFCLK_DS 0x0000000000080000 N 23 | ACDC 0x0000000000100000 N 24 | VR0HOT 0x0000000000200000 Y 25 | VR1HOT 0x0000000000400000 N 26 | FW_CTF 0x0000000000800000 Y 27 | LED_DISPLAY 0x0000000001000000 Y 28 | FAN_CONTROL 0x0000000002000000 Y 29 | FAST_PPT 0x0000000004000000 N 30 | DIDT 0x0000000008000000 Y 31 | ACG 0x0000000010000000 Y 32 | PCC_LIMIT 0x0000000020000000 N 33 | -------------------------------------------------------------------------------- /tests/data/rx6800/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 2314Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1000MHz 7 | OD_VDDGFX_OFFSET: 8 | 0mV 9 | OD_RANGE: 10 | SCLK: 500Mhz 2600Mhz 11 | MCLK: 674Mhz 1075Mhz 12 | -------------------------------------------------------------------------------- /tests/data/rx6700xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 2725Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1000MHz 7 | OD_VDDGFX_OFFSET: 8 | 0mV 9 | OD_RANGE: 10 | SCLK: 500Mhz 2800Mhz 11 | MCLK: 674Mhz 1075Mhz 12 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 2660Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1219MHz 7 | OD_VDDGFX_OFFSET: 8 | 0mV 9 | OD_RANGE: 10 | SCLK: 500Mhz 5000Mhz 11 | MCLK: 97Mhz 1500Mhz 12 | VDDGFX_OFFSET: -450mv 0mv 13 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_od_clk_voltage: -------------------------------------------------------------------------------- 1 | OD_SCLK: 2 | 0: 500Mhz 3 | 1: 2735Mhz 4 | OD_MCLK: 5 | 0: 97Mhz 6 | 1: 1250MHz 7 | OD_VDDGFX_OFFSET: 8 | 0mV 9 | OD_RANGE: 10 | SCLK: 500Mhz 5000Mhz 11 | MCLK: 97Mhz 1500Mhz 12 | VDDGFX_OFFSET: -450mv 0mv 13 | -------------------------------------------------------------------------------- /src/gpu_handle/snapshots/amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx580.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/power_profile_mode.rs 3 | expression: table 4 | --- 5 | modes: 6 | 0: 7 | name: BOOTUP_DEFAULT 8 | components: 9 | - clock_type: ~ 10 | values: 11 | - ~ 12 | - ~ 13 | - ~ 14 | - ~ 15 | - ~ 16 | - ~ 17 | 1: 18 | name: 3D_FULL_SCREEN 19 | components: 20 | - clock_type: ~ 21 | values: 22 | - 0 23 | - 100 24 | - 30 25 | - 10 26 | - 60 27 | - 25 28 | 2: 29 | name: POWER_SAVING 30 | components: 31 | - clock_type: ~ 32 | values: 33 | - 10 34 | - 0 35 | - 30 36 | - ~ 37 | - ~ 38 | - ~ 39 | 3: 40 | name: VIDEO 41 | components: 42 | - clock_type: ~ 43 | values: 44 | - ~ 45 | - ~ 46 | - ~ 47 | - 10 48 | - 16 49 | - 31 50 | 4: 51 | name: VR 52 | components: 53 | - clock_type: ~ 54 | values: 55 | - 0 56 | - 11 57 | - 50 58 | - 0 59 | - 100 60 | - 10 61 | 5: 62 | name: COMPUTE 63 | components: 64 | - clock_type: ~ 65 | values: 66 | - 0 67 | - 5 68 | - 30 69 | - ~ 70 | - ~ 71 | - ~ 72 | 6: 73 | name: CUSTOM 74 | components: 75 | - clock_type: ~ 76 | values: 77 | - ~ 78 | - ~ 79 | - ~ 80 | - ~ 81 | - ~ 82 | - ~ 83 | value_names: 84 | - SCLK_UP_HYST 85 | - SCLK_DOWN_HYST 86 | - SCLK_ACTIVE_LEVEL 87 | - MCLK_UP_HYST 88 | - MCLK_DOWN_HYST 89 | - MCLK_ACTIVE_LEVEL 90 | active: 1 91 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | PROFILE_INDEX(NAME) CLOCK_TYPE(NAME) FPS MinActiveFreqType MinActiveFreq BoosterFreqType BoosterFreq PD_Data_limit_c PD_Data_error_coeff PD_Data_error_rate_coeff 2 | 0 BOOTUP_DEFAULT*: 3 | 0( GFXCLK) 0 1 0 4 800 4587520 -65536 0 4 | 1( FCLK) 0 3 0 1 0 3276800 -65536 -6553 5 | 1 3D_FULL_SCREEN : 6 | 0( GFXCLK) 0 0 1200 4 650 3932160 -3276 -65536 7 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 8 | 2 POWER_SAVING : 9 | 0( GFXCLK) 0 1 0 3 0 5898240 -65536 0 10 | 1( FCLK) 0 1 0 1 0 3407872 -65536 -6553 11 | 3 VIDEO : 12 | 0( GFXCLK) 0 1 0 4 500 4587520 -65536 0 13 | 1( FCLK) 0 3 0 3 0 3473408 -65536 -6553 14 | 4 VR : 15 | 0( GFXCLK) 0 2 1000 1 0 3276800 0 0 16 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 17 | 5 COMPUTE : 18 | 0( GFXCLK) 0 2 1000 1 0 3932160 0 0 19 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 20 | 6 CUSTOM : 21 | 0( GFXCLK) 0 0 1200 4 0 655360 -3276 -65536 22 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 23 | 7 WINDOW_3D : 24 | 0( GFXCLK) 0 0 1200 4 650 3932160 -3276 -65536 25 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 26 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | PROFILE_INDEX(NAME) CLOCK_TYPE(NAME) FPS MinActiveFreqType MinActiveFreq BoosterFreqType BoosterFreq PD_Data_limit_c PD_Data_error_coeff PD_Data_error_rate_coeff 2 | 0 BOOTUP_DEFAULT*: 3 | 0( GFXCLK) 0 1 0 4 800 4587520 -65536 0 4 | 1( FCLK) 0 3 0 1 0 3276800 -65536 -6553 5 | 1 3D_FULL_SCREEN : 6 | 0( GFXCLK) 0 0 1200 4 650 3932160 -3276 -65536 7 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 8 | 2 POWER_SAVING : 9 | 0( GFXCLK) 0 1 0 3 0 5898240 -65536 0 10 | 1( FCLK) 0 1 0 1 0 3407872 -65536 -6553 11 | 3 VIDEO : 12 | 0( GFXCLK) 0 1 0 4 500 4587520 -65536 0 13 | 1( FCLK) 0 3 0 3 0 3473408 -65536 -6553 14 | 4 VR : 15 | 0( GFXCLK) 0 2 1000 1 0 3276800 0 0 16 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 17 | 5 COMPUTE : 18 | 0( GFXCLK) 0 2 1000 1 0 3932160 0 0 19 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 20 | 6 CUSTOM : 21 | 0( GFXCLK) 0 0 1200 4 0 655360 -3276 -65536 22 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 23 | 7 WINDOW_3D : 24 | 0( GFXCLK) 0 0 1200 4 650 3932160 -3276 -65536 25 | 1( FCLK) 0 3 0 3 0 1310720 -6553 -6553 26 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | PROFILE_INDEX(NAME) CLOCK_TYPE(NAME) FPS MinActiveFreqType MinActiveFreq BoosterFreqType BoosterFreq PD_Data_limit_c PD_Data_error_coeff PD_Data_error_rate_coeff 2 | 0 BOOTUP_DEFAULT : 3 | 0( GFXCLK) 0 1 0 4 800 4587520 -65536 0 4 | 1( FCLK) 0 3 0 1 0 5898240 -6553 -6553 5 | 1 3D_FULL_SCREEN*: 6 | 0( GFXCLK) 0 1 0 1 0 5570560 -655 -6553 7 | 1( FCLK) 0 1 0 1 0 5898240 -6553 -6553 8 | 2 POWER_SAVING : 9 | 0( GFXCLK) 0 1 0 3 0 5898240 -65536 0 10 | 1( FCLK) 0 1 0 1 0 5898240 -65536 -6553 11 | 3 VIDEO : 12 | 0( GFXCLK) 0 1 0 4 500 4587520 -65536 0 13 | 1( FCLK) 0 1 0 1 0 5898240 -6553 -6553 14 | 4 VR : 15 | 0( GFXCLK) 0 4 600 1 0 4587520 -16384 0 16 | 1( FCLK) 0 1 0 1 0 5898240 -6553 -6553 17 | 5 COMPUTE : 18 | 0( GFXCLK) 0 4 600 1 0 4587520 -16384 0 19 | 1( FCLK) 0 1 0 1 0 5898240 -6553 -6553 20 | 6 CUSTOM : 21 | 0( GFXCLK) 0 1 0 4 800 4587520 -65536 0 22 | 1( FCLK) 0 3 0 1 0 5898240 -6553 -6553 23 | 7 WINDOW_3D : 24 | 0( GFXCLK) 0 1 0 1 0 5570560 -655 -6553 25 | 1( FCLK) 0 3 0 1 0 5898240 -6553 -6553 26 | -------------------------------------------------------------------------------- /tests/rx7900xt.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::redundant_closure_call)] 2 | mod sysfs; 3 | 4 | use amdgpu_sysfs::gpu_handle::{ 5 | fan_control::{FanCurve, FanCurveRanges, FanInfo}, 6 | GpuHandle, 7 | }; 8 | 9 | test_with_handle! { 10 | "rx7900xt", 11 | get_fan_acoustic_limit => { 12 | GpuHandle::get_fan_acoustic_limit, 13 | Ok(FanInfo { current: 3200, allowed_range: Some((500, 3200)) }) 14 | }, 15 | get_fan_acoustic_target => { 16 | GpuHandle::get_fan_acoustic_target, 17 | Ok(FanInfo { current: 1450, allowed_range: Some((500, 3200)) }) 18 | }, 19 | get_fan_target_temperature => { 20 | GpuHandle::get_fan_target_temperature, 21 | Ok(FanInfo { current: 83, allowed_range: Some((25, 105)) }) 22 | }, 23 | get_fan_minimum_pwm => { 24 | GpuHandle::get_fan_minimum_pwm, 25 | Ok(FanInfo { current: 15, allowed_range: Some((15, 100)) }) 26 | }, 27 | get_fan_curve => { 28 | GpuHandle::get_fan_curve, 29 | Ok(FanCurve { points: vec![(0, 0); 5].into_boxed_slice(), allowed_ranges: Some(FanCurveRanges {temperature_range: 25..=100, speed_range: 15..=100 })}) 30 | }, 31 | set_invalid_fan_curve => { 32 | |gpu_handle: &GpuHandle| { 33 | let mut curve = gpu_handle.get_fan_curve().unwrap(); 34 | curve.points[0].0 = 5; 35 | curve.points[0].1 = 0; 36 | gpu_handle.set_fan_curve(&curve).unwrap_err().to_string() 37 | }, 38 | "not allowed: Temperature value 5 is outside of the allowed range 25..=100", 39 | }, 40 | 41 | set_valid_fan_curve => { 42 | |gpu_handle: &GpuHandle| { 43 | let mut curve = gpu_handle.get_fan_curve().unwrap(); 44 | curve.points[0] = (25, 15); 45 | curve.points[1] = (40, 30); 46 | curve.points[2] = (60, 65); 47 | curve.points[3] = (70, 80); 48 | curve.points[4] = (85, 100); 49 | let handle = gpu_handle.set_fan_curve(&curve)?; 50 | handle.commit() 51 | }, 52 | Ok(()) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/gpu_handle/power_levels.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "serde")] 2 | use serde::{Deserialize, Serialize}; 3 | 4 | /// List of power levels. 5 | #[derive(Debug, Clone, PartialEq, Eq, Default)] 6 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 7 | pub struct PowerLevels { 8 | /// List of possible levels. 9 | pub levels: Vec, 10 | /// The currently active level. 11 | pub active: Option, 12 | } 13 | 14 | impl PowerLevels { 15 | /// Gets the currently active level value. 16 | pub fn active_level(&self) -> Option<&T> { 17 | self.active.and_then(|active| self.levels.get(active)) 18 | } 19 | } 20 | 21 | macro_rules! impl_get_clocks_levels { 22 | ($name:ident, $level:expr, $out:ty) => { 23 | /// Gets clocks levels. 24 | pub fn $name(&self) -> Result> { 25 | self.get_clock_levels($level) 26 | } 27 | }; 28 | } 29 | 30 | /// Type of a power level. 31 | #[allow(missing_docs)] 32 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 33 | #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] 34 | #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))] 35 | pub enum PowerLevelKind { 36 | CoreClock, 37 | MemoryClock, 38 | SOCClock, 39 | FabricClock, 40 | DCEFClock, 41 | PcieSpeed, 42 | } 43 | 44 | impl PowerLevelKind { 45 | /// Gets the filename of a given power level kind. 46 | pub fn filename(&self) -> &str { 47 | use PowerLevelKind::*; 48 | match self { 49 | CoreClock => "pp_dpm_sclk", 50 | MemoryClock => "pp_dpm_mclk", 51 | SOCClock => "pp_dpm_socclk", 52 | FabricClock => "pp_dpm_fclk", 53 | DCEFClock => "pp_dpm_dcefclk", 54 | PcieSpeed => "pp_dpm_pcie", 55 | } 56 | } 57 | 58 | /// Suffix of the power level value 59 | pub fn value_suffix(&self) -> Option<&str> { 60 | use PowerLevelKind::*; 61 | match self { 62 | CoreClock | MemoryClock | SOCClock | FabricClock | DCEFClock => Some("mhz"), 63 | PcieSpeed => None, 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_features: -------------------------------------------------------------------------------- 1 | features high: 0x0001a33d low: 0xfbffffff 2 | No. Feature Bit : State 3 | 00. FW_DATA_READ ( 0) : enabled 4 | 01. DPM_GFXCLK ( 1) : enabled 5 | 02. DPM_GFX_POWER_OPTIMIZER ( 2) : enabled 6 | 03. DPM_UCLK ( 3) : enabled 7 | 04. DPM_FCLK ( 4) : enabled 8 | 05. DPM_SOCCLK ( 5) : enabled 9 | 06. DPM_MP0CLK ( 6) : enabled 10 | 07. DPM_LINK ( 7) : enabled 11 | 08. DPM_DCN ( 8) : enabled 12 | 09. VMEMP_SCALING ( 9) : enabled 13 | 10. VDDIO_MEM_SCALING (10) : enabled 14 | 11. DS_GFXCLK (11) : enabled 15 | 12. DS_SOCCLK (12) : enabled 16 | 13. DS_FCLK (13) : enabled 17 | 14. DS_LCLK (14) : enabled 18 | 15. DS_DCFCLK (15) : enabled 19 | 16. DS_UCLK (16) : enabled 20 | 17. GFX_ULV (17) : enabled 21 | 18. FW_DSTATE (18) : enabled 22 | 19. GFXOFF (19) : enabled 23 | 20. BACO (20) : enabled 24 | 21. MM_DPM (21) : enabled 25 | 22. SOC_MPCLK_DS (22) : enabled 26 | 23. BACO_MPCLK_DS (23) : enabled 27 | 24. THROTTLERS (24) : enabled 28 | 25. SMARTSHIFT (25) : enabled 29 | 26. GTHR (26) : disabled 30 | 27. ACDC (27) : enabled 31 | 28. VR0HOT (28) : enabled 32 | 29. FW_CTF (29) : enabled 33 | 30. FAN_CONTROL (30) : enabled 34 | 31. GFX_DCS (31) : enabled 35 | 32. GFX_READ_MARGIN (32) : enabled 36 | 33. LED_DISPLAY (33) : disabled 37 | 34. GFXCLK_SPREAD_SPECTRUM (34) : enabled 38 | 35. OUT_OF_BAND_MONITOR (35) : enabled 39 | 36. OPTIMIZED_VMIN (36) : enabled 40 | 37. GFX_IMU (37) : enabled 41 | 38. BOOT_TIME_CAL (38) : disabled 42 | 39. GFX_PCC_DFLL (39) : disabled 43 | 40. SOC_CG (40) : enabled 44 | 41. DF_CSTATE (41) : enabled 45 | 42. GFX_EDC (42) : disabled 46 | 43. BOOT_POWER_OPT (43) : disabled 47 | 44. CLOCK_POWER_DOWN_BYPASS (44) : disabled 48 | 45. DS_VCN (45) : enabled 49 | 46. BACO_CG (46) : disabled 50 | 47. MEM_TEMP_READ (47) : enabled 51 | 48. ATHUB_MMHUB_PG (48) : enabled 52 | 49. SOC_PCC (49) : disabled 53 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_features: -------------------------------------------------------------------------------- 1 | features high: 0x0001a33d low: 0xfbffffff 2 | No. Feature Bit : State 3 | 00. FW_DATA_READ ( 0) : enabled 4 | 01. DPM_GFXCLK ( 1) : enabled 5 | 02. DPM_GFX_POWER_OPTIMIZER ( 2) : enabled 6 | 03. DPM_UCLK ( 3) : enabled 7 | 04. DPM_FCLK ( 4) : enabled 8 | 05. DPM_SOCCLK ( 5) : enabled 9 | 06. DPM_MP0CLK ( 6) : enabled 10 | 07. DPM_LINK ( 7) : enabled 11 | 08. DPM_DCN ( 8) : enabled 12 | 09. VMEMP_SCALING ( 9) : enabled 13 | 10. VDDIO_MEM_SCALING (10) : enabled 14 | 11. DS_GFXCLK (11) : enabled 15 | 12. DS_SOCCLK (12) : enabled 16 | 13. DS_FCLK (13) : enabled 17 | 14. DS_LCLK (14) : enabled 18 | 15. DS_DCFCLK (15) : enabled 19 | 16. DS_UCLK (16) : enabled 20 | 17. GFX_ULV (17) : enabled 21 | 18. FW_DSTATE (18) : enabled 22 | 19. GFXOFF (19) : enabled 23 | 20. BACO (20) : enabled 24 | 21. MM_DPM (21) : enabled 25 | 22. SOC_MPCLK_DS (22) : enabled 26 | 23. BACO_MPCLK_DS (23) : enabled 27 | 24. THROTTLERS (24) : enabled 28 | 25. SMARTSHIFT (25) : enabled 29 | 26. GTHR (26) : disabled 30 | 27. ACDC (27) : enabled 31 | 28. VR0HOT (28) : enabled 32 | 29. FW_CTF (29) : enabled 33 | 30. FAN_CONTROL (30) : enabled 34 | 31. GFX_DCS (31) : enabled 35 | 32. GFX_READ_MARGIN (32) : enabled 36 | 33. LED_DISPLAY (33) : disabled 37 | 34. GFXCLK_SPREAD_SPECTRUM (34) : enabled 38 | 35. OUT_OF_BAND_MONITOR (35) : enabled 39 | 36. OPTIMIZED_VMIN (36) : enabled 40 | 37. GFX_IMU (37) : enabled 41 | 38. BOOT_TIME_CAL (38) : disabled 42 | 39. GFX_PCC_DFLL (39) : disabled 43 | 40. SOC_CG (40) : enabled 44 | 41. DF_CSTATE (41) : enabled 45 | 42. GFX_EDC (42) : disabled 46 | 43. BOOT_POWER_OPT (43) : disabled 47 | 44. CLOCK_POWER_DOWN_BYPASS (44) : disabled 48 | 45. DS_VCN (45) : enabled 49 | 46. BACO_CG (46) : disabled 50 | 47. MEM_TEMP_READ (47) : enabled 51 | 48. ATHUB_MMHUB_PG (48) : enabled 52 | 49. SOC_PCC (49) : disabled 53 | -------------------------------------------------------------------------------- /tests/data/rx7800xt/pp_features: -------------------------------------------------------------------------------- 1 | features high: 0x0003ebbc low: 0x71ffffff 2 | No. Feature Bit : State 3 | 00. FW_DATA_READ ( 0) : enabled 4 | 01. DPM_GFXCLK ( 1) : enabled 5 | 02. DPM_GFX_POWER_OPTIMIZER ( 2) : enabled 6 | 03. DPM_UCLK ( 3) : enabled 7 | 04. DPM_FCLK ( 4) : enabled 8 | 05. DPM_SOCCLK ( 5) : enabled 9 | 06. DPM_MP0CLK ( 6) : enabled 10 | 07. DPM_LINK ( 7) : enabled 11 | 08. DPM_DCN ( 8) : enabled 12 | 09. VMEMP_SCALING ( 9) : enabled 13 | 10. VDDIO_MEM_SCALING (10) : enabled 14 | 11. DS_GFXCLK (11) : enabled 15 | 12. DS_SOCCLK (12) : enabled 16 | 13. DS_FCLK (13) : enabled 17 | 14. DS_LCLK (14) : enabled 18 | 15. DS_DCFCLK (15) : enabled 19 | 16. DS_UCLK (16) : enabled 20 | 17. GFX_ULV (17) : enabled 21 | 18. FW_DSTATE (18) : enabled 22 | 19. GFXOFF (19) : enabled 23 | 20. BACO (20) : enabled 24 | 21. MM_DPM (21) : enabled 25 | 22. SOC_MPCLK_DS (22) : enabled 26 | 23. BACO_MPCLK_DS (23) : enabled 27 | 24. THROTTLERS (24) : enabled 28 | 25. SMARTSHIFT (25) : disabled 29 | 26. GTHR (26) : disabled 30 | 27. ACDC (27) : disabled 31 | 28. VR0HOT (28) : enabled 32 | 29. FW_CTF (29) : enabled 33 | 30. FAN_CONTROL (30) : enabled 34 | 31. GFX_DCS (31) : disabled 35 | 32. GFX_READ_MARGIN (32) : disabled 36 | 33. LED_DISPLAY (33) : disabled 37 | 34. GFXCLK_SPREAD_SPECTRUM (34) : enabled 38 | 35. OUT_OF_BAND_MONITOR (35) : enabled 39 | 36. OPTIMIZED_VMIN (36) : enabled 40 | 37. GFX_IMU (37) : enabled 41 | 38. BOOT_TIME_CAL (38) : disabled 42 | 39. GFX_PCC_DFLL (39) : enabled 43 | 40. SOC_CG (40) : enabled 44 | 41. DF_CSTATE (41) : enabled 45 | 42. GFX_EDC (42) : disabled 46 | 43. BOOT_POWER_OPT (43) : enabled 47 | 44. CLOCK_POWER_DOWN_BYPASS (44) : disabled 48 | 45. DS_VCN (45) : enabled 49 | 46. BACO_CG (46) : enabled 50 | 47. MEM_TEMP_READ (47) : enabled 51 | 48. ATHUB_MMHUB_PG (48) : enabled 52 | 49. SOC_PCC (49) : enabled 53 | -------------------------------------------------------------------------------- /tests/data/rx7900xt/pp_features: -------------------------------------------------------------------------------- 1 | features high: 0x0003ebb8 low: 0x71ffffff 2 | No. Feature Bit : State 3 | 00. FW_DATA_READ ( 0) : enabled 4 | 01. DPM_GFXCLK ( 1) : enabled 5 | 02. DPM_GFX_POWER_OPTIMIZER ( 2) : enabled 6 | 03. DPM_UCLK ( 3) : enabled 7 | 04. DPM_FCLK ( 4) : enabled 8 | 05. DPM_SOCCLK ( 5) : enabled 9 | 06. DPM_MP0CLK ( 6) : enabled 10 | 07. DPM_LINK ( 7) : enabled 11 | 08. DPM_DCN ( 8) : enabled 12 | 09. VMEMP_SCALING ( 9) : enabled 13 | 10. VDDIO_MEM_SCALING (10) : enabled 14 | 11. DS_GFXCLK (11) : enabled 15 | 12. DS_SOCCLK (12) : enabled 16 | 13. DS_FCLK (13) : enabled 17 | 14. DS_LCLK (14) : enabled 18 | 15. DS_DCFCLK (15) : enabled 19 | 16. DS_UCLK (16) : enabled 20 | 17. GFX_ULV (17) : enabled 21 | 18. FW_DSTATE (18) : enabled 22 | 19. GFXOFF (19) : enabled 23 | 20. BACO (20) : enabled 24 | 21. MM_DPM (21) : enabled 25 | 22. SOC_MPCLK_DS (22) : enabled 26 | 23. BACO_MPCLK_DS (23) : enabled 27 | 24. THROTTLERS (24) : enabled 28 | 25. SMARTSHIFT (25) : disabled 29 | 26. GTHR (26) : disabled 30 | 27. ACDC (27) : disabled 31 | 28. VR0HOT (28) : enabled 32 | 29. FW_CTF (29) : enabled 33 | 30. FAN_CONTROL (30) : enabled 34 | 31. GFX_DCS (31) : disabled 35 | 32. GFX_READ_MARGIN (32) : disabled 36 | 33. LED_DISPLAY (33) : disabled 37 | 34. GFXCLK_SPREAD_SPECTRUM (34) : disabled 38 | 35. OUT_OF_BAND_MONITOR (35) : enabled 39 | 36. OPTIMIZED_VMIN (36) : enabled 40 | 37. GFX_IMU (37) : enabled 41 | 38. BOOT_TIME_CAL (38) : disabled 42 | 39. GFX_PCC_DFLL (39) : enabled 43 | 40. SOC_CG (40) : enabled 44 | 41. DF_CSTATE (41) : enabled 45 | 42. GFX_EDC (42) : disabled 46 | 43. BOOT_POWER_OPT (43) : enabled 47 | 44. CLOCK_POWER_DOWN_BYPASS (44) : disabled 48 | 45. DS_VCN (45) : enabled 49 | 46. BACO_CG (46) : enabled 50 | 47. MEM_TEMP_READ (47) : enabled 51 | 48. ATHUB_MMHUB_PG (48) : enabled 52 | 49. SOC_PCC (49) : enabled 53 | -------------------------------------------------------------------------------- /tests/data/rx9070xt/pp_features: -------------------------------------------------------------------------------- 1 | features high: 0x048cf19e low: 0x38fffcfb 2 | No. Feature Bit : State 3 | 00. FW_DATA_READ ( 0) : enabled 4 | 01. DPM_GFXCLK ( 1) : enabled 5 | 02. DPM_GFX_POWER_OPTIMIZER ( 2) : disabled 6 | 03. DPM_UCLK ( 3) : enabled 7 | 04. DPM_FCLK ( 4) : enabled 8 | 05. DPM_SOCCLK ( 5) : enabled 9 | 06. DPM_LINK ( 6) : enabled 10 | 07. DPM_DCN ( 7) : enabled 11 | 08. VMEMP_SCALING ( 8) : disabled 12 | 09. VDDIO_MEM_SCALING ( 9) : disabled 13 | 10. DS_GFXCLK (10) : enabled 14 | 11. DS_SOCCLK (11) : enabled 15 | 12. DS_FCLK (12) : enabled 16 | 13. DS_LCLK (13) : enabled 17 | 14. DS_DCFCLK (14) : enabled 18 | 15. DS_UCLK (15) : enabled 19 | 16. GFX_ULV (16) : enabled 20 | 17. FW_DSTATE (17) : enabled 21 | 18. GFXOFF (18) : enabled 22 | 19. BACO (19) : enabled 23 | 20. MM_DPM (20) : enabled 24 | 21. SOC_MPCLK_DS (21) : enabled 25 | 22. BACO_MPCLK_DS (22) : enabled 26 | 23. THROTTLERS (23) : enabled 27 | 24. SMARTSHIFT (24) : disabled 28 | 25. GTHR (25) : disabled 29 | 26. ACDC (26) : disabled 30 | 27. VR0HOT (27) : enabled 31 | 28. FW_CTF (28) : enabled 32 | 29. FAN_CONTROL (29) : enabled 33 | 30. GFX_DCS (30) : disabled 34 | 31. GFX_READ_MARGIN (31) : disabled 35 | 32. LED_DISPLAY (32) : disabled 36 | 33. GFXCLK_SPREAD_SPECTRUM (33) : enabled 37 | 34. OUT_OF_BAND_MONITOR (34) : enabled 38 | 35. OPTIMIZED_VMIN (35) : enabled 39 | 36. GFX_IMU (36) : enabled 40 | 37. BOOT_TIME_CAL (37) : disabled 41 | 38. GFX_PCC_DFLL (38) : disabled 42 | 39. SOC_CG (39) : enabled 43 | 40. DF_CSTATE (40) : enabled 44 | 41. GFX_EDC (41) : disabled 45 | 42. BOOT_POWER_OPT (42) : disabled 46 | 43. CLOCK_POWER_DOWN_BYPASS (43) : disabled 47 | 44. DS_VCN (44) : enabled 48 | 45. BACO_CG (45) : enabled 49 | 46. MEM_TEMP_READ (46) : enabled 50 | 47. ATHUB_MMHUB_PG (47) : enabled 51 | 48. SOC_PCC (48) : disabled 52 | 49. EDC_PWRBRK (49) : disabled 53 | 50. SOC_EDC_XVMIN (50) : enabled 54 | 51. GFX_PSM_DIDT (51) : enabled 55 | 52. APT_ALL_ENABLE (52) : disabled 56 | 53. APT_SQ_THROTTLE (53) : disabled 57 | -------------------------------------------------------------------------------- /tests/data/rx7600s/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | 0 BOOTUP_DEFAULT 1 3D_FULL_SCREEN 2 POWER_SAVING 3 VIDEO 4 VR * 5 COMPUTE 6 CUSTOM 7 WINDOW_3D 2 | Gfx_ActiveHystLimit 0 0 0 0 0 0 0 0 3 | Gfx_IdleHystLimit 0 2 0 0 1 1 0 2 4 | Gfx_FPS 0 0 0 0 0 0 0 0 5 | Gfx_MinActiveFreqType 1 1 1 1 4 4 1 1 6 | Gfx_BoosterFreqType 4 4 3 4 1 1 4 4 7 | Gfx_MinActiveFreq 0 0 0 0 1000 1000 0 0 8 | Gfx_BoosterFreq 800 650 0 0 0 0 800 650 9 | Fclk_ActiveHystLimit 0 0 0 0 0 0 0 0 10 | Fclk_IdleHystLimit 0 0 0 0 0 0 0 0 11 | Fclk_FPS 0 0 0 0 0 0 0 0 12 | Fclk_MinActiveFreqType 3 1 1 1 1 1 3 3 13 | Fclk_BoosterFreqType 1 1 1 1 1 1 1 1 14 | Fclk_MinActiveFreq 0 0 0 0 0 0 0 0 15 | Fclk_BoosterFreq 0 0 0 0 0 0 0 0 16 | -------------------------------------------------------------------------------- /tests/data/rx7700s/pp_power_profile_mode: -------------------------------------------------------------------------------- 1 | 0 BOOTUP_DEFAULT* 1 3D_FULL_SCREEN 2 POWER_SAVING 3 VIDEO 4 VR 5 COMPUTE 6 CUSTOM 7 WINDOW_3D 2 | Gfx_ActiveHystLimit 0 0 0 0 0 0 0 0 3 | Gfx_IdleHystLimit 0 2 0 0 1 1 0 2 4 | Gfx_FPS 0 0 0 0 0 0 0 0 5 | Gfx_MinActiveFreqType 1 1 1 1 4 4 1 1 6 | Gfx_BoosterFreqType 4 4 3 4 1 1 4 4 7 | Gfx_MinActiveFreq 0 0 0 0 1000 1000 0 0 8 | Gfx_BoosterFreq 800 650 0 0 0 0 800 650 9 | Fclk_ActiveHystLimit 0 0 0 0 0 0 0 0 10 | Fclk_IdleHystLimit 0 0 0 0 0 0 0 0 11 | Fclk_FPS 0 0 0 0 0 0 0 0 12 | Fclk_MinActiveFreqType 3 1 1 1 1 1 3 3 13 | Fclk_BoosterFreqType 1 1 1 1 1 1 1 1 14 | Fclk_MinActiveFreq 0 0 0 0 0 0 0 0 15 | Fclk_BoosterFreq 0 0 0 0 0 0 0 0 16 | -------------------------------------------------------------------------------- /tests/sysfs/mod.rs: -------------------------------------------------------------------------------- 1 | use amdgpu_sysfs::{gpu_handle::GpuHandle, sysfs::SysFS}; 2 | use rust_embed::RustEmbed; 3 | use std::fs; 4 | use tempfile::{tempdir, TempDir}; 5 | 6 | #[derive(RustEmbed)] 7 | #[folder = "tests/data/"] 8 | struct Asset; 9 | 10 | pub struct MockSysFs { 11 | temp_dir: TempDir, 12 | } 13 | 14 | impl MockSysFs { 15 | pub fn new(name: &str) -> Self { 16 | let temp_dir = tempdir().expect("Failed to create temp dir"); 17 | let path = temp_dir.path(); 18 | 19 | let path_prefix = format!("{name}/"); 20 | for file_name in Asset::iter() { 21 | if let Some(stripped_name) = file_name.strip_prefix(&path_prefix) { 22 | let target_path = path.join(stripped_name); 23 | 24 | if let Some(parent) = target_path.parent() { 25 | fs::create_dir_all(parent).expect("Could not create parent dir in temp dir"); 26 | } 27 | 28 | let contents = Asset::get(&file_name) 29 | .expect("Could not read file from embedded fs") 30 | .data; 31 | fs::write(target_path, contents).expect("Could not write contents to temp dir"); 32 | } 33 | } 34 | 35 | Self { temp_dir } 36 | } 37 | } 38 | 39 | impl SysFS for MockSysFs { 40 | fn get_path(&self) -> &std::path::Path { 41 | self.temp_dir.path() 42 | } 43 | } 44 | 45 | pub fn create_mock_gpu_handle(name: &str) -> (GpuHandle, MockSysFs) { 46 | let mockfs = MockSysFs::new(name); 47 | 48 | ( 49 | GpuHandle::new_from_path(mockfs.get_path().to_path_buf()) 50 | .expect("Failed to create GPU handle"), 51 | mockfs, 52 | ) 53 | } 54 | 55 | #[macro_export] 56 | macro_rules! test_with_handle { 57 | ($sysfs_name:expr, $($test_name:ident => {$($code:expr, $expected:expr),* $(,)?}),* $(,)?) => { 58 | $( 59 | #[test] 60 | fn $test_name() { 61 | let (handle, _mockfs) = $crate::sysfs::create_mock_gpu_handle($sysfs_name); 62 | $( 63 | let value = $code(&handle); 64 | pretty_assertions::assert_eq!(value, $expected); 65 | )* 66 | } 67 | )* 68 | }; 69 | } 70 | 71 | #[macro_export] 72 | macro_rules! test_with_hw_mon { 73 | ($sysfs_name:expr, $($test_name:ident => {$($code:expr, $expected:expr),* $(,)?}),* $(,)?) => { 74 | $( 75 | #[test] 76 | fn $test_name() { 77 | let (handle, _mockfs) = $crate::sysfs::create_mock_gpu_handle($sysfs_name); 78 | let hw_mon = handle.hw_monitors.first().expect("Handle has no hw monitor"); 79 | $( 80 | let value = $code(&hw_mon); 81 | pretty_assertions::assert_eq!(value, $expected); 82 | )* 83 | } 84 | )* 85 | }; 86 | } 87 | -------------------------------------------------------------------------------- /tests/rx580.rs: -------------------------------------------------------------------------------- 1 | mod sysfs; 2 | 3 | use amdgpu_sysfs::{ 4 | gpu_handle::{GpuHandle, PerformanceLevel, PowerLevels}, 5 | hw_mon::{HwMon, Temperature}, 6 | }; 7 | use std::collections::HashMap; 8 | 9 | test_with_handle! { 10 | "rx580", 11 | pci_ids => { 12 | GpuHandle::get_pci_id, Some(("1002", "67DF")), 13 | GpuHandle::get_pci_subsys_id, Some(("1DA2", "E387")), 14 | }, 15 | driver => { 16 | GpuHandle::get_driver, "amdgpu" 17 | }, 18 | busy_percent => { 19 | GpuHandle::get_busy_percent, Ok(11) 20 | }, 21 | vram => { 22 | GpuHandle::get_total_vram, Ok(4096 * 1024 * 1024), 23 | GpuHandle::get_used_vram, Ok(512 * 1024 * 1024), 24 | }, 25 | vbios => { 26 | GpuHandle::get_vbios_version, Ok("113-1E3871U-O4C".to_owned()) 27 | }, 28 | performance_level => { 29 | GpuHandle::get_power_force_performance_level, Ok(PerformanceLevel::Auto), 30 | }, 31 | link => { 32 | GpuHandle::get_current_link_speed, Ok("8.0 GT/s PCIe".to_owned()), 33 | GpuHandle::get_current_link_width, Ok("16".to_owned()), 34 | GpuHandle::get_max_link_speed, Ok("8.0 GT/s PCIe".to_owned()), 35 | GpuHandle::get_max_link_width, Ok("16".to_owned()), 36 | }, 37 | pp_dpm_sclk => { 38 | GpuHandle::get_core_clock_levels, 39 | Ok(PowerLevels { 40 | levels: vec![ 41 | 300, 42 | 600, 43 | 900, 44 | 1145, 45 | 1215, 46 | 1257, 47 | 1300, 48 | 1366 49 | ], 50 | active: Some(2) 51 | }) 52 | }, 53 | pp_dpm_mclk => { 54 | GpuHandle::get_memory_clock_levels, 55 | Ok(PowerLevels { 56 | levels: vec![ 57 | 300, 58 | 1000, 59 | 1750, 60 | ], 61 | active: Some(2) 62 | }) 63 | }, 64 | pp_dpm_pcie => { 65 | GpuHandle::get_pcie_clock_levels, 66 | Ok(PowerLevels { 67 | levels: [ 68 | "2.5GT/s, x8", 69 | "8.0GT/s, x16" 70 | ].map(str::to_owned).to_vec(), 71 | active: Some(1) 72 | }) 73 | } 74 | } 75 | 76 | test_with_hw_mon! { 77 | "rx580", 78 | fan_info => { 79 | HwMon::get_fan_pwm, Ok(35), 80 | HwMon::get_fan_current, Ok(595), 81 | HwMon::get_fan_target, Ok(595), 82 | HwMon::get_fan_min, Ok(0), 83 | HwMon::get_fan_max, Ok(3200), 84 | }, 85 | temperatures => { 86 | HwMon::get_temps, 87 | HashMap::from([( 88 | "edge".to_owned(), 89 | Temperature { 90 | current: Some(44.0), 91 | crit: Some(94.0), 92 | crit_hyst: Some(-273.15) 93 | } 94 | )]) 95 | }, 96 | gpu_voltage => { 97 | HwMon::get_gpu_voltage, Ok(975) 98 | }, 99 | } 100 | -------------------------------------------------------------------------------- /src/gpu_handle/snapshots/amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx7600s.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/power_profile_mode.rs 3 | expression: table 4 | --- 5 | modes: 6 | 0: 7 | name: BOOTUP_DEFAULT 8 | components: 9 | - clock_type: ~ 10 | values: 11 | - 0 12 | - 0 13 | - 0 14 | - 1 15 | - 4 16 | - 0 17 | - 800 18 | - 0 19 | - 0 20 | - 0 21 | - 3 22 | - 1 23 | - 0 24 | - 0 25 | 1: 26 | name: 3D_FULL_SCREEN 27 | components: 28 | - clock_type: ~ 29 | values: 30 | - 0 31 | - 2 32 | - 0 33 | - 1 34 | - 4 35 | - 0 36 | - 650 37 | - 0 38 | - 0 39 | - 0 40 | - 1 41 | - 1 42 | - 0 43 | - 0 44 | 2: 45 | name: POWER_SAVING 46 | components: 47 | - clock_type: ~ 48 | values: 49 | - 0 50 | - 0 51 | - 0 52 | - 1 53 | - 3 54 | - 0 55 | - 0 56 | - 0 57 | - 0 58 | - 0 59 | - 1 60 | - 1 61 | - 0 62 | - 0 63 | 3: 64 | name: VIDEO 65 | components: 66 | - clock_type: ~ 67 | values: 68 | - 0 69 | - 0 70 | - 0 71 | - 1 72 | - 4 73 | - 0 74 | - 0 75 | - 0 76 | - 0 77 | - 0 78 | - 1 79 | - 1 80 | - 0 81 | - 0 82 | 4: 83 | name: VR 84 | components: 85 | - clock_type: ~ 86 | values: 87 | - 0 88 | - 1 89 | - 0 90 | - 4 91 | - 1 92 | - 1000 93 | - 0 94 | - 0 95 | - 0 96 | - 0 97 | - 1 98 | - 1 99 | - 0 100 | - 0 101 | 5: 102 | name: COMPUTE 103 | components: 104 | - clock_type: ~ 105 | values: 106 | - 0 107 | - 1 108 | - 0 109 | - 4 110 | - 1 111 | - 1000 112 | - 0 113 | - 0 114 | - 0 115 | - 0 116 | - 1 117 | - 1 118 | - 0 119 | - 0 120 | 6: 121 | name: CUSTOM 122 | components: 123 | - clock_type: ~ 124 | values: 125 | - 0 126 | - 0 127 | - 0 128 | - 1 129 | - 4 130 | - 0 131 | - 800 132 | - 0 133 | - 0 134 | - 0 135 | - 3 136 | - 1 137 | - 0 138 | - 0 139 | 7: 140 | name: WINDOW_3D 141 | components: 142 | - clock_type: ~ 143 | values: 144 | - 0 145 | - 2 146 | - 0 147 | - 1 148 | - 4 149 | - 0 150 | - 650 151 | - 0 152 | - 0 153 | - 0 154 | - 3 155 | - 1 156 | - 0 157 | - 0 158 | value_names: 159 | - Gfx_ActiveHystLimit 160 | - Gfx_IdleHystLimit 161 | - Gfx_FPS 162 | - Gfx_MinActiveFreqType 163 | - Gfx_BoosterFreqType 164 | - Gfx_MinActiveFreq 165 | - Gfx_BoosterFreq 166 | - Fclk_ActiveHystLimit 167 | - Fclk_IdleHystLimit 168 | - Fclk_FPS 169 | - Fclk_MinActiveFreqType 170 | - Fclk_BoosterFreqType 171 | - Fclk_MinActiveFreq 172 | - Fclk_BoosterFreq 173 | active: 4 174 | -------------------------------------------------------------------------------- /src/gpu_handle/snapshots/amdgpu_sysfs__gpu_handle__power_profile_mode__tests__parse_full_rx7700s.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: src/gpu_handle/power_profile_mode.rs 3 | expression: table 4 | --- 5 | modes: 6 | 0: 7 | name: BOOTUP_DEFAULT 8 | components: 9 | - clock_type: ~ 10 | values: 11 | - 0 12 | - 0 13 | - 0 14 | - 1 15 | - 4 16 | - 0 17 | - 800 18 | - 0 19 | - 0 20 | - 0 21 | - 3 22 | - 1 23 | - 0 24 | - 0 25 | 1: 26 | name: 3D_FULL_SCREEN 27 | components: 28 | - clock_type: ~ 29 | values: 30 | - 0 31 | - 2 32 | - 0 33 | - 1 34 | - 4 35 | - 0 36 | - 650 37 | - 0 38 | - 0 39 | - 0 40 | - 1 41 | - 1 42 | - 0 43 | - 0 44 | 2: 45 | name: POWER_SAVING 46 | components: 47 | - clock_type: ~ 48 | values: 49 | - 0 50 | - 0 51 | - 0 52 | - 1 53 | - 3 54 | - 0 55 | - 0 56 | - 0 57 | - 0 58 | - 0 59 | - 1 60 | - 1 61 | - 0 62 | - 0 63 | 3: 64 | name: VIDEO 65 | components: 66 | - clock_type: ~ 67 | values: 68 | - 0 69 | - 0 70 | - 0 71 | - 1 72 | - 4 73 | - 0 74 | - 0 75 | - 0 76 | - 0 77 | - 0 78 | - 1 79 | - 1 80 | - 0 81 | - 0 82 | 4: 83 | name: VR 84 | components: 85 | - clock_type: ~ 86 | values: 87 | - 0 88 | - 1 89 | - 0 90 | - 4 91 | - 1 92 | - 1000 93 | - 0 94 | - 0 95 | - 0 96 | - 0 97 | - 1 98 | - 1 99 | - 0 100 | - 0 101 | 5: 102 | name: COMPUTE 103 | components: 104 | - clock_type: ~ 105 | values: 106 | - 0 107 | - 1 108 | - 0 109 | - 4 110 | - 1 111 | - 1000 112 | - 0 113 | - 0 114 | - 0 115 | - 0 116 | - 1 117 | - 1 118 | - 0 119 | - 0 120 | 6: 121 | name: CUSTOM 122 | components: 123 | - clock_type: ~ 124 | values: 125 | - 0 126 | - 0 127 | - 0 128 | - 1 129 | - 4 130 | - 0 131 | - 800 132 | - 0 133 | - 0 134 | - 0 135 | - 3 136 | - 1 137 | - 0 138 | - 0 139 | 7: 140 | name: WINDOW_3D 141 | components: 142 | - clock_type: ~ 143 | values: 144 | - 0 145 | - 2 146 | - 0 147 | - 1 148 | - 4 149 | - 0 150 | - 650 151 | - 0 152 | - 0 153 | - 0 154 | - 3 155 | - 1 156 | - 0 157 | - 0 158 | value_names: 159 | - Gfx_ActiveHystLimit 160 | - Gfx_IdleHystLimit 161 | - Gfx_FPS 162 | - Gfx_MinActiveFreqType 163 | - Gfx_BoosterFreqType 164 | - Gfx_MinActiveFreq 165 | - Gfx_BoosterFreq 166 | - Fclk_ActiveHystLimit 167 | - Fclk_IdleHystLimit 168 | - Fclk_FPS 169 | - Fclk_MinActiveFreqType 170 | - Fclk_BoosterFreqType 171 | - Fclk_MinActiveFreq 172 | - Fclk_BoosterFreq 173 | active: 0 174 | -------------------------------------------------------------------------------- /tests/vega56.rs: -------------------------------------------------------------------------------- 1 | mod sysfs; 2 | 3 | use amdgpu_sysfs::{ 4 | gpu_handle::{GpuHandle, PerformanceLevel, PowerLevels}, 5 | hw_mon::{HwMon, Temperature}, 6 | }; 7 | use std::collections::HashMap; 8 | 9 | test_with_handle! { 10 | "vega56", 11 | pci_ids => { 12 | GpuHandle::get_pci_id, Some(("1002", "687F")), 13 | GpuHandle::get_pci_subsys_id, Some(("1043", "0555")), 14 | }, 15 | driver => { 16 | GpuHandle::get_driver, "amdgpu" 17 | }, 18 | busy_percent => { 19 | GpuHandle::get_busy_percent, Ok(0) 20 | }, 21 | vram => { 22 | GpuHandle::get_total_vram, Ok(8176 * 1024 * 1024), 23 | GpuHandle::get_used_vram, Ok(16224 * 1024), 24 | }, 25 | vbios => { 26 | GpuHandle::get_vbios_version, Ok("115-D050PIL-100".to_owned()) 27 | }, 28 | performance_level => { 29 | GpuHandle::get_power_force_performance_level, Ok(PerformanceLevel::Auto), 30 | }, 31 | link => { 32 | GpuHandle::get_current_link_speed, Ok("8.0 GT/s PCIe".to_owned()), 33 | GpuHandle::get_current_link_width, Ok("16".to_owned()), 34 | GpuHandle::get_max_link_speed, Ok("8.0 GT/s PCIe".to_owned()), 35 | GpuHandle::get_max_link_width, Ok("16".to_owned()), 36 | }, 37 | vram_vendor => { 38 | GpuHandle::get_vram_vendor, Ok("hynix".to_owned()), 39 | }, 40 | pp_dpm_sclk => { 41 | GpuHandle::get_core_clock_levels, 42 | Ok(PowerLevels { 43 | levels: vec![ 44 | 852, 45 | 991, 46 | 1138, 47 | 1269, 48 | 1312, 49 | 1474, 50 | 1538, 51 | 1590 52 | ], 53 | active: Some(0) 54 | }) 55 | }, 56 | pp_dpm_mclk => { 57 | GpuHandle::get_memory_clock_levels, 58 | Ok(PowerLevels { 59 | levels: vec![ 60 | 167, 61 | 500, 62 | 700, 63 | 920, 64 | ], 65 | active: Some(0) 66 | }) 67 | }, 68 | pp_dpm_pcie => { 69 | GpuHandle::get_pcie_clock_levels, 70 | Ok(PowerLevels { 71 | levels: [ 72 | "8.0GT/s, x16", 73 | "8.0GT/s, x16" 74 | ].map(str::to_owned).to_vec(), 75 | active: None 76 | }) 77 | } 78 | } 79 | 80 | test_with_hw_mon! { 81 | "vega56", 82 | fan_info => { 83 | HwMon::get_fan_pwm, Ok(0), 84 | HwMon::get_fan_current, Ok(5), 85 | HwMon::get_fan_target, Ok(5), 86 | HwMon::get_fan_min, Ok(0), 87 | HwMon::get_fan_max, Ok(3500), 88 | }, 89 | temperatures => { 90 | HwMon::get_temps, 91 | HashMap::from([ 92 | ( 93 | "edge".to_owned(), 94 | Temperature { 95 | current: Some(38.0), 96 | crit: Some(85.0), 97 | crit_hyst: Some(-273.15) 98 | } 99 | ), 100 | ( 101 | "junction".to_owned(), 102 | Temperature { 103 | current: Some(38.0), 104 | crit: Some(105.0), 105 | crit_hyst: Some(-273.15) 106 | } 107 | ), 108 | ( 109 | "mem".to_owned(), 110 | Temperature { 111 | current: Some(39.0), 112 | crit: Some(95.0), 113 | crit_hyst: Some(-273.15) 114 | } 115 | ) 116 | ]) 117 | }, 118 | gpu_voltage => { 119 | HwMon::get_gpu_voltage, Ok(762) 120 | }, 121 | } 122 | -------------------------------------------------------------------------------- /src/error/mod.rs: -------------------------------------------------------------------------------- 1 | //! SysFS errors 2 | mod context; 3 | 4 | pub(crate) use context::ErrorContext; 5 | 6 | use std::{ 7 | fmt::Display, 8 | num::{ParseFloatError, ParseIntError}, 9 | }; 10 | 11 | #[derive(Debug, PartialEq)] 12 | /// An error that can happen when working with the SysFs 13 | pub struct Error { 14 | context: Option, 15 | /// The error kind 16 | pub kind: ErrorKind, 17 | } 18 | 19 | /// Possible types of errors 20 | #[derive(Debug)] 21 | pub enum ErrorKind { 22 | /// It is not allowed to perform the given action 23 | NotAllowed(String), 24 | /// Something is potentially unsupported by this library 25 | Unsupported(String), 26 | /// The given path is not a valid SysFs 27 | InvalidSysFS, 28 | /// An error that happens during parsing 29 | ParseError { 30 | /// What went wrong during parsing 31 | msg: String, 32 | /// The line where the error occured 33 | line: usize, 34 | }, 35 | /// An IO error 36 | IoError(std::io::Error), 37 | } 38 | 39 | impl Error { 40 | pub(crate) fn unexpected_eol(expected_item: T, line: usize) -> Self { 41 | ErrorKind::ParseError { 42 | msg: format!("Unexpected EOL, expected {expected_item}"), 43 | line, 44 | } 45 | .into() 46 | } 47 | 48 | pub(crate) fn basic_parse_error(msg: impl Into) -> Self { 49 | ErrorKind::ParseError { 50 | msg: msg.into(), 51 | line: 1, 52 | } 53 | .into() 54 | } 55 | 56 | pub(crate) fn not_allowed(msg: String) -> Self { 57 | ErrorKind::NotAllowed(msg).into() 58 | } 59 | 60 | /// If the error means that the file doesn't exist 61 | pub fn is_not_found(&self) -> bool { 62 | matches!(&self.kind, ErrorKind::IoError(io_err) if io_err.kind() == std::io::ErrorKind::NotFound) 63 | } 64 | } 65 | 66 | impl Display for Error { 67 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 68 | match &self.kind { 69 | ErrorKind::NotAllowed(info) => write!(f, "not allowed: {info}")?, 70 | ErrorKind::InvalidSysFS => write!(f, "invalid SysFS")?, 71 | ErrorKind::ParseError { msg, line } => write!(f, "parse error: {msg} at line {line}")?, 72 | ErrorKind::IoError(error) => write!(f, "io error: {error}")?, 73 | ErrorKind::Unsupported(err) => write!(f, "unsupported: {err}")?, 74 | } 75 | 76 | if let Some(ctx) = &self.context { 77 | write!(f, "\n{ctx}")?; 78 | } 79 | 80 | Ok(()) 81 | } 82 | } 83 | 84 | impl std::error::Error for Error {} 85 | 86 | impl From for Error { 87 | fn from(kind: ErrorKind) -> Self { 88 | Self { 89 | context: None, 90 | kind, 91 | } 92 | } 93 | } 94 | 95 | impl From for Error { 96 | fn from(err: std::io::Error) -> Self { 97 | Self { 98 | context: None, 99 | kind: ErrorKind::IoError(err), 100 | } 101 | } 102 | } 103 | 104 | impl From for Error { 105 | fn from(err: ParseIntError) -> Self { 106 | Self::basic_parse_error(err.to_string()) 107 | } 108 | } 109 | 110 | impl From for Error { 111 | fn from(err: ParseFloatError) -> Self { 112 | Self::basic_parse_error(err.to_string()) 113 | } 114 | } 115 | 116 | impl PartialEq for ErrorKind { 117 | fn eq(&self, other: &Self) -> bool { 118 | match (self, other) { 119 | (Self::IoError(l0), Self::IoError(r0)) => l0.kind() == r0.kind(), 120 | _ => core::mem::discriminant(self) == core::mem::discriminant(other), 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/irq: -------------------------------------------------------------------------------- 1 | 157 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/pcie_bw: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/boot_vga: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/class: -------------------------------------------------------------------------------- 1 | 0x030000 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/enable: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/modalias: -------------------------------------------------------------------------------- 1 | pci:v00001002d000073BFsv00001DA2sd0000440Ebc03sc00i00 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/msi_bus: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/revision: -------------------------------------------------------------------------------- 1 | 0xc0 2 | -------------------------------------------------------------------------------- /tests/data/rx6900xt/vendor: -------------------------------------------------------------------------------- 1 | 0x1002 2 | --------------------------------------------------------------------------------