Lines Matching defs:dev

96 static ssize_t amdgpu_get_power_dpm_state(struct device *dev,
100 struct drm_device *ddev = dev_get_drvdata(dev);
110 ret = pm_runtime_get_sync(ddev->dev);
112 pm_runtime_put_autosuspend(ddev->dev);
118 pm_runtime_mark_last_busy(ddev->dev);
119 pm_runtime_put_autosuspend(ddev->dev);
126 static ssize_t amdgpu_set_power_dpm_state(struct device *dev,
131 struct drm_device *ddev = dev_get_drvdata(dev);
150 ret = pm_runtime_get_sync(ddev->dev);
152 pm_runtime_put_autosuspend(ddev->dev);
158 pm_runtime_mark_last_busy(ddev->dev);
159 pm_runtime_put_autosuspend(ddev->dev);
224 static ssize_t amdgpu_get_power_dpm_force_performance_level(struct device *dev,
228 struct drm_device *ddev = dev_get_drvdata(dev);
238 ret = pm_runtime_get_sync(ddev->dev);
240 pm_runtime_put_autosuspend(ddev->dev);
246 pm_runtime_mark_last_busy(ddev->dev);
247 pm_runtime_put_autosuspend(ddev->dev);
262 static ssize_t amdgpu_set_power_dpm_force_performance_level(struct device *dev,
267 struct drm_device *ddev = dev_get_drvdata(dev);
301 ret = pm_runtime_get_sync(ddev->dev);
303 pm_runtime_put_autosuspend(ddev->dev);
309 pm_runtime_mark_last_busy(ddev->dev);
310 pm_runtime_put_autosuspend(ddev->dev);
318 pm_runtime_mark_last_busy(ddev->dev);
319 pm_runtime_put_autosuspend(ddev->dev);
324 static ssize_t amdgpu_get_pp_num_states(struct device *dev,
328 struct drm_device *ddev = dev_get_drvdata(dev);
339 ret = pm_runtime_get_sync(ddev->dev);
341 pm_runtime_put_autosuspend(ddev->dev);
348 pm_runtime_mark_last_busy(ddev->dev);
349 pm_runtime_put_autosuspend(ddev->dev);
362 static ssize_t amdgpu_get_pp_cur_state(struct device *dev,
366 struct drm_device *ddev = dev_get_drvdata(dev);
377 ret = pm_runtime_get_sync(ddev->dev);
379 pm_runtime_put_autosuspend(ddev->dev);
387 pm_runtime_mark_last_busy(ddev->dev);
388 pm_runtime_put_autosuspend(ddev->dev);
404 static ssize_t amdgpu_get_pp_force_state(struct device *dev,
408 struct drm_device *ddev = dev_get_drvdata(dev);
417 return amdgpu_get_pp_cur_state(dev, attr, buf);
422 static ssize_t amdgpu_set_pp_force_state(struct device *dev,
427 struct drm_device *ddev = dev_get_drvdata(dev);
450 ret = pm_runtime_get_sync(ddev->dev);
452 pm_runtime_put_autosuspend(ddev->dev);
473 pm_runtime_mark_last_busy(ddev->dev);
474 pm_runtime_put_autosuspend(ddev->dev);
479 pm_runtime_mark_last_busy(ddev->dev);
480 pm_runtime_put_autosuspend(ddev->dev);
495 static ssize_t amdgpu_get_pp_table(struct device *dev,
499 struct drm_device *ddev = dev_get_drvdata(dev);
509 ret = pm_runtime_get_sync(ddev->dev);
511 pm_runtime_put_autosuspend(ddev->dev);
517 pm_runtime_mark_last_busy(ddev->dev);
518 pm_runtime_put_autosuspend(ddev->dev);
531 static ssize_t amdgpu_set_pp_table(struct device *dev,
536 struct drm_device *ddev = dev_get_drvdata(dev);
545 ret = pm_runtime_get_sync(ddev->dev);
547 pm_runtime_put_autosuspend(ddev->dev);
553 pm_runtime_mark_last_busy(ddev->dev);
554 pm_runtime_put_autosuspend(ddev->dev);
718 static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
723 struct drm_device *ddev = dev_get_drvdata(dev);
784 ret = pm_runtime_get_sync(ddev->dev);
786 pm_runtime_put_autosuspend(ddev->dev);
807 pm_runtime_mark_last_busy(ddev->dev);
808 pm_runtime_put_autosuspend(ddev->dev);
813 pm_runtime_mark_last_busy(ddev->dev);
814 pm_runtime_put_autosuspend(ddev->dev);
818 static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
822 struct drm_device *ddev = dev_get_drvdata(dev);
841 ret = pm_runtime_get_sync(ddev->dev);
843 pm_runtime_put_autosuspend(ddev->dev);
864 pm_runtime_mark_last_busy(ddev->dev);
865 pm_runtime_put_autosuspend(ddev->dev);
886 static ssize_t amdgpu_set_pp_features(struct device *dev,
891 struct drm_device *ddev = dev_get_drvdata(dev);
905 ret = pm_runtime_get_sync(ddev->dev);
907 pm_runtime_put_autosuspend(ddev->dev);
913 pm_runtime_mark_last_busy(ddev->dev);
914 pm_runtime_put_autosuspend(ddev->dev);
922 static ssize_t amdgpu_get_pp_features(struct device *dev,
926 struct drm_device *ddev = dev_get_drvdata(dev);
936 ret = pm_runtime_get_sync(ddev->dev);
938 pm_runtime_put_autosuspend(ddev->dev);
946 pm_runtime_mark_last_busy(ddev->dev);
947 pm_runtime_put_autosuspend(ddev->dev);
982 static ssize_t amdgpu_get_pp_dpm_clock(struct device *dev,
986 struct drm_device *ddev = dev_get_drvdata(dev);
996 ret = pm_runtime_get_sync(ddev->dev);
998 pm_runtime_put_autosuspend(ddev->dev);
1009 pm_runtime_mark_last_busy(ddev->dev);
1010 pm_runtime_put_autosuspend(ddev->dev);
1050 static ssize_t amdgpu_set_pp_dpm_clock(struct device *dev,
1055 struct drm_device *ddev = dev_get_drvdata(dev);
1069 ret = pm_runtime_get_sync(ddev->dev);
1071 pm_runtime_put_autosuspend(ddev->dev);
1077 pm_runtime_mark_last_busy(ddev->dev);
1078 pm_runtime_put_autosuspend(ddev->dev);
1086 static ssize_t amdgpu_get_pp_dpm_sclk(struct device *dev,
1090 return amdgpu_get_pp_dpm_clock(dev, PP_SCLK, buf);
1093 static ssize_t amdgpu_set_pp_dpm_sclk(struct device *dev,
1098 return amdgpu_set_pp_dpm_clock(dev, PP_SCLK, buf, count);
1101 static ssize_t amdgpu_get_pp_dpm_mclk(struct device *dev,
1105 return amdgpu_get_pp_dpm_clock(dev, PP_MCLK, buf);
1108 static ssize_t amdgpu_set_pp_dpm_mclk(struct device *dev,
1113 return amdgpu_set_pp_dpm_clock(dev, PP_MCLK, buf, count);
1116 static ssize_t amdgpu_get_pp_dpm_socclk(struct device *dev,
1120 return amdgpu_get_pp_dpm_clock(dev, PP_SOCCLK, buf);
1123 static ssize_t amdgpu_set_pp_dpm_socclk(struct device *dev,
1128 return amdgpu_set_pp_dpm_clock(dev, PP_SOCCLK, buf, count);
1131 static ssize_t amdgpu_get_pp_dpm_fclk(struct device *dev,
1135 return amdgpu_get_pp_dpm_clock(dev, PP_FCLK, buf);
1138 static ssize_t amdgpu_set_pp_dpm_fclk(struct device *dev,
1143 return amdgpu_set_pp_dpm_clock(dev, PP_FCLK, buf, count);
1146 static ssize_t amdgpu_get_pp_dpm_vclk(struct device *dev,
1150 return amdgpu_get_pp_dpm_clock(dev, PP_VCLK, buf);
1153 static ssize_t amdgpu_set_pp_dpm_vclk(struct device *dev,
1158 return amdgpu_set_pp_dpm_clock(dev, PP_VCLK, buf, count);
1161 static ssize_t amdgpu_get_pp_dpm_vclk1(struct device *dev,
1165 return amdgpu_get_pp_dpm_clock(dev, PP_VCLK1, buf);
1168 static ssize_t amdgpu_set_pp_dpm_vclk1(struct device *dev,
1173 return amdgpu_set_pp_dpm_clock(dev, PP_VCLK1, buf, count);
1176 static ssize_t amdgpu_get_pp_dpm_dclk(struct device *dev,
1180 return amdgpu_get_pp_dpm_clock(dev, PP_DCLK, buf);
1183 static ssize_t amdgpu_set_pp_dpm_dclk(struct device *dev,
1188 return amdgpu_set_pp_dpm_clock(dev, PP_DCLK, buf, count);
1191 static ssize_t amdgpu_get_pp_dpm_dclk1(struct device *dev,
1195 return amdgpu_get_pp_dpm_clock(dev, PP_DCLK1, buf);
1198 static ssize_t amdgpu_set_pp_dpm_dclk1(struct device *dev,
1203 return amdgpu_set_pp_dpm_clock(dev, PP_DCLK1, buf, count);
1206 static ssize_t amdgpu_get_pp_dpm_dcefclk(struct device *dev,
1210 return amdgpu_get_pp_dpm_clock(dev, PP_DCEFCLK, buf);
1213 static ssize_t amdgpu_set_pp_dpm_dcefclk(struct device *dev,
1218 return amdgpu_set_pp_dpm_clock(dev, PP_DCEFCLK, buf, count);
1221 static ssize_t amdgpu_get_pp_dpm_pcie(struct device *dev,
1225 return amdgpu_get_pp_dpm_clock(dev, PP_PCIE, buf);
1228 static ssize_t amdgpu_set_pp_dpm_pcie(struct device *dev,
1233 return amdgpu_set_pp_dpm_clock(dev, PP_PCIE, buf, count);
1236 static ssize_t amdgpu_get_pp_sclk_od(struct device *dev,
1240 struct drm_device *ddev = dev_get_drvdata(dev);
1250 ret = pm_runtime_get_sync(ddev->dev);
1252 pm_runtime_put_autosuspend(ddev->dev);
1258 pm_runtime_mark_last_busy(ddev->dev);
1259 pm_runtime_put_autosuspend(ddev->dev);
1264 static ssize_t amdgpu_set_pp_sclk_od(struct device *dev,
1269 struct drm_device *ddev = dev_get_drvdata(dev);
1284 ret = pm_runtime_get_sync(ddev->dev);
1286 pm_runtime_put_autosuspend(ddev->dev);
1292 pm_runtime_mark_last_busy(ddev->dev);
1293 pm_runtime_put_autosuspend(ddev->dev);
1298 static ssize_t amdgpu_get_pp_mclk_od(struct device *dev,
1302 struct drm_device *ddev = dev_get_drvdata(dev);
1312 ret = pm_runtime_get_sync(ddev->dev);
1314 pm_runtime_put_autosuspend(ddev->dev);
1320 pm_runtime_mark_last_busy(ddev->dev);
1321 pm_runtime_put_autosuspend(ddev->dev);
1326 static ssize_t amdgpu_set_pp_mclk_od(struct device *dev,
1331 struct drm_device *ddev = dev_get_drvdata(dev);
1346 ret = pm_runtime_get_sync(ddev->dev);
1348 pm_runtime_put_autosuspend(ddev->dev);
1354 pm_runtime_mark_last_busy(ddev->dev);
1355 pm_runtime_put_autosuspend(ddev->dev);
1380 static ssize_t amdgpu_get_pp_power_profile_mode(struct device *dev,
1384 struct drm_device *ddev = dev_get_drvdata(dev);
1394 ret = pm_runtime_get_sync(ddev->dev);
1396 pm_runtime_put_autosuspend(ddev->dev);
1404 pm_runtime_mark_last_busy(ddev->dev);
1405 pm_runtime_put_autosuspend(ddev->dev);
1411 static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,
1417 struct drm_device *ddev = dev_get_drvdata(dev);
1459 ret = pm_runtime_get_sync(ddev->dev);
1461 pm_runtime_put_autosuspend(ddev->dev);
1467 pm_runtime_mark_last_busy(ddev->dev);
1468 pm_runtime_put_autosuspend(ddev->dev);
1487 r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
1489 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1496 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
1497 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1510 static ssize_t amdgpu_get_gpu_busy_percent(struct device *dev,
1514 struct drm_device *ddev = dev_get_drvdata(dev);
1534 static ssize_t amdgpu_get_mem_busy_percent(struct device *dev,
1538 struct drm_device *ddev = dev_get_drvdata(dev);
1562 static ssize_t amdgpu_get_pcie_bw(struct device *dev,
1566 struct drm_device *ddev = dev_get_drvdata(dev);
1582 ret = pm_runtime_get_sync(ddev->dev);
1584 pm_runtime_put_autosuspend(ddev->dev);
1590 pm_runtime_mark_last_busy(ddev->dev);
1591 pm_runtime_put_autosuspend(ddev->dev);
1607 static ssize_t amdgpu_get_unique_id(struct device *dev,
1611 struct drm_device *ddev = dev_get_drvdata(dev);
1640 static ssize_t amdgpu_get_thermal_throttling_logging(struct device *dev,
1644 struct drm_device *ddev = dev_get_drvdata(dev);
1653 static ssize_t amdgpu_set_thermal_throttling_logging(struct device *dev,
1658 struct drm_device *ddev = dev_get_drvdata(dev);
1704 static ssize_t amdgpu_get_apu_thermal_cap(struct device *dev,
1710 struct drm_device *ddev = dev_get_drvdata(dev);
1713 ret = pm_runtime_get_sync(ddev->dev);
1715 pm_runtime_put_autosuspend(ddev->dev);
1725 pm_runtime_mark_last_busy(ddev->dev);
1726 pm_runtime_put_autosuspend(ddev->dev);
1731 static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev,
1738 struct drm_device *ddev = dev_get_drvdata(dev);
1746 dev_err(dev, "Invalid argument !\n");
1750 ret = pm_runtime_get_sync(ddev->dev);
1752 pm_runtime_put_autosuspend(ddev->dev);
1758 dev_err(dev, "failed to update thermal limit\n");
1762 pm_runtime_mark_last_busy(ddev->dev);
1763 pm_runtime_put_autosuspend(ddev->dev);
1780 static ssize_t amdgpu_get_gpu_metrics(struct device *dev,
1784 struct drm_device *ddev = dev_get_drvdata(dev);
1795 ret = pm_runtime_get_sync(ddev->dev);
1797 pm_runtime_put_autosuspend(ddev->dev);
1811 pm_runtime_mark_last_busy(ddev->dev);
1812 pm_runtime_put_autosuspend(ddev->dev);
1817 static int amdgpu_show_powershift_percent(struct device *dev,
1820 struct drm_device *ddev = dev_get_drvdata(dev);
1857 static ssize_t amdgpu_get_smartshift_apu_power(struct device *dev, struct device_attribute *attr,
1860 return amdgpu_show_powershift_percent(dev, buf, AMDGPU_PP_SENSOR_SS_APU_SHARE);
1873 static ssize_t amdgpu_get_smartshift_dgpu_power(struct device *dev, struct device_attribute *attr,
1876 return amdgpu_show_powershift_percent(dev, buf, AMDGPU_PP_SENSOR_SS_DGPU_SHARE);
1888 static ssize_t amdgpu_get_smartshift_bias(struct device *dev,
1899 static ssize_t amdgpu_set_smartshift_bias(struct device *dev,
1903 struct drm_device *ddev = dev_get_drvdata(dev);
1913 r = pm_runtime_get_sync(ddev->dev);
1915 pm_runtime_put_autosuspend(ddev->dev);
1934 pm_runtime_mark_last_busy(ddev->dev);
1935 pm_runtime_put_autosuspend(ddev->dev);
2165 dev_err(adev->dev, "failed to update device file %s, ret = %d\n",
2173 ret = device_create_file(adev->dev, dev_attr);
2175 dev_err(adev->dev, "failed to create device file %s, ret = %d\n",
2195 device_remove_file(adev->dev, dev_attr);
2239 static ssize_t amdgpu_hwmon_show_temp(struct device *dev,
2243 struct amdgpu_device *adev = dev_get_drvdata(dev);
2277 static ssize_t amdgpu_hwmon_show_temp_thresh(struct device *dev,
2281 struct amdgpu_device *adev = dev_get_drvdata(dev);
2293 static ssize_t amdgpu_hwmon_show_hotspot_temp_thresh(struct device *dev,
2297 struct amdgpu_device *adev = dev_get_drvdata(dev);
2309 static ssize_t amdgpu_hwmon_show_mem_temp_thresh(struct device *dev,
2313 struct amdgpu_device *adev = dev_get_drvdata(dev);
2325 static ssize_t amdgpu_hwmon_show_temp_label(struct device *dev,
2337 static ssize_t amdgpu_hwmon_show_temp_emergency(struct device *dev,
2341 struct amdgpu_device *adev = dev_get_drvdata(dev);
2363 static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev,
2367 struct amdgpu_device *adev = dev_get_drvdata(dev);
2376 ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2378 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2384 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2385 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2393 static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev,
2398 struct amdgpu_device *adev = dev_get_drvdata(dev);
2421 ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2423 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2429 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2430 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2438 static ssize_t amdgpu_hwmon_get_pwm1_min(struct device *dev,
2445 static ssize_t amdgpu_hwmon_get_pwm1_max(struct device *dev,
2452 static ssize_t amdgpu_hwmon_set_pwm1(struct device *dev,
2456 struct amdgpu_device *adev = dev_get_drvdata(dev);
2470 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2472 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2489 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2490 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2498 static ssize_t amdgpu_hwmon_get_pwm1(struct device *dev,
2502 struct amdgpu_device *adev = dev_get_drvdata(dev);
2511 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2513 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2519 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2520 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2528 static ssize_t amdgpu_hwmon_get_fan1_input(struct device *dev,
2532 struct amdgpu_device *adev = dev_get_drvdata(dev);
2541 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2543 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2549 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2550 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2558 static ssize_t amdgpu_hwmon_get_fan1_min(struct device *dev,
2562 struct amdgpu_device *adev = dev_get_drvdata(dev);
2575 static ssize_t amdgpu_hwmon_get_fan1_max(struct device *dev,
2579 struct amdgpu_device *adev = dev_get_drvdata(dev);
2592 static ssize_t amdgpu_hwmon_get_fan1_target(struct device *dev,
2596 struct amdgpu_device *adev = dev_get_drvdata(dev);
2605 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2607 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2613 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2614 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2622 static ssize_t amdgpu_hwmon_set_fan1_target(struct device *dev,
2626 struct amdgpu_device *adev = dev_get_drvdata(dev);
2640 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2642 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2658 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2659 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2667 static ssize_t amdgpu_hwmon_get_fan1_enable(struct device *dev,
2671 struct amdgpu_device *adev = dev_get_drvdata(dev);
2680 ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2682 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2688 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2689 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2697 static ssize_t amdgpu_hwmon_set_fan1_enable(struct device *dev,
2702 struct amdgpu_device *adev = dev_get_drvdata(dev);
2723 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2725 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2731 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2732 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2740 static ssize_t amdgpu_hwmon_show_vddgfx(struct device *dev,
2744 struct amdgpu_device *adev = dev_get_drvdata(dev);
2757 static ssize_t amdgpu_hwmon_show_vddgfx_label(struct device *dev,
2764 static ssize_t amdgpu_hwmon_show_vddnb(struct device *dev,
2768 struct amdgpu_device *adev = dev_get_drvdata(dev);
2785 static ssize_t amdgpu_hwmon_show_vddnb_label(struct device *dev,
2792 static int amdgpu_hwmon_get_power(struct device *dev,
2795 struct amdgpu_device *adev = dev_get_drvdata(dev);
2810 static ssize_t amdgpu_hwmon_show_power_avg(struct device *dev,
2816 val = amdgpu_hwmon_get_power(dev, AMDGPU_PP_SENSOR_GPU_AVG_POWER);
2823 static ssize_t amdgpu_hwmon_show_power_input(struct device *dev,
2829 val = amdgpu_hwmon_get_power(dev, AMDGPU_PP_SENSOR_GPU_INPUT_POWER);
2836 static ssize_t amdgpu_hwmon_show_power_cap_min(struct device *dev,
2844 static ssize_t amdgpu_hwmon_show_power_cap_generic(struct device *dev,
2849 struct amdgpu_device *adev = dev_get_drvdata(dev);
2860 r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2862 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2874 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2875 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2881 static ssize_t amdgpu_hwmon_show_power_cap_max(struct device *dev,
2885 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_MAX);
2889 static ssize_t amdgpu_hwmon_show_power_cap(struct device *dev,
2893 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_CURRENT);
2897 static ssize_t amdgpu_hwmon_show_power_cap_default(struct device *dev,
2901 return amdgpu_hwmon_show_power_cap_generic(dev, attr, buf, PP_PWR_LIMIT_DEFAULT);
2905 static ssize_t amdgpu_hwmon_show_power_label(struct device *dev,
2909 struct amdgpu_device *adev = dev_get_drvdata(dev);
2920 static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
2925 struct amdgpu_device *adev = dev_get_drvdata(dev);
2945 err = pm_runtime_get_sync(adev_to_drm(adev)->dev);
2947 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2953 pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
2954 pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
2962 static ssize_t amdgpu_hwmon_show_sclk(struct device *dev,
2966 struct amdgpu_device *adev = dev_get_drvdata(dev);
2979 static ssize_t amdgpu_hwmon_show_sclk_label(struct device *dev,
2986 static ssize_t amdgpu_hwmon_show_mclk(struct device *dev,
2990 struct amdgpu_device *adev = dev_get_drvdata(dev);
3003 static ssize_t amdgpu_hwmon_show_mclk_label(struct device *dev,
3195 struct device *dev = kobj_to_dev(kobj);
3196 struct amdgpu_device *adev = dev_get_drvdata(dev);
3393 adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev,
3398 dev_err(adev->dev,
3616 struct drm_device *dev = adev_to_drm(adev);
3625 r = pm_runtime_get_sync(dev->dev);
3627 pm_runtime_put_autosuspend(dev->dev);
3644 pm_runtime_mark_last_busy(dev->dev);
3645 pm_runtime_put_autosuspend(dev->dev);