drm/amd/powerplay: no memory activity support on Vega10

Submitted by Quan, Evan on June 24, 2019, 7:50 a.m.

Details

Message ID MN2PR12MB3344C751E8710AF18A2A1DA3E4E00@MN2PR12MB3344.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amd/powerplay: no memory activity support on Vega10" ( rev: 5 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Quan, Evan June 24, 2019, 7:50 a.m.
Smu7 ASICs support memory activity report also by reading register directly.
But for Vega10, there is not any SMC message and metrics table for that.  And there is no information about any register related with that.
So, we cannot get the memory activity on Vega10. It's not a regression.

Regards,
Evan
From: Deucher, Alexander <Alexander.Deucher@amd.com>
Sent: Friday, June 21, 2019 10:19 PM
To: Russell, Kent <Kent.Russell@amd.com>; Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/powerplay: no memory activity support on Vega10

Maybe it's dependent on the SMU firwmare version?

Alex

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 7ed84736ccc9..bcf6e089dc2e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -2945,7 +2945,8 @@  int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
                 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) {
@@ -3025,7 +3026,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);
-       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);