Skip to content

Commit 6c3f9d0

Browse files
Yang Wanggregkh
authored andcommitted
drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode
commit 5dff508 upstream. the PPSMC_MSG_GetPptLimit msg is not valid for gfx 11.0.3 on vf mode, so skiped to create power1_cap* hwmon sysfs node. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit e82a8d4) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fae58d0 commit 6c3f9d0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

drivers/gpu/drm/amd/pm/amdgpu_pm.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,14 +3458,16 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
34583458
effective_mode &= ~S_IWUSR;
34593459

34603460
/* not implemented yet for APUs other than GC 10.3.1 (vangogh) and 9.4.3 */
3461-
if (((adev->family == AMDGPU_FAMILY_SI) ||
3462-
((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)) &&
3463-
(gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4)))) &&
3464-
(attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
3465-
attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
3466-
attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
3467-
attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr))
3468-
return 0;
3461+
if (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
3462+
attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr ||
3463+
attr == &sensor_dev_attr_power1_cap.dev_attr.attr ||
3464+
attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr) {
3465+
if (adev->family == AMDGPU_FAMILY_SI ||
3466+
((adev->flags & AMD_IS_APU) && gc_ver != IP_VERSION(10, 3, 1) &&
3467+
(gc_ver != IP_VERSION(9, 4, 3) && gc_ver != IP_VERSION(9, 4, 4))) ||
3468+
(amdgpu_sriov_vf(adev) && gc_ver == IP_VERSION(11, 0, 3)))
3469+
return 0;
3470+
}
34693471

34703472
/* not implemented yet for APUs having < GC 9.3.0 (Renoir) */
34713473
if (((adev->family == AMDGPU_FAMILY_SI) ||

0 commit comments

Comments
 (0)