Lines Matching refs:attr
120 struct device_attribute *attr, in amdgpu_get_power_dpm_state() argument
155 struct device_attribute *attr, in amdgpu_set_power_dpm_state() argument
264 struct device_attribute *attr, in amdgpu_get_power_dpm_force_performance_level() argument
305 struct device_attribute *attr, in amdgpu_set_power_dpm_force_performance_level() argument
407 struct device_attribute *attr, in amdgpu_get_pp_num_states() argument
449 struct device_attribute *attr, in amdgpu_get_pp_cur_state() argument
491 struct device_attribute *attr, in amdgpu_get_pp_force_state() argument
503 return amdgpu_get_pp_cur_state(dev, attr, buf); in amdgpu_get_pp_force_state()
509 struct device_attribute *attr, in amdgpu_set_pp_force_state() argument
573 struct device_attribute *attr, in amdgpu_get_pp_table() argument
613 struct device_attribute *attr, in amdgpu_set_pp_table() argument
790 struct device_attribute *attr, in amdgpu_set_pp_od_clk_voltage() argument
904 struct device_attribute *attr, in amdgpu_get_pp_od_clk_voltage() argument
956 struct device_attribute *attr, in amdgpu_set_pp_features() argument
995 struct device_attribute *attr, in amdgpu_get_pp_features() argument
1161 struct device_attribute *attr, in amdgpu_get_pp_dpm_sclk() argument
1168 struct device_attribute *attr, in amdgpu_set_pp_dpm_sclk() argument
1176 struct device_attribute *attr, in amdgpu_get_pp_dpm_mclk() argument
1183 struct device_attribute *attr, in amdgpu_set_pp_dpm_mclk() argument
1191 struct device_attribute *attr, in amdgpu_get_pp_dpm_socclk() argument
1198 struct device_attribute *attr, in amdgpu_set_pp_dpm_socclk() argument
1206 struct device_attribute *attr, in amdgpu_get_pp_dpm_fclk() argument
1213 struct device_attribute *attr, in amdgpu_set_pp_dpm_fclk() argument
1221 struct device_attribute *attr, in amdgpu_get_pp_dpm_vclk() argument
1228 struct device_attribute *attr, in amdgpu_set_pp_dpm_vclk() argument
1236 struct device_attribute *attr, in amdgpu_get_pp_dpm_dclk() argument
1243 struct device_attribute *attr, in amdgpu_set_pp_dpm_dclk() argument
1251 struct device_attribute *attr, in amdgpu_get_pp_dpm_dcefclk() argument
1258 struct device_attribute *attr, in amdgpu_set_pp_dpm_dcefclk() argument
1266 struct device_attribute *attr, in amdgpu_get_pp_dpm_pcie() argument
1273 struct device_attribute *attr, in amdgpu_set_pp_dpm_pcie() argument
1281 struct device_attribute *attr, in amdgpu_get_pp_sclk_od() argument
1312 struct device_attribute *attr, in amdgpu_set_pp_sclk_od() argument
1358 struct device_attribute *attr, in amdgpu_get_pp_mclk_od() argument
1389 struct device_attribute *attr, in amdgpu_set_pp_mclk_od() argument
1455 struct device_attribute *attr, in amdgpu_get_pp_power_profile_mode() argument
1487 struct device_attribute *attr, in amdgpu_set_pp_power_profile_mode() argument
1561 struct device_attribute *attr, in amdgpu_get_gpu_busy_percent() argument
1601 struct device_attribute *attr, in amdgpu_get_mem_busy_percent() argument
1645 struct device_attribute *attr, in amdgpu_get_pcie_bw() argument
1690 struct device_attribute *attr, in amdgpu_get_unique_id() argument
1723 struct device_attribute *attr, in amdgpu_get_thermal_throttling_logging() argument
1736 struct device_attribute *attr, in amdgpu_set_thermal_throttling_logging() argument
1787 struct device_attribute *attr, in amdgpu_get_gpu_metrics() argument
1835 static ssize_t amdgpu_get_smartshift_apu_power(struct device *dev, struct device_attribute *attr, in amdgpu_get_smartshift_apu_power() argument
1878 static ssize_t amdgpu_get_smartshift_dgpu_power(struct device *dev, struct device_attribute *attr, in amdgpu_get_smartshift_dgpu_power() argument
1921 struct device_attribute *attr, in amdgpu_get_smartshift_bias() argument
1932 struct device_attribute *attr, in amdgpu_set_smartshift_bias() argument
1972 static int ss_power_attr_update(struct amdgpu_device *adev, struct amdgpu_device_attr *attr, in ss_power_attr_update() argument
1992 static int ss_bias_attr_update(struct amdgpu_device *adev, struct amdgpu_device_attr *attr, in ss_bias_attr_update() argument
2043 static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_attr *attr, in default_attr_update() argument
2046 struct device_attribute *dev_attr = &attr->dev_attr; in default_attr_update()
2047 const char *attr_name = dev_attr->attr.name; in default_attr_update()
2051 if (!(attr->flags & mask)) { in default_attr_update()
2108 dev_attr->attr.mode &= ~S_IWUGO; in default_attr_update()
2119 dev_attr->attr.mode &= ~S_IWUGO; in default_attr_update()
2126 dev_attr->attr.mode &= ~S_IWUGO; in default_attr_update()
2137 struct amdgpu_device_attr *attr, in amdgpu_device_attr_create() argument
2146 int (*attr_update)(struct amdgpu_device *adev, struct amdgpu_device_attr *attr, in amdgpu_device_attr_create()
2149 if (!attr) in amdgpu_device_attr_create()
2152 dev_attr = &attr->dev_attr; in amdgpu_device_attr_create()
2153 name = dev_attr->attr.name; in amdgpu_device_attr_create()
2155 attr_update = attr->attr_update ? attr->attr_update : default_attr_update; in amdgpu_device_attr_create()
2157 ret = attr_update(adev, attr, mask, &attr_states); in amdgpu_device_attr_create()
2177 attr_entry->attr = attr; in amdgpu_device_attr_create()
2185 static void amdgpu_device_attr_remove(struct amdgpu_device *adev, struct amdgpu_device_attr *attr) in amdgpu_device_attr_remove() argument
2187 struct device_attribute *dev_attr = &attr->dev_attr; in amdgpu_device_attr_remove()
2227 amdgpu_device_attr_remove(adev, entry->attr); in amdgpu_device_attr_remove_groups()
2234 struct device_attribute *attr, in amdgpu_hwmon_show_temp() argument
2238 int channel = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_temp()
2286 struct device_attribute *attr, in amdgpu_hwmon_show_temp_thresh() argument
2290 int hyst = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_temp_thresh()
2302 struct device_attribute *attr, in amdgpu_hwmon_show_hotspot_temp_thresh() argument
2306 int hyst = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_hotspot_temp_thresh()
2318 struct device_attribute *attr, in amdgpu_hwmon_show_mem_temp_thresh() argument
2322 int hyst = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_mem_temp_thresh()
2334 struct device_attribute *attr, in amdgpu_hwmon_show_temp_label() argument
2337 int channel = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_temp_label()
2346 struct device_attribute *attr, in amdgpu_hwmon_show_temp_emergency() argument
2350 int channel = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_temp_emergency()
2372 struct device_attribute *attr, in amdgpu_hwmon_get_pwm1_enable() argument
2405 struct device_attribute *attr, in amdgpu_hwmon_set_pwm1_enable() argument
2443 struct device_attribute *attr, in amdgpu_hwmon_get_pwm1_min() argument
2450 struct device_attribute *attr, in amdgpu_hwmon_get_pwm1_max() argument
2457 struct device_attribute *attr, in amdgpu_hwmon_set_pwm1() argument
2506 struct device_attribute *attr, in amdgpu_hwmon_get_pwm1() argument
2539 struct device_attribute *attr, in amdgpu_hwmon_get_fan1_input() argument
2572 struct device_attribute *attr, in amdgpu_hwmon_get_fan1_min() argument
2604 struct device_attribute *attr, in amdgpu_hwmon_get_fan1_max() argument
2636 struct device_attribute *attr, in amdgpu_hwmon_get_fan1_target() argument
2669 struct device_attribute *attr, in amdgpu_hwmon_set_fan1_target() argument
2718 struct device_attribute *attr, in amdgpu_hwmon_get_fan1_enable() argument
2751 struct device_attribute *attr, in amdgpu_hwmon_set_fan1_enable() argument
2796 struct device_attribute *attr, in amdgpu_hwmon_show_vddgfx() argument
2828 struct device_attribute *attr, in amdgpu_hwmon_show_vddgfx_label() argument
2835 struct device_attribute *attr, in amdgpu_hwmon_show_vddnb() argument
2871 struct device_attribute *attr, in amdgpu_hwmon_show_vddnb_label() argument
2878 struct device_attribute *attr, in amdgpu_hwmon_show_power_avg() argument
2914 struct device_attribute *attr, in amdgpu_hwmon_show_power_cap_min() argument
2922 struct device_attribute *attr, in amdgpu_hwmon_show_power_cap_generic() argument
2928 enum pp_power_type power_type = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_power_cap_generic()
2963 struct device_attribute *attr, in amdgpu_hwmon_show_power_cap_max() argument
2966 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_MAX); in amdgpu_hwmon_show_power_cap_max()
2971 struct device_attribute *attr, in amdgpu_hwmon_show_power_cap() argument
2974 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_CURRENT); in amdgpu_hwmon_show_power_cap()
2979 struct device_attribute *attr, in amdgpu_hwmon_show_power_cap_default() argument
2982 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_DEFAULT); in amdgpu_hwmon_show_power_cap_default()
2987 struct device_attribute *attr, in amdgpu_hwmon_show_power_label() argument
2990 int limit_type = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_show_power_label()
2997 struct device_attribute *attr, in amdgpu_hwmon_set_power_cap() argument
3003 int limit_type = to_sensor_dev_attr(attr)->index; in amdgpu_hwmon_set_power_cap()
3043 struct device_attribute *attr, in amdgpu_hwmon_show_sclk() argument
3075 struct device_attribute *attr, in amdgpu_hwmon_show_sclk_label() argument
3082 struct device_attribute *attr, in amdgpu_hwmon_show_mclk() argument
3114 struct device_attribute *attr, in amdgpu_hwmon_show_mclk_label() argument
3251 &sensor_dev_attr_temp1_input.dev_attr.attr,
3252 &sensor_dev_attr_temp1_crit.dev_attr.attr,
3253 &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr,
3254 &sensor_dev_attr_temp2_input.dev_attr.attr,
3255 &sensor_dev_attr_temp2_crit.dev_attr.attr,
3256 &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr,
3257 &sensor_dev_attr_temp3_input.dev_attr.attr,
3258 &sensor_dev_attr_temp3_crit.dev_attr.attr,
3259 &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr,
3260 &sensor_dev_attr_temp1_emergency.dev_attr.attr,
3261 &sensor_dev_attr_temp2_emergency.dev_attr.attr,
3262 &sensor_dev_attr_temp3_emergency.dev_attr.attr,
3263 &sensor_dev_attr_temp1_label.dev_attr.attr,
3264 &sensor_dev_attr_temp2_label.dev_attr.attr,
3265 &sensor_dev_attr_temp3_label.dev_attr.attr,
3266 &sensor_dev_attr_pwm1.dev_attr.attr,
3267 &sensor_dev_attr_pwm1_enable.dev_attr.attr,
3268 &sensor_dev_attr_pwm1_min.dev_attr.attr,
3269 &sensor_dev_attr_pwm1_max.dev_attr.attr,
3270 &sensor_dev_attr_fan1_input.dev_attr.attr,
3271 &sensor_dev_attr_fan1_min.dev_attr.attr,
3272 &sensor_dev_attr_fan1_max.dev_attr.attr,
3273 &sensor_dev_attr_fan1_target.dev_attr.attr,
3274 &sensor_dev_attr_fan1_enable.dev_attr.attr,
3275 &sensor_dev_attr_in0_input.dev_attr.attr,
3276 &sensor_dev_attr_in0_label.dev_attr.attr,
3277 &sensor_dev_attr_in1_input.dev_attr.attr,
3278 &sensor_dev_attr_in1_label.dev_attr.attr,
3279 &sensor_dev_attr_power1_average.dev_attr.attr,
3280 &sensor_dev_attr_power1_cap_max.dev_attr.attr,
3281 &sensor_dev_attr_power1_cap_min.dev_attr.attr,
3282 &sensor_dev_attr_power1_cap.dev_attr.attr,
3283 &sensor_dev_attr_power1_cap_default.dev_attr.attr,
3284 &sensor_dev_attr_power1_label.dev_attr.attr,
3285 &sensor_dev_attr_power2_average.dev_attr.attr,
3286 &sensor_dev_attr_power2_cap_max.dev_attr.attr,
3287 &sensor_dev_attr_power2_cap_min.dev_attr.attr,
3288 &sensor_dev_attr_power2_cap.dev_attr.attr,
3289 &sensor_dev_attr_power2_cap_default.dev_attr.attr,
3290 &sensor_dev_attr_power2_label.dev_attr.attr,
3291 &sensor_dev_attr_freq1_input.dev_attr.attr,
3292 &sensor_dev_attr_freq1_label.dev_attr.attr,
3293 &sensor_dev_attr_freq2_input.dev_attr.attr,
3294 &sensor_dev_attr_freq2_label.dev_attr.attr,
3299 struct attribute *attr, int index) in hwmon_attributes_visible() argument
3303 umode_t effective_mode = attr->mode; in hwmon_attributes_visible()
3311 (attr == &sensor_dev_attr_pwm1.dev_attr.attr || in hwmon_attributes_visible()
3312 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr || in hwmon_attributes_visible()
3313 attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || in hwmon_attributes_visible()
3314 attr == &sensor_dev_attr_pwm1_min.dev_attr.attr || in hwmon_attributes_visible()
3315 attr == &sensor_dev_attr_fan1_input.dev_attr.attr || in hwmon_attributes_visible()
3316 attr == &sensor_dev_attr_fan1_min.dev_attr.attr || in hwmon_attributes_visible()
3317 attr == &sensor_dev_attr_fan1_max.dev_attr.attr || in hwmon_attributes_visible()
3318 attr == &sensor_dev_attr_fan1_target.dev_attr.attr || in hwmon_attributes_visible()
3319 attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) in hwmon_attributes_visible()
3323 if (adev->pm.no_fan && (attr == &sensor_dev_attr_pwm1.dev_attr.attr || in hwmon_attributes_visible()
3324 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr || in hwmon_attributes_visible()
3325 attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || in hwmon_attributes_visible()
3326 attr == &sensor_dev_attr_pwm1_min.dev_attr.attr || in hwmon_attributes_visible()
3327 attr == &sensor_dev_attr_fan1_input.dev_attr.attr || in hwmon_attributes_visible()
3328 attr == &sensor_dev_attr_fan1_min.dev_attr.attr || in hwmon_attributes_visible()
3329 attr == &sensor_dev_attr_fan1_max.dev_attr.attr || in hwmon_attributes_visible()
3330 attr == &sensor_dev_attr_fan1_target.dev_attr.attr || in hwmon_attributes_visible()
3331 attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) in hwmon_attributes_visible()
3336 (attr == &sensor_dev_attr_pwm1.dev_attr.attr || in hwmon_attributes_visible()
3337 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr || in hwmon_attributes_visible()
3338 attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || in hwmon_attributes_visible()
3339 attr == &sensor_dev_attr_pwm1_min.dev_attr.attr || in hwmon_attributes_visible()
3340 attr == &sensor_dev_attr_fan1_input.dev_attr.attr || in hwmon_attributes_visible()
3341 attr == &sensor_dev_attr_fan1_min.dev_attr.attr || in hwmon_attributes_visible()
3342 attr == &sensor_dev_attr_fan1_max.dev_attr.attr || in hwmon_attributes_visible()
3343 attr == &sensor_dev_attr_fan1_target.dev_attr.attr || in hwmon_attributes_visible()
3344 attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) in hwmon_attributes_visible()
3349 (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr || in hwmon_attributes_visible()
3350 attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr)) in hwmon_attributes_visible()
3355 (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr || in hwmon_attributes_visible()
3356 attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr || in hwmon_attributes_visible()
3357 attr == &sensor_dev_attr_pwm1.dev_attr.attr || in hwmon_attributes_visible()
3358 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr || in hwmon_attributes_visible()
3359 attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || in hwmon_attributes_visible()
3360 attr == &sensor_dev_attr_pwm1_min.dev_attr.attr || in hwmon_attributes_visible()
3361 attr == &sensor_dev_attr_fan1_input.dev_attr.attr || in hwmon_attributes_visible()
3362 attr == &sensor_dev_attr_fan1_min.dev_attr.attr || in hwmon_attributes_visible()
3363 attr == &sensor_dev_attr_fan1_max.dev_attr.attr || in hwmon_attributes_visible()
3364 attr == &sensor_dev_attr_fan1_target.dev_attr.attr || in hwmon_attributes_visible()
3365 attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) in hwmon_attributes_visible()
3371 attr == &sensor_dev_attr_pwm1.dev_attr.attr) || /* can't query fan */ in hwmon_attributes_visible()
3373 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr)) /* can't query state */ in hwmon_attributes_visible()
3377 attr == &sensor_dev_attr_pwm1.dev_attr.attr) || /* can't manage fan */ in hwmon_attributes_visible()
3379 attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr)) /* can't manage state */ in hwmon_attributes_visible()
3386 (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr || in hwmon_attributes_visible()
3387 attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr|| in hwmon_attributes_visible()
3388 attr == &sensor_dev_attr_power1_cap.dev_attr.attr || in hwmon_attributes_visible()
3389 attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr)) in hwmon_attributes_visible()
3395 (attr == &sensor_dev_attr_power1_average.dev_attr.attr)) in hwmon_attributes_visible()
3404 (attr == &sensor_dev_attr_pwm1_max.dev_attr.attr || in hwmon_attributes_visible()
3405 attr == &sensor_dev_attr_pwm1_min.dev_attr.attr)) in hwmon_attributes_visible()
3410 (attr == &sensor_dev_attr_fan1_max.dev_attr.attr || in hwmon_attributes_visible()
3411 attr == &sensor_dev_attr_fan1_min.dev_attr.attr)) in hwmon_attributes_visible()
3417 (attr == &sensor_dev_attr_in0_input.dev_attr.attr || in hwmon_attributes_visible()
3418 attr == &sensor_dev_attr_in0_label.dev_attr.attr)) in hwmon_attributes_visible()
3423 (attr == &sensor_dev_attr_in1_input.dev_attr.attr || in hwmon_attributes_visible()
3424 attr == &sensor_dev_attr_in1_label.dev_attr.attr)) in hwmon_attributes_visible()
3429 (attr == &sensor_dev_attr_freq2_input.dev_attr.attr || in hwmon_attributes_visible()
3430 attr == &sensor_dev_attr_freq2_label.dev_attr.attr)) in hwmon_attributes_visible()
3436 (attr == &sensor_dev_attr_temp2_crit.dev_attr.attr || in hwmon_attributes_visible()
3437 attr == &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr || in hwmon_attributes_visible()
3438 attr == &sensor_dev_attr_temp3_crit.dev_attr.attr || in hwmon_attributes_visible()
3439 attr == &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr || in hwmon_attributes_visible()
3440 attr == &sensor_dev_attr_temp1_emergency.dev_attr.attr || in hwmon_attributes_visible()
3441 attr == &sensor_dev_attr_temp2_emergency.dev_attr.attr || in hwmon_attributes_visible()
3442 attr == &sensor_dev_attr_temp3_emergency.dev_attr.attr || in hwmon_attributes_visible()
3443 attr == &sensor_dev_attr_temp2_input.dev_attr.attr || in hwmon_attributes_visible()
3444 attr == &sensor_dev_attr_temp3_input.dev_attr.attr || in hwmon_attributes_visible()
3445 attr == &sensor_dev_attr_temp2_label.dev_attr.attr || in hwmon_attributes_visible()
3446 attr == &sensor_dev_attr_temp3_label.dev_attr.attr)) in hwmon_attributes_visible()
3451 (attr == &sensor_dev_attr_power2_average.dev_attr.attr || in hwmon_attributes_visible()
3452 attr == &sensor_dev_attr_power2_cap_max.dev_attr.attr || in hwmon_attributes_visible()
3453 attr == &sensor_dev_attr_power2_cap_min.dev_attr.attr || in hwmon_attributes_visible()
3454 attr == &sensor_dev_attr_power2_cap.dev_attr.attr || in hwmon_attributes_visible()
3455 attr == &sensor_dev_attr_power2_cap_default.dev_attr.attr || in hwmon_attributes_visible()
3456 attr == &sensor_dev_attr_power2_label.dev_attr.attr)) in hwmon_attributes_visible()