drm/amd/powerplay: no memory activity support on Vega10
authorEvan Quan <evan.quan@amd.com>
Fri, 21 Jun 2019 01:46:14 +0000 (09:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2019 16:22:50 +0000 (11:22 -0500)
Make mem_busy_percent sysfs interface invisible on Vega10.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 704c7034da09df319700f781b78f6cecb6caad2a..193d53720d9baeca7800e376bed88d9cc2273542 100644 (file)
@@ -2886,7 +2886,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
                return ret;
        }
        /* APU does not have its own dedicated memory */
                return ret;
        }
        /* APU does not have its own dedicated memory */
-       if (!(adev->flags & AMD_IS_APU)) {
+       if (!(adev->flags & AMD_IS_APU) &&
+            (adev->asic_type != CHIP_VEGA10)) {
                ret = device_create_file(adev->dev,
                                &dev_attr_mem_busy_percent);
                if (ret) {
                ret = device_create_file(adev->dev,
                                &dev_attr_mem_busy_percent);
                if (ret) {
@@ -2966,7 +2967,8 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)
                device_remove_file(adev->dev,
                                &dev_attr_pp_od_clk_voltage);
        device_remove_file(adev->dev, &dev_attr_gpu_busy_percent);
                device_remove_file(adev->dev,
                                &dev_attr_pp_od_clk_voltage);
        device_remove_file(adev->dev, &dev_attr_gpu_busy_percent);
-       if (!(adev->flags & AMD_IS_APU))
+       if (!(adev->flags & AMD_IS_APU) &&
+            (adev->asic_type != CHIP_VEGA10))
                device_remove_file(adev->dev, &dev_attr_mem_busy_percent);
        if (!(adev->flags & AMD_IS_APU))
                device_remove_file(adev->dev, &dev_attr_pcie_bw);
                device_remove_file(adev->dev, &dev_attr_mem_busy_percent);
        if (!(adev->flags & AMD_IS_APU))
                device_remove_file(adev->dev, &dev_attr_pcie_bw);