Skip to contentSkip to conversation

drm/amd/pp: Supply Max DGPU clock for DC validation

PATCH In review Rex Zhu 2 participants 2 messages Jan 3, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/pp: Supply Max DGPU clock for DC validation

This patch can fix MultiGPU-Display blank
out with 1 IGPU-4k display and 2 DGPU-two 4K
displays.

Change-Id I41208feb6b275d9e8b45e9ef129e19c9739107a4
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +7 -2
index fa9d161..977fcdf 100644
@@ -1425,9 +1425,14 @@ static int pp_get_display_mode_validation_clocks(void *handle,
 
 	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DynamicPatchPowerState))
 		ret = phm_get_max_high_clocks(hwmgr, clocks);
-
 	mutex_unlock(&pp_handle->pp_lock);
-	return ret;
+
+	if (ret) {
+		clocks->memory_max_clock = pp_dpm_get_mclk(handle, false);
+		clocks->engine_max_clock = pp_dpm_get_sclk(handle, false);
+	}
+
+	return 0;
 }
 
 const struct amd_pm_funcs pp_dpm_funcs = {
Signature · 6 lines
1.9.1

_______________________________________________
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): 1514949644-10417-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 15 lines · Rex Zhu

This patch can fix MultiGPU-Display blank
out with 1 IGPU-4k display and 2 DGPU-two 4K
displays.

Change-Id I41208feb6b275d9e8b45e9ef129e19c9739107a4
---
 drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +0 -0
index fa9d161..977fcdf 100644

drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_get_display_mode_validation_clocks(void *handle, · line 1430

Quoted 8 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +2 -2
@@ -1425,9 +1425,14 @@ static int pp_get_display_mode_validation_clocks(void *handle,
 
 	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DynamicPatchPowerState))
 		ret = phm_get_max_high_clocks(hwmgr, clocks);
-
 	mutex_unlock(&pp_handle->pp_lock);
-	return ret;
+
+	if (ret) {

Does phm_get_max_high_clocks fail because get_max_high_clocks is not implemented for dGPU?

drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_get_display_mode_validation_clocks(void *handle, · line 1432

Quoted 2 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +2 -0
+		clocks->memory_max_clock = pp_dpm_get_mclk(handle, false);
+		clocks->engine_max_clock = pp_dpm_get_sclk(handle, false);

Would it make more sense to keep this inside phm_get_max_high_clocks as fallback when get_max_high_clocks is not implemented? Should we also print a warning in this case?

Harry

drivers/gpu/drm/amd/powerplay/amd_powerplay.c static int pp_get_display_mode_validation_clocks(void *handle, · line 1438

Quoted 7 lines
drivers/gpu/drm/amd/powerplay/amd_powerplay.c +3 -0
+	}
+
+	return 0;
 }
 
 const struct amd_pm_funcs pp_dpm_funcs = {

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