History

drm/amd/pm: Add GC v9.4.3 thermal limits to hwmon

Publish max operating temperature of SOC and memory as temp*_emergency nodes in hwmon. temp*_crit will show the throttle temperature limits.

Lijo Lazar committed 3 years ago

Commit 9cff0871 parent df7a2801 file · +12 −7Browse files

Unified · Split

drivers/gpu/drm/amd/pm/amdgpu_pm.c+12−7
@@ -3423,15 +3423,20 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, · 3422 unmodified lines
34233423 return 0;
34243424
34253425 /* hotspot temperature for gc 9,4,3*/
3426− if ((gc_ver == IP_VERSION(9, 4, 3)) &&
3427− (attr == &sensor_dev_attr_temp1_input.dev_attr.attr ||
3428− attr == &sensor_dev_attr_temp1_label.dev_attr.attr))
3429− return 0;
3426+ if (gc_ver == IP_VERSION(9, 4, 3)) {
3427+ if (attr == &sensor_dev_attr_temp1_input.dev_attr.attr ||
3428+ attr == &sensor_dev_attr_temp1_emergency.dev_attr.attr ||
3429+ attr == &sensor_dev_attr_temp1_label.dev_attr.attr)
3430+ return 0;
3431+
3432+ if (attr == &sensor_dev_attr_temp2_emergency.dev_attr.attr ||
3433+ attr == &sensor_dev_attr_temp3_emergency.dev_attr.attr)
3434+ return attr->mode;
3435+ }
34303436
34313437 /* only SOC15 dGPUs support hotspot and mem temperatures */
3432− if (((adev->flags & AMD_IS_APU) || gc_ver < IP_VERSION(9, 0, 0) ||
3433− (gc_ver == IP_VERSION(9, 4, 3))) &&
3434− (attr == &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr ||
3438+ if (((adev->flags & AMD_IS_APU) || gc_ver < IP_VERSION(9, 0, 0)) &&
3439+ (attr == &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr ||
34353440 attr == &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr ||
34363441 attr == &sensor_dev_attr_temp1_emergency.dev_attr.attr ||
34373442 attr == &sensor_dev_attr_temp2_emergency.dev_attr.attr ||

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t