Skip to contentSkip to conversation

drm/amd/display: Fix bug use wrong pp interface

PATCH Superseded Rex Zhu 2 participants 2 messages Aug 20, 2018 – Aug 23, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH v2 1/1 drm/amd/display: Fix bug use wrong pp interface

Used wrong pp interface, the original interface is exposed by dpm on SI and paritial CI.

Pointed out by Francis David <[email protected]>

v2: dal only need to set min_dcefclk and min_fclk to smu.
so use display_clock_voltage_request interface, instand of update all display configuration.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +10 -2
index e5c5b0a..7811d60 100644
@@ -480,12 +480,20 @@ void pp_rv_set_display_requirement(struct pp_smu *pp,
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
+	void *pp_handle = adev->powerplay.pp_handle;
 	const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+	struct pp_display_clock_request clock = {0};
 
-	if (!pp_funcs || !pp_funcs->display_configuration_changed)
+	if (!req || !pp_funcs || !pp_funcs->display_clock_voltage_request)
 		return;
 
-	amdgpu_dpm_display_configuration_changed(adev);
+	clock.clock_type = amd_pp_dcf_clock;
+	clock.clock_freq_in_khz = req->hard_min_dcefclk_khz;
+	pp_funcs->display_clock_voltage_request(pp_handle, &clock);
+
+	clock.clock_type = amd_pp_f_clock;
+	clock.clock_freq_in_khz = req->hard_min_fclk_khz;
+	pp_funcs->display_clock_voltage_request(pp_handle, &clock);
 }
 
 void pp_rv_set_wm_ranges(struct pp_smu *pp,
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): 1534751651-16978-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 20 lines · Rex Zhu

Used wrong pp interface, the original interface is exposed by dpm on SI and paritial CI.

Pointed out by Francis David <[email protected]>

v2: dal only need to set min_dcefclk and min_fclk to smu.
so use display_clock_voltage_request interface, instand of update all display configuration.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +0 -0
index e5c5b0a..7811d60 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c void pp_rv_set_display_requirement(struct pp_smu *pp, · line 487

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +3 -1
@@ -480,12 +480,20 @@ void pp_rv_set_display_requirement(struct pp_smu *pp,
 {
 	const struct dc_context *ctx = pp->dm;
 	struct amdgpu_device *adev = ctx->driver_context;
+	void *pp_handle = adev->powerplay.pp_handle;
 	const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+	struct pp_display_clock_request clock = {0};
 
-	if (!pp_funcs || !pp_funcs->display_configuration_changed)
+	if (!req || !pp_funcs || !pp_funcs->display_clock_voltage_request)

Is req ever NULL? I don't expect it.

Otherwise this looks good.

Harry

Quoted 4 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +0 -1
 		return;
 
-	amdgpu_dpm_display_configuration_changed(adev);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c void pp_rv_set_display_requirement(struct pp_smu *pp, · line 499

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +7 -0
+	clock.clock_type = amd_pp_dcf_clock;
+	clock.clock_freq_in_khz = req->hard_min_dcefclk_khz;
+	pp_funcs->display_clock_voltage_request(pp_handle, &clock);
+
+	clock.clock_type = amd_pp_f_clock;
+	clock.clock_freq_in_khz = req->hard_min_fclk_khz;
+	pp_funcs->display_clock_voltage_request(pp_handle, &clock);
 }
 
 void pp_rv_set_wm_ranges(struct pp_smu *pp,

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