mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 02:58:57 +07:00
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: 4e01847c38
("drm/amdgpu: optimize amdgpu device attribute code")
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1150
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Evan Quan <evan.quan@amd.com>
This commit is contained in:
parent
6e29c227a4
commit
d5c8ffb966
@ -1731,10 +1731,10 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
|||||||
#define DEVICE_ATTR_IS(_name) (!strcmp(attr_name, #_name))
|
#define DEVICE_ATTR_IS(_name) (!strcmp(attr_name, #_name))
|
||||||
|
|
||||||
if (DEVICE_ATTR_IS(pp_dpm_socclk)) {
|
if (DEVICE_ATTR_IS(pp_dpm_socclk)) {
|
||||||
if (asic_type <= CHIP_VEGA10)
|
if (asic_type < CHIP_VEGA10)
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
} else if (DEVICE_ATTR_IS(pp_dpm_dcefclk)) {
|
} else if (DEVICE_ATTR_IS(pp_dpm_dcefclk)) {
|
||||||
if (asic_type <= CHIP_VEGA10 || asic_type == CHIP_ARCTURUS)
|
if (asic_type < CHIP_VEGA10 || asic_type == CHIP_ARCTURUS)
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
} else if (DEVICE_ATTR_IS(pp_dpm_fclk)) {
|
} else if (DEVICE_ATTR_IS(pp_dpm_fclk)) {
|
||||||
if (asic_type < CHIP_VEGA20)
|
if (asic_type < CHIP_VEGA20)
|
||||||
@ -1746,7 +1746,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
|||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
if ((is_support_sw_smu(adev) && adev->smu.od_enabled) ||
|
if ((is_support_sw_smu(adev) && adev->smu.od_enabled) ||
|
||||||
(!is_support_sw_smu(adev) && hwmgr->od_enabled))
|
(!is_support_sw_smu(adev) && hwmgr->od_enabled))
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_SUPPORTED;
|
||||||
} else if (DEVICE_ATTR_IS(mem_busy_percent)) {
|
} else if (DEVICE_ATTR_IS(mem_busy_percent)) {
|
||||||
if (adev->flags & AMD_IS_APU || asic_type == CHIP_VEGA10)
|
if (adev->flags & AMD_IS_APU || asic_type == CHIP_VEGA10)
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
@ -1758,7 +1758,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
|||||||
if (!adev->unique_id)
|
if (!adev->unique_id)
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
} else if (DEVICE_ATTR_IS(pp_features)) {
|
} else if (DEVICE_ATTR_IS(pp_features)) {
|
||||||
if (adev->flags & AMD_IS_APU || asic_type <= CHIP_VEGA10)
|
if (adev->flags & AMD_IS_APU || asic_type < CHIP_VEGA10)
|
||||||
attr->states = ATTR_STATE_UNSUPPORTED;
|
attr->states = ATTR_STATE_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user