Skip to contentSkip to conversation

drm/amd/powerpaly: fix navi series custom peak level value error

PATCH In review Wang, Kevin(Yang) 2 participants 2 messages Aug 21, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/powerpaly: fix navi series custom peak level value error

fix other navi asic set peak performance level error. because the navi10_ppt.c will handle navi12 14 asic,
it will use navi10 peak value to set other asic, it is not correct.

after patch:
only navi10 use custom peak value, other asic will used default value.

---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +4 -0
index 0955fe8145b9..eb8adf3b0a5c 100644
@@ -1422,6 +1422,10 @@ static int navi10_set_peak_clock_by_device(struct smu_context *smu)
 static int navi10_set_performance_level(struct smu_context *smu, enum amd_dpm_forced_level level)
 {
 	int ret = 0;
+	struct amdgpu_device *adev = smu->adev;
+
+	if (adev->asic_type != CHIP_NAVI10)
+		return -EINVAL;
 
 	switch (level) {
 	case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK:
Signature · 6 lines
2.22.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Evan Quan
#2 lore raw
Quoted 41 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Wang, Kevin(Yang)
Sent: Wednesday, August 21, 2019 1:48 PM
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Wang, Kevin(Yang) <[email protected]>
Subject: [PATCH] drm/amd/powerpaly: fix navi series custom peak level value error

fix other navi asic set peak performance level error.
because the navi10_ppt.c will handle navi12 14 asic, it will use navi10 peak value to set other asic, it is not correct.

after patch:
only navi10 use custom peak value, other asic will used default value.

---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0 -0
index 0955fe8145b9..eb8adf3b0a5c 100644
@@ -1422,6 +1422,10 @@ static int navi10_set_peak_clock_by_device(struct

smu_context *smu) static int navi10_set_performance_level(struct smu_context *smu, enum amd_dpm_forced_level level) {

drivers/gpu/drm/amd/powerplay/navi10_ppt.c +4 -1
 	int ret = 0;
+	struct amdgpu_device *adev = smu->adev;
+
+	if (adev->asic_type != CHIP_NAVI10)
+		return -EINVAL;
 
 	switch (level) {
 	case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK:
--

2.22.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx