Skip to content

Commit d5c8ffb

Browse files
committed
drm/amdgpu: fix pm sysfs node handling (v2)
Fix typos that prevented them from showing up. v2: switch other files in addition to pp_clk_voltage Fixes: 4e01847 ("drm/amdgpu: optimize amdgpu device attribute code") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1150 Signed-off-by: Alex Deucher <[email protected]> Acked-by: Evan Quan <[email protected]>
1 parent 6e29c22 commit d5c8ffb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,10 +1731,10 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
17311731
#define DEVICE_ATTR_IS(_name) (!strcmp(attr_name, #_name))
17321732

17331733
if (DEVICE_ATTR_IS(pp_dpm_socclk)) {
1734-
if (asic_type <= CHIP_VEGA10)
1734+
if (asic_type < CHIP_VEGA10)
17351735
attr->states = ATTR_STATE_UNSUPPORTED;
17361736
} else if (DEVICE_ATTR_IS(pp_dpm_dcefclk)) {
1737-
if (asic_type <= CHIP_VEGA10 || asic_type == CHIP_ARCTURUS)
1737+
if (asic_type < CHIP_VEGA10 || asic_type == CHIP_ARCTURUS)
17381738
attr->states = ATTR_STATE_UNSUPPORTED;
17391739
} else if (DEVICE_ATTR_IS(pp_dpm_fclk)) {
17401740
if (asic_type < CHIP_VEGA20)
@@ -1746,7 +1746,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
17461746
attr->states = ATTR_STATE_UNSUPPORTED;
17471747
if ((is_support_sw_smu(adev) && adev->smu.od_enabled) ||
17481748
(!is_support_sw_smu(adev) && hwmgr->od_enabled))
1749-
attr->states = ATTR_STATE_UNSUPPORTED;
1749+
attr->states = ATTR_STATE_SUPPORTED;
17501750
} else if (DEVICE_ATTR_IS(mem_busy_percent)) {
17511751
if (adev->flags & AMD_IS_APU || asic_type == CHIP_VEGA10)
17521752
attr->states = ATTR_STATE_UNSUPPORTED;
@@ -1758,7 +1758,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
17581758
if (!adev->unique_id)
17591759
attr->states = ATTR_STATE_UNSUPPORTED;
17601760
} else if (DEVICE_ATTR_IS(pp_features)) {
1761-
if (adev->flags & AMD_IS_APU || asic_type <= CHIP_VEGA10)
1761+
if (adev->flags & AMD_IS_APU || asic_type < CHIP_VEGA10)
17621762
attr->states = ATTR_STATE_UNSUPPORTED;
17631763
}
17641764

0 commit comments

Comments
 (0)