RE: [PATCH 4/4] drm/amdgpu/pm: only hide average power on SI and pre-RENOIR APUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]

Series is reviewed-by: Evan Quan <evan.quan@xxxxxxx>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex Deucher
Sent: Tuesday, August 18, 2020 3:53 AM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: [PATCH 4/4] drm/amdgpu/pm: only hide average power on SI and pre-RENOIR APUs

We can get this on RENOIR and newer via the SMU metrics table.

Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index f2e70655e8d9..a77f7347fdfc 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3312,12 +3312,17 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,

 if (((adev->flags & AMD_IS_APU) ||
      adev->family == AMDGPU_FAMILY_SI) &&/* not implemented yet */
-    (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
-     attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
+    (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
      attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
      attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
 return 0;

+if (((adev->family == AMDGPU_FAMILY_SI) ||
+     ((adev->flags & AMD_IS_APU) &&
+      (adev->asic_type < CHIP_RENOIR))) &&/* not implemented yet */
+    (attr == &sensor_dev_attr_power1_average.dev_attr.attr))
+return 0;
+
 if (!is_support_sw_smu(adev)) {
 /* hide max/min values if we can't both query and manage the fan */
 if ((!adev->powerplay.pp_funcs->set_fan_speed_percent &&
--
2.25.4

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cevan.quan%40amd.com%7Cc72834b8042146132b1c08d842e7406e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637332908288049501&amp;sdata=5mKxWVSyQDY1FukBEDZRCQFgP6JYO0foHN9ialkkWik%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux