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

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

parent 38748ad8
Loading
Loading
Loading
Loading
+28 −20
Original line number Diff line number Diff line
@@ -3271,7 +3271,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
		return ret;
	}


	if (!amdgpu_sriov_vf(adev)) {
		ret = device_create_file(adev->dev, &dev_attr_pp_num_states);
		if (ret) {
			DRM_ERROR("failed to create device file pp_num_states\n");
@@ -3292,6 +3292,7 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
			DRM_ERROR("failed to create device file pp_table\n");
			return ret;
		}
	}

	ret = device_create_file(adev->dev, &dev_attr_pp_dpm_sclk);
	if (ret) {
@@ -3337,6 +3338,13 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
			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) {
		ret = device_create_file(adev->dev, &dev_attr_pp_dpm_pcie);
		if (ret) {