Commit 8efd7275 authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher

drm/amdgpu: skip sysfs node not belong to one vf mode

Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Acked-by: default avatarYintian Tao <yttao@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 38748ad8
...@@ -3271,26 +3271,27 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) ...@@ -3271,26 +3271,27 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
return ret; return ret;
} }
if (!amdgpu_sriov_vf(adev)) {
ret = device_create_file(adev->dev, &dev_attr_pp_num_states); ret = device_create_file(adev->dev, &dev_attr_pp_num_states);
if (ret) { if (ret) {
DRM_ERROR("failed to create device file pp_num_states\n"); DRM_ERROR("failed to create device file pp_num_states\n");
return ret; return ret;
} }
ret = device_create_file(adev->dev, &dev_attr_pp_cur_state); ret = device_create_file(adev->dev, &dev_attr_pp_cur_state);
if (ret) { if (ret) {
DRM_ERROR("failed to create device file pp_cur_state\n"); DRM_ERROR("failed to create device file pp_cur_state\n");
return ret; return ret;
} }
ret = device_create_file(adev->dev, &dev_attr_pp_force_state); ret = device_create_file(adev->dev, &dev_attr_pp_force_state);
if (ret) { if (ret) {
DRM_ERROR("failed to create device file pp_force_state\n"); DRM_ERROR("failed to create device file pp_force_state\n");
return ret; return ret;
} }
ret = device_create_file(adev->dev, &dev_attr_pp_table); ret = device_create_file(adev->dev, &dev_attr_pp_table);
if (ret) { if (ret) {
DRM_ERROR("failed to create device file pp_table\n"); DRM_ERROR("failed to create device file pp_table\n");
return ret; return ret;
}
} }
ret = device_create_file(adev->dev, &dev_attr_pp_dpm_sclk); ret = device_create_file(adev->dev, &dev_attr_pp_dpm_sclk);
...@@ -3337,6 +3338,13 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) ...@@ -3337,6 +3338,13 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
return ret; return ret;
} }
} }
/* the reset are not needed for SRIOV one vf mode */
if (amdgpu_sriov_vf(adev)) {
adev->pm.sysfs_initialized = true;
return ret;
}
if (adev->asic_type != CHIP_ARCTURUS) { if (adev->asic_type != CHIP_ARCTURUS) {
ret = device_create_file(adev->dev, &dev_attr_pp_dpm_pcie); ret = device_create_file(adev->dev, &dev_attr_pp_dpm_pcie);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment