Skip to content

Commit 63feb35

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: temp w/a for DP Link Layer compliance
[Why&How] Disabling P-State support on full updates for DCN401 results in introducing additional communication with SMU. A UCLK hard min message to SMU takes 4 seconds to go through, which was due to DCN not allowing pstate switch, which was caused by incorrect value for TTU watermark before blanking the HUBP prior to DPG on for servicing the test request. Fix the issue temporarily by disallowing pstate changes for compliance test while test request handler is reworked for a proper fix. Fixes: 67ea53a ("drm/amd/display: Disable DCN401 UCLK P-State support on full updates") Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Dillon Varone <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 8a79f7c) Cc: [email protected]
1 parent 23d16ed commit 63feb35

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
#include "dm_helpers.h"
4646
#include "ddc_service_types.h"
47+
#include "clk_mgr.h"
4748

4849
static u32 edid_extract_panel_id(struct edid *edid)
4950
{
@@ -1121,6 +1122,8 @@ bool dm_helpers_dp_handle_test_pattern_request(
11211122
struct pipe_ctx *pipe_ctx = NULL;
11221123
struct amdgpu_dm_connector *aconnector = link->priv;
11231124
struct drm_device *dev = aconnector->base.dev;
1125+
struct dc_state *dc_state = ctx->dc->current_state;
1126+
struct clk_mgr *clk_mgr = ctx->dc->clk_mgr;
11241127
int i;
11251128

11261129
for (i = 0; i < MAX_PIPES; i++) {
@@ -1221,6 +1224,16 @@ bool dm_helpers_dp_handle_test_pattern_request(
12211224
pipe_ctx->stream->test_pattern.type = test_pattern;
12221225
pipe_ctx->stream->test_pattern.color_space = test_pattern_color_space;
12231226

1227+
/* Temp W/A for compliance test failure */
1228+
dc_state->bw_ctx.bw.dcn.clk.p_state_change_support = false;
1229+
dc_state->bw_ctx.bw.dcn.clk.dramclk_khz = clk_mgr->dc_mode_softmax_enabled ?
1230+
clk_mgr->bw_params->dc_mode_softmax_memclk : clk_mgr->bw_params->max_memclk_mhz;
1231+
dc_state->bw_ctx.bw.dcn.clk.idle_dramclk_khz = dc_state->bw_ctx.bw.dcn.clk.dramclk_khz;
1232+
ctx->dc->clk_mgr->funcs->update_clocks(
1233+
ctx->dc->clk_mgr,
1234+
dc_state,
1235+
false);
1236+
12241237
dc_link_dp_set_test_pattern(
12251238
(struct dc_link *) link,
12261239
test_pattern,

0 commit comments

Comments
 (0)