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,7 +3271,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) ...@@ -3271,7 +3271,7 @@ 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");
...@@ -3292,6 +3292,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) ...@@ -3292,6 +3292,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
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);
if (ret) { if (ret) {
...@@ -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